Search code examples
pythonweblogicwlst

How to connect to a specific Managed Server using WLST (and not the Admin Server)


When a wlst python script need to specificaly connect to a managed server for an operation the connect command always connect to the Admin servers :

/{INSTALL_PATH}/oracle_common/common/bin/wlst.sh {MY_PY_SCRIPT}.py 

connect(username,password,t3://{MY_MANAGEDSERVER_IP_ADRESS}:{T3PORT})
#or connect(username,password,t3://{MY_MANAGEDSERVER_LISTEN_ADDRESS}:{T3PORT})

Connecting to t3://{MY_MANAGEDSERVER_IP_ADRESS}:51001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'Domain'.

How can we force the connect wlst command to connect to the managed server and not the Admin Server ?


Solution

  • Instead of admin host and port in your connect, statement use managed host and port. It will work like charm.