Python 无法将WLST连接到管理服务器
我是Weblogic和WLST的新手 我用Jython编写了将WLST连接到管理服务器的脚本,但在连接时发现了错误 WLSTException:执行连接时出错:获取数据时出错 最初的背景。t3://localhost:7001上没有运行的服务器 我的Jython代码:Python 无法将WLST连接到管理服务器,python,weblogic,jython,weblogic11g,wlst,Python,Weblogic,Jython,Weblogic11g,Wlst,我是Weblogic和WLST的新手 我用Jython编写了将WLST连接到管理服务器的脚本,但在连接时发现了错误 WLSTException:执行连接时出错:获取数据时出错 最初的背景。t3://localhost:7001上没有运行的服务器 我的Jython代码: print '--------------------------------------------------------------------' print '-- START NODE MANAGER --' print
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
看起来Weblogic没有运行
按照评论中的建议,尝试访问
http://localhost:7001/console
验证weblogic是否正在运行。我认为最好的方法是编写一个批处理文件,在其中可以调用Jyhton脚本
样品
echo %TIME% Start executing Jython script
call setWLSEnv.cmd
java weblogic.WLST start_servers.py
echo %TIME% Finished
您可以在以下位置进入管理控制台:?我运行startWeblogic.cmd,然后可以访问我认为startWeblogic.cmd运行的是AdminServer相同的代码nmStart('AdminServer')。如何使用WLST运行startweblog.cmd?我只想使用文件.cmd运行