`

weblogic开启管理端口后停止报错[转帖]

 
阅读更多
weblogic开启管理端口后停止报错[转帖]
得分记录:  [我要评分]

中间件环境如下:

截图02

在weblogic console上开启Administration Port,如下图:

截图01

此后用stopWebLogic.sh脚本去关闭AdminServer报错如下,

[bea@mylinux bin]$ ./stopWebLogic.sh
Stopping Weblogic Server…

Initializing WebLogic Scripting Tool (WLST) …

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://localhost:7001 with userid weblogic …
This Exception occured at Sat Nov 20 11:34:45 EST 2010.
javax.naming.AuthenticationException [Root exception is java.lang.SecurityException: User 'principals=[weblogic, Administrators]‘ has administration role. All tasks by adminstrators must go through an Administration Port.]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:53)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:670)
at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:466)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:373)
at weblogic.jndi.Environment.getContext(Environment.java:307)
at weblogic.jndi.Environment.getContext(Environment.java:277)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTHelper.java:494)
at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:547)
at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:299)
at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:201)
at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:60)
at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:248)
at org.python.core.PyObject.invoke(PyObject.java:2016)
at org.python.pycode._pyx6.connect$1(<iostream>:16)
at org.python.pycode._pyx6.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyTableCode.call(PyTableCode.java:404)
at org.python.core.PyFunction.__call__(PyFunction.java:184)
at org.python.pycode._pyx18.f$0(/home/bea/bea923/user_projects/domains/base_domain/shutdown.py:1)
at org.python.pycode._pyx18.call_function(/home/bea/bea923/user_projects/domains/base_domain/shutdown.py)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1135)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
at weblogic.management.scripting.WLST.main(WLST.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at weblogic.WLST.main(WLST.java:29)
Caused by: java.lang.SecurityException: User ‘principals=[weblogic, Administrators]‘ has administration role. All tasks by adminstrators must go through an Administration Port.
at weblogic.common.internal.RMIBootServiceImpl.checkAdminPort(RMIBootServiceImpl.java:154)
at weblogic.common.internal.RMIBootServiceImpl.authenticate(RMIBootServiceImpl.java:132)
at weblogic.common.internal.RMIBootServiceImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:553)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:443)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:439)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:61)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:983)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Problem invoking WLST – Traceback (innermost last):
File "/home/bea/bea923/user_projects/domains/base_domain/shutdown.py", line 1, in ?
File "<iostream>", line 22, in connect
WLSTException: "Error occured while performing connect : User ‘principals=[weblogic, Administrators]‘ has administration role. All tasks by adminstrators must go through an Administration Port. Use dumpStack() to view the full stacktrace"

Done

经查看,weblogic进程还在,没有停止成功,

[bea@mylinux bin]$ ps -ef|grep java
bea 3058 3021 0 10:37 pts/0 00:00:11 /home/bea/bea923/jdk150_12/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=128m -da -Dplatform.home=/home/bea/bea923/weblogic92 -Dwls.home=/home/bea/bea923/weblogic92/server -Dwli.home=/home/bea/bea923/weblogic92/integration -Dweblogic.management.discover=true -Djava.rmi.server.hostname=192.168.0.56 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= –Djava.rmi.server.hostname=192.168.0.56 -Dweblogic.Name=AdminServer -Djava.security.policy=/home/bea/bea923/weblogic92/server/lib/weblogic.policy weblogic.Server
bea 3633 2246 0 11:36 pts/0 00:00:00 grep java

修改

stopWebLogic.sh 里的ADMIN_URL="t3://localhost:7001"为

ADMIN_URL= https://localhost:9002

后,再次执行脚本后报错,

[bea@mylinux bin]$ ./stopWebLogic.sh
Stopping Weblogic Server…

Initializing WebLogic Scripting Tool (WLST) …

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to https://localhost:9002 with userid weblogic …
<Nov 20, 2010 11:53:19 AM EST> <Warning> <Security>
<BEA-090542> <Certificate chain received from localhost – 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.>
<Nov 20, 2010 11:53:20 AM EST> <Warning> <Security> <BEA-090542> <Certificate chain received from localhost – 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.>
<Nov 20, 2010 11:53:20 AM EST> <Warning> <Security> <BEA-090542> <Certificate chain received from localhost – 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.>
This Exception occured at Sat Nov 20 11:53:20 EST 2010.
javax.naming.CommunicationException [Root exception is java.net.ConnectException:
https://localhost:9002: Destination unreachable; nested exception is:
javax.net.ssl.SSLKeyException: [Security:090542]Certificate chain received from localhost – 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.; No available router to destination]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:49)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:363)
at weblogic.jndi.Environment.getContext(Environment.java:307)
at weblogic.jndi.Environment.getContext(Environment.java:277)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTHelper.java:494)
at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:547)
at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:299)
at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:201)
at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:60)
at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:248)
at org.python.core.PyObject.invoke(PyObject.java:2016)
at org.python.pycode._pyx6.connect$1(<iostream>:16)
at org.python.pycode._pyx6.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyTableCode.call(PyTableCode.java:404)
at org.python.core.PyFunction.__call__(PyFunction.java:184)
at org.python.pycode._pyx18.f$0(/home/bea/bea923/user_projects/domains/base_domain/shutdown.py:1)
at org.python.pycode._pyx18.call_function(/home/bea/bea923/user_projects/domains/base_domain/shutdown.py)
at org.python.core.PyTableCode.call(PyTableCode.java:208)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1135)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
at weblogic.management.scripting.WLST.main(WLST.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at weblogic.WLST.main(WLST.java:29)
Caused by: java.net.ConnectException:
https://localhost:9002: Destination unreachable; nested exception is:
javax.net.ssl.SSLKeyException: [Security:090542]Certificate chain received from localhost – 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.; No available router to destination
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:204)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:154)
at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:342)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:337)
… 38 more
Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
javax.net.ssl.SSLKeyException: [Security:090542]Certificate chain received from localhost – 127.0.0.1 was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.; No available router to destination
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:475)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:326)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:261)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:204)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:226)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:189)
… 43 more
Problem invoking WLST – Traceback (innermost last):
File "/home/bea/bea923/user_projects/domains/base_domain/shutdown.py", line 1, in ?
File "<iostream>", line 22, in connect
WLSTException: ‘Error occured while performing connect : Error getting the initial context. There is no server running at
https://localhost:9002 Use dumpStack() to view the full stacktrace’

Done

报错里提到了-Dweblogic.security.TrustKeyStore=DemoTrust 参数。

在setDomainEnv.sh 里添加该参数如下,

JAVA_OPTIONS="${JAVA_OPTIONS} ${JAVA_PROPERTIES} -Dweblogic.security.TrustKeyStore=DemoTrust -Djava.rmi.server.hostname=192.168.0.56 -Dwlw.iterativeDev=${iterativeDevFlag} -Dwlw.testConsole=${testConsoleFlag} -Dwlw.logErrorsToConsole=${logErrorsToConsoleFlag}"
export JAVA_OPTIONS

再次执行停止脚本,还是报错:

[bea@mylinux bin]$ ./stopWebLogic.sh
Stopping Weblogic Server…

Initializing WebLogic Scripting Tool (WLST) …

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to https://localhost:9002 with userid weblogic …
This Exception occured at Sat Nov 20 12:10:27 EST 2010.
javax.naming.CommunicationException [Root exception is java.net.ConnectException:
https://localhost:9002: Destination unreachable; nested exception is:
java.net.ProtocolException: Tunneling result unspecified - is the HTTP server at host: 'localhost' and port: '9002' a WebLogic Server?; No available router to destination]

无法识别 https://localhost:9002

再次查看stopWebLogic.sh脚本,修改ADMIN_URL="https://localhost:9002"为

ADMIN_URL="t3s://localhost:9002"后,停止成功!

[bea@mylinux bin]$ ./stopWebLogic.sh
Stopping Weblogic Server…

Initializing WebLogic Scripting Tool (WLST) …

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3s://localhost:9002 with userid weblogic …
Successfully connected to Admin Server ‘AdminServer’ that belongs to domain ‘base_domain’.

Shutting down the server AdminServer with force=false while connected to AdminServer …
Disconnected from weblogic server: AdminServer

Exiting WebLogic Scripting Tool.

Done

总结:

1、当启动了管理port,在使用stopWebLogic.sh脚本时,需将原来的url改为t3s协议以及管理端口

2、如使用demo的证书,需在启动参数里添加-Dweblogic.security.TrustKeyStore=DemoTrust

分享到:
评论

相关推荐

    Weblogic控制台和应用端口分离

    一般情况下,我们要求部署的服务端口和程序的服务端口分开来控制

    weblogic 控制台与应用端口分开、节点服务器配置

    通常情况下,WebLogic Server的管理控制台和应用程序运行在同一套服务结构下,共享相同的端口。这意味着如果应用程序的某个部分存在安全漏洞,攻击者可能会利用这个漏洞来访问控制台,进而对整个服务器进行非法操作...

    weblogic安装步骤以及报错解决

    Weblogic 安装步骤以及报错解决 Weblogic 是一款功能强大且流行的中间件,广泛应用于企业级应用系统中。但是,安装 Weblogic 可能会遇到各种问题,本文将提供详细的安装步骤和报错解决方案,以帮助用户顺利安装和...

    Weblogic二种修改端口的方法

    1. **登录WebLogic控制台**:首先,打开浏览器,输入WebLogic服务器的地址和默认端口(通常是`http://your_server_host:7001/console`),用管理员账号登录。 2. **选择域**:在控制台左侧导航栏中,选择“环境” -...

    WEBLOGIC8+AJAX setCharacterEncoding报错

    标题中的"WEBLOGIC8+AJAX setCharacterEncoding报错"指的是在WebLogic 8.1服务器上,当结合使用Ajax技术时,设置HTTP响应的字符编码为"gb2312"出现的一个特定错误。描述中提到的"NoSuchMethodError setCharacter...

    weblogic集群部署、控制台端口与程序端口分开

    WebLogic Server默认情况下,控制台端口(管理服务器的 Administration Port)和程序端口(Application Port)是相同的,这可能会导致某些情况下的冲突。为了分离这两个端口,我们需要在WebLogic的配置文件`config....

    linux系统创建weblogic域以及修改端口方法

    ### Linux系统创建WebLogic域及修改端口方法详解 #### 一、安装发布WebLogic域 ...完成以上步骤后,WebLogic的启动端口就被成功修改了。需要注意的是,在使用`vi`编辑器时要小心,避免误删其他重要的配置信息。

    weblogic集成多个Tomcat服务,自动分配tomcat服务,80端口访问

    2. 配置WebLogic的外部服务器:在WebLogic管理控制台中,为每个Tomcat实例创建一个新的“外部服务器”配置,指定Tomcat的地址和端口。 3. 集成Tomcat和WebLogic:使用WebLogic的WLST(WebLogic Scripting Tool)或...

    weblogic下如何用非root账号使用80端口

    7. **重启 WebLogic Server**:停止并重新启动 WebLogic Server,确保其运行在 `wls` 用户而非 root 用户下。 ```bash # 停止 WebLogic Server stopWebLogic.sh # 以 wls 用户身份启动 WebLogic Server su wls ...

    WebLogic_管理员

    WebLogic_管理员是一个聚焦于Oracle WebLogic Server管理的资源,旨在帮助系统管理员深入理解和操作这款企业级Java应用服务器。WebLogic Server是Oracle公司提供的一款强大的中间件产品,广泛用于部署和管理各种Java...

    weblogic 服务器管理(中文版)

    【WebLogic服务器管理概述】 WebLogic服务器管理是BEA Systems提供的一个强大工具,它涵盖了对Web应用程序和中间件环境的全面控制。WebLogic Server管理子系统由多个组件组成,包括域、管理服务器和受管服务器。域...

    WEBLOGIC服务器管理

    - **启动与终止WebLogic服务器**:可以通过命令行工具或管理控制台启动和停止WebLogic服务器。 - **集群管理**:WebLogic支持服务器集群,集群可以提供更高的可用性和负载均衡能力。管理控制台提供了集群管理的功能...

    bea weblogic server 管理指南

    《BEA WebLogic Server 管理指南》是一本针对BEA公司开发的企业级Java应用服务器WebLogic Server的详尽管理手册。WebLogic Server是业界广泛使用的中间件平台,为企业的应用程序提供部署、管理和监控服务。该指南...

    weblogic管理手册

    WebLogic管理手册是一份详尽的指南,涵盖了与BEA WebLogic Server相关的各种管理和操作事项。WebLogic Server是Oracle公司的一款企业级Java EE应用服务器,它提供了强大的管理和部署功能,适用于构建、部署和管理...

    WebLogic(管理员手册)

    WebLogic是Oracle公司的一款企业级Java应用服务器,它提供了一个高效、可扩展的平台来部署、管理和运行基于Java EE(Java Enterprise Edition)的应用程序。WebLogic Server是许多大型企业的核心组件,因为它支持高...

    weblogic节点配置管理器

    WebLogic 节点配置管理器 WebLogic 节点配置管理器是 WebLogic 服务器的核心组件之一,负责管理和配置 WebLogic 服务器的节点信息。下面是 WebLogic 节点配置管理器的详细信息。 文件上传及配置文件修改 在配置 ...

    WebLogic服务器管理概述

    WebLogic管理服务器可以通过命令行、脚本或Windows服务方式启动和停止。受管服务器的启动通常由管理服务器控制,但也可以手动启动。 7. **口令管理**:WebLogic服务器启动时,可能需要输入安全管理的口令,这涉及到...

    weblogic管理员指南

    WebLogic Server是一款由甲骨文公司提供的企业级Java应用程序服务器,是Java EE(Java Platform, Enterprise Edition)平台的实现,广泛用于构建、部署和管理分布式应用程序。本指南将深入探讨WebLogic Server的管理...

    Weblogic基础管理系列培训之二

    WebLogic Server是Oracle公司的一款企业级Java应用服务器,它提供了用于构建、部署和管理Java EE应用程序的全面平台。本系列培训主要关注WebLogic的基础管理,旨在帮助管理员掌握日常运维的关键技能。以下是根据...

    weblogic 遇到的报错 解决办法.docx

    WebLogic Server是Oracle公司的一款企业级Java应用服务器,它提供了用于构建、部署和管理企业级Java应用程序的平台。在日常运维中,WebLogic Server可能会遇到各种错误,其中一种常见的问题就是由于权限设置不当导致...

Global site tag (gtag.js) - Google Analytics