【问题标题】:Unable connect WLST to Admin Server无法将 WLST 连接到管理服务器
【发布时间】:2013-04-12 09:41:38
【问题描述】:

我是 Weblogic 和 WLST 的新手 我通过 Jython 编写脚本将 WLST 连接到管理服务器,但连接时出现错误。

WLSTException:执行连接时发生错误:获取错误 最初的上下文。 t3://localhost:7001 处没有运行服务器

我的 Jython 代码:

print '--------------------------------------------------------------------'
print '-- START NODE MANAGER --'
print '--------------------------------------------------------------------'

startNodeManager(verbose='true', NodeManagerHome='C:/Oracle/Middleware/wlserver_10.3/common/nodemanager', ListenPort='5556', ListenAddress='localhost')

print '--------------------------------------------------------------------'
print '-- CONNECT WLST TO NODE MANAGER --'
print '--------------------------------------------------------------------'

nmConnect('weblogic', 'abcd123-', 'localhost', '5556', 'base_domain', 'C:/Oracle/Middleware/user_projects/domains/base_domain','ssl')

print '--------------------------------------------------------------------'
print '-- START ADMIN SERVER --'
print '--------------------------------------------------------------------'

nmStart('AdminServer')
nmServerStatus('AdminServer')

print '--------------------------------------------------------------------'
print '-- CONNECT WLST TO ADMIN SERVER --'
print '--------------------------------------------------------------------'

connect('weblogic', 'abcd123-')
# connect('weblogic', 'abcd123-', 't3://localhost:7001') I aloso try this but not work

【问题讨论】:

标签: python weblogic jython weblogic11g wlst


【解决方案1】:

看起来 Weblogic 没有运行。

按照评论中的建议,尝试访问 http://localhost:7001/console 以验证 weblogic 是否正在运行。

【讨论】:

  • 我运行 startWeblogic.cmd 然后可以访问localhost:7001/console 我认为 startWeblogic.cmd 是运行 AdminServer 相同的代码 nmStart('AdminServer')。如何使用 WLST 运行 startWeblogic.cmd?
  • 我只想使用文件 .cmd 运行
【解决方案2】:

我认为最好的方法是编写一个批处理文件,您可以在其中调用您的 Jyhton 脚本。

样本

echo %TIME% Start executing Jython script 
call setWLSEnv.cmd
java weblogic.WLST start_servers.py
echo %TIME% Finished

【讨论】:

    猜你喜欢
    • 2016-08-27
    • 2018-03-04
    • 1970-01-01
    • 2019-05-13
    • 2021-07-02
    • 1970-01-01
    • 2016-09-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多