1

I'm using following command to connect to weblgic using WLST,

java weblogic.wlst core.py

inside core.py I'm calling following command to connect to the weblogic admin. but some times the service url becomes unresponsive And my script hangs occasionally due to this. Is there any way to give a timeout to this connect() method or any other method to implement a timeout functionality?. Appreciate if someone can shed some light on this. Thanks.

connect(username,password,t3://:)

in earlier WebLogic versions they have provided following functionality(to ping), but they have removed it after 12.2*

java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblog ic ping 3 100

user1672382
  • 87
  • 1
  • 10

1 Answers1

0

This is a very common situation, where you can use Python's socket module to check that the Admin port is opened or not with the following function.

import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
AdminIP = '192.168.33.10'
result = sock.connect_ex((AdminIP,7001))
if result == 0:
    print "AdminPort is open you can connect"
else:
    print "Admin Port is not yet open"
sock.close()

add your logic accordingly, HTH!

PavanDevarakonda
  • 625
  • 5
  • 27