Your wsadmin connects that long probably due to DNS issues. Ideally you should resolve the root (DNS) problem, but as a workaround you may try the following.
Save the following Jython script as set_dns_props.py:
for jvm in AdminConfig.list('JavaVirtualMachine').splitlines():
AdminConfig.create('Property', jvm, [ ['name', 'networkaddress.cache.negative.ttl'], ['value', '600'] ])
AdminConfig.create('Property', jvm, [ ['name', 'java.net.preferIPv4Stack'], ['value', 'true'] ])
AdminConfig.create('Property', jvm, [ ['name', 'networkaddress.cache.ttl'], ['value', '-1'] ])
AdminConfig.create('Property', jvm, [ ['name', 'com.ibm.cacheLocalHost'], ['value', 'true'] ])
AdminConfig.save()
then start your wsadmin with:
./wsadmin.sh -lang jython -f set_dns_props.py -user USERNAME - password PASSWORD -host LOCALHOST -port 9999 -javaoption -Djava.net.preferIPv4Stack=true -javaoption -Dnetworkaddress.cache.negative.ttl=600 -javaoption -Dnetworkaddress.cache.ttl=-1 -Dcom.ibm.cacheLocalHost=true
then logon to the AdminConsole, make sure that all nodes are synchronized (assuming WAS ND), and finally restart ALL servers, nodeagents, and the deployment manager.
Afterwards, always use this syntax to start your wsadmin session:
./wsadmin.sh -lang jython -user USERNAME - password PASSWORD -host LOCALHOST -port 9999 -javaoption -Djava.net.preferIPv4Stack=true -javaoption -Dnetworkaddress.cache.negative.ttl=600 -javaoption -Dnetworkaddress.cache.ttl=-1 -Dcom.ibm.cacheLocalHost=true
The above trick configures some DNS & TCP/IP-related properties for server and client JVMs.
Use -conntype NONE option only if you know what you're doing:
- In an essence: you get the best value if your server is stopped during your wsadmin session and you only work with the configuration and applications. Using -conntype NONE gives you a chance to apply some configuration even before you start your server for the first time. Really useful when setting up a new environment.
- You can't access WAS runtime with -conntype NONE.
- If your server is started during such wsadmin (-conntype NONE) session, changes made to WAS configuration are very unlikely to be reflected without server restart. The server just isn't aware that configuration files are being modified.