我无法使用 WLST 和节点管理器杀死一台服务器
我管理七台 Weblogic 服务器用于开发和测试。我使用 WLST 脚本来启动和停止它们。这对于六台服务器来说非常有效,但是当我运行脚本来停止其中一台服务器时,其中一台不会停止。启动脚本启动它,但停止脚本不会停止它。
我正在为所有七台服务器执行相同的脚本,只是参数不同。 WLST 称其已成功关闭服务器,但这是在撒谎。它也很快地说出这一点(实际关闭的需要几秒钟)。
还有其他人遇到过这个问题吗?您对我应该看什么有任何线索吗?
服务器版本为 9.2。我的停止脚本如下所示:
from java.util import *
from javax.management import *
print 'starting the script ....'
argslength = len(sys.argv)
if argslength < 2 :
print '==>Insufficient arguments'
print '==>Syntax: java weblogic.WLST stop.py domain server'
exit()
else:
domain = sys.argv[1]
server = sys.argv[2]
print 'stopping server ', server, ' in domain ', domain
nmConnect(adminId, password, host, '5556', domain)
nmKill(server)
nmDisconnect()
exit()
在实际脚本中,adminId、密码和主机是硬编码的。
I manage seven Weblogic servers for development and test. I use WLST scripts to start and stop them. This works perfectly for six of the servers, but one of them will not stop when I run the script to stop it. The start script starts it but the stop script doesn't stop it.
I'm executing the same scripts for all seven servers, it's just different parameters. WLST says it successfully shut down the server, but it's lying. It also says this very quickly (it takes a few seconds for the ones it actually shuts down).
Has anyone else had this problem? Do you have any clues as to what I should be looking at?
The servers are version 9.2. My stop script looks like this:
from java.util import *
from javax.management import *
print 'starting the script ....'
argslength = len(sys.argv)
if argslength < 2 :
print '==>Insufficient arguments'
print '==>Syntax: java weblogic.WLST stop.py domain server'
exit()
else:
domain = sys.argv[1]
server = sys.argv[2]
print 'stopping server ', server, ' in domain ', domain
nmConnect(adminId, password, host, '5556', domain)
nmKill(server)
nmDisconnect()
exit()
In the real script that adminId, password and host are hard coded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您已经决定分享您的想法...
如果我错了请纠正我...
您在同一台计算机上有多个域。您希望使用 NM 停止所有服务器。
您是否检查了未关闭的服务器(说谎的服务器:))是否已通过 nmEnroll() 注册?
If you already resolved share your thought...
Correct me if I m wrong...
You have multiple domains on the same machine. You wish to stop all the servers by using NM.
Did you check the server which is not shutdown (lying server :)) is that enrolled by nmEnroll()?