-1

I new in Weblogic and WLST I write script connect WLST to Admin Server by Jython but I revecied error when connect.

WLSTException: Error occured while performing connect : Error getting the initial context. There is no server running at t3://localhost:7001

My Jython code:

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

2 Answers2

0

It looks like Weblogic is not running.

As suggested in the comment, try accessing http://localhost:7001/console to verify that the weblogic is running.

Aleš
  • 8,896
  • 8
  • 62
  • 107
0

I think that the best way is to write a batch file, inside which you can call your Jyhton script.

Sample

echo %TIME% Start executing Jython script 
call setWLSEnv.cmd
java weblogic.WLST start_servers.py
echo %TIME% Finished
Lefteris Bab
  • 787
  • 9
  • 19