WSAdmin Error Creating SOAP Connection

DES picture DES · Sep 30, 2014 · Viewed 16k times · Source

When I run the following command it fails with the error at the end.

wsadmin.bat -wsadmin_classpath D:\MediaRepository\Install_Driver\Lib;D:\MediaRepository\Install_Driver\Lib\PasswordEncryption.jar \ 
 -javaoption -Xms1024m -javaoption -Xmx1024m -host 165.226.111.111 -port 18120 \ 
 -user XXX -password XXX

WASX7023E: Error creating "SOAP" connection to host "165.226.165.136"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to find a valid IP for host 165.226.111.111]
WASX7213I: This scripting client is not connected to a server process; please refer to the log file D:\WAS\V70\AppServer\profiles\logs\wsadmin.traceout for additional information. WASX8011W: AdminTask object is not available.

WSADMIN.TRACEOUT

************ Start Display Current Environment ************
Host Operating System is Windows Server 2008 R2, version 6.1 build 7601 Service Pack 1
Java version = JRE 1.6.0 IBM J9 2.4 Windows Server 2008 R2 amd64-64 jvmwa6460sr15-20131016_170922 (JIT enabled, AOT enabled)
J9VM - 20131016_170922
JIT  - r9_20130920_46510ifx2
GC   - GA24_Java6_SR15_20131016_1337_B170922, Java Compiler = j9jit24, Java VM name = IBM J9 VM
was.install.root = D:\WAS\V70\AppServer
user.install.root = D:\WAS\V70\AppServer\profiles\SF_N9SF_LTST
Java Home = D:\WAS\V70\AppServer\java\jre
ws.ext.dirs = D:\\WAS\\V70\\AppServer\\java\\lib;D:\\WAS\\V70\\AppServer\\classes;D:\\WAS\\V70\\AppServer\\lib;D:\\WAS\\V70\\AppServer\\installedChannels;D:\\WAS\\V70\\AppServer\\lib\\ext;D:\\WAS\\V70\\AppServer\\web\\help;D:\\WAS\\V70\\AppServer\\deploytool\\itp\\plugins\\com.ibm.etools.ejbdeploy\\runtime
Classpath = D:\WAS\V70\AppServer\profiles\properties;D:\WAS\V70\AppServer\properties;D:\WAS\V70\AppServer\lib\startup.jar;D:\WAS\V70\AppServer\lib\bootstrap.jar;D:\WAS\V70\AppServer/lib/lmproxy.jar;D:\WAS\V70\AppServer/lib/urlprotocols.jar;D:\WAS\V70\AppServer\java\lib\tools.jar;D:\WAS\V70\AppServer\deploytool\itp\batchboot.jar;D:\WAS\V70\AppServer\deploytool\itp\batch2.jar
Java Library path = D:\WAS\V70\AppServer\java\jre\bin\default;D:\WAS\V70\AppServer\java\jre\bin;C:\Windows\system32;C:\Windows;D:\Program Files\Siemens\GsmActive\DLL;C:\CA\SC\CAWIN\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\CA\SC\Csam\SockAdapter\bin;C:\CA\DSM\bin;C:\CA\SC\CBB\;C:\CA\SC\CAM\bin;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;D:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Groovy\Groovy-2.2.2\bin;C:\Program Files\Microsoft Network Monitor 3\;.
Current trace specification = *=info
************* End Display Current Environment *************
[9/29/14 18:00:53:512 EDT] 00000000 ManagerAdmin  I   TRAS0017I: The startup trace state is *=info.
[9/29/14 18:00:53:784 EDT] 00000000 AbstractShell A   WASX7326I: Loaded properties file "/D:/WAS/V70/AppServer/profiles/properties/wsadmin.properties"
[9/29/14 18:00:53:926 EDT] 00000000 SSLConfig     W   CWPKI0041W: One or more key stores are using the default password.
[9/29/14 18:00:53:933 EDT] 00000000 SSLConfigMana I   CWPKI0027I: Disabling default hostname verification for HTTPS URL connections.
[9/29/14 18:00:53:940 EDT] 00000000 SecurityObjec I   Client code attempting to load security configuration
[9/29/14 21:40:56:313 EDT] 00000000 AbstractShell A   WASX7093I: Issuing message: "WASX7023E: Error creating "SOAP" connection to host "XXX"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.io.IOException: Exception during sslSocket.startHandshake: Read timed out; targetException=java.lang.IllegalArgumentException: Error opening socket: java.io.IOException: Exception during sslSocket.startHandshake: Read timed out]"
[9/29/14 21:40:56:316 EDT] 00000000 AbstractShell E   WASX7120E: Diagnostic information from exception with text "com.ibm.websphere.management.exception.ConnectorException
java.lang.reflect.InvocationTargetException: java.lang.reflect.InvocationTargetException
" follows:

 com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: The system cannot create a SOAP connector to connect to host XXX at port 10004.
    at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:635)
    at com.ibm.websphere.management.AdminClientFactory.access$000(AdminClientFactory.java:127)
    at com.ibm.websphere.management.AdminClientFactory$1.run(AdminClientFactory.java:210)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
    at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:206)
    at com.ibm.ws.scripting.CommonScriptingObject.connectToAdminService(CommonScriptingObject.java:123)
    at com.ibm.ws.scripting.CommonScriptingObject.<init>(CommonScriptingObject.java:104)
    at com.ibm.ws.scripting.AdminControlClient.<init>(AdminControlClient.java:170)
    at com.ibm.ws.scripting.AbstractShell.createControlClient(AbstractShell.java:1268)
    at com.ibm.ws.scripting.AbstractShell.run(AbstractShell.java:2212)
    at com.ibm.ws.scripting.WasxShell.main(WasxShell.java:1010)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:213)
    at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:93)
    at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:74)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
    at org.eclipse.core.launcher.Main.run(Main.java:981)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:341)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:111)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
    at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:457)
    ... 31 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.io.IOException: Exception during sslSocket.startHandshake: Read timed out; targetException=java.lang.IllegalArgumentException: Error opening socket: java.io.IOException: Exception during sslSocket.startHandshake: Read timed out]
    at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:415)
    at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:227)
    ... 36 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.io.IOException: Exception during sslSocket.startHandshake: Read timed out; targetException=java.lang.IllegalArgumentException: Error opening socket: java.io.IOException: Exception during sslSocket.startHandshake: Read timed out]
    at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:475)
    at org.apache.soap.rpc.Call.WASinvoke(Call.java:487)
    at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:387)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:372)
    ... 37 more

[9/29/14 21:40:56:317 EDT] 00000000 AdminControlC W   WASX7072E: The control service is not available.
[9/29/14 21:40:56:336 EDT] 00000000 AdminConfigCl W   WASX7198W: The configuration service is not running. Configuration commands will not run.
[9/29/14 21:40:56:353 EDT] 00000000 AdminConfigCl A   WASX7208I: Validation settings in effect now: Level=HIGHEST, Cross-validation=true, Output file=D:/WAS/V70/AppServer/profiles/logs/wsadmin.valout
[9/29/14 21:40:56:371 EDT] 00000000 AdminAppClien W   WASX7072E: The control service is not available.
[9/29/14 21:40:56:766 EDT] 00000000 AdminAppClien W   WASX7206W: The application management service is not running. Application management commands will not run.
[9/29/14 21:40:56:768 EDT] 00000000 AdminCmdClien W   WASX7198W: The configuration service is not running. Configuration commands will not run.
[9/29/14 21:40:56:768 EDT] 00000000 AdminCmdClien W   WASX8011W: AdminTask object is not available.

Answer

6006604 picture 6006604 · Jul 4, 2018

If you login to WebSphere console, and navigate to Servers > Server Types > WebSphere application servers, you should see that your Host Name is not localhost:

enter image description here

You have at least three options for resolving this issue...

Option 1

Start wsadmin using the host and port params:

wsadmin.bat -lang jython -username [username] -password [password] -host [hostname shown in image 1] -port [your WAS console port]

Note that this option might lead to the following error:

SRVE0255E: A WebGroup/Virtual Host to handle NNN.NNN.NNN.NNN:NNNN has not been defined.

... which is beyond the scope of this answer but can be resolved with a bit of googling.

Option 2

Start wsadmin with the conntype parameter set to NONE.

wsadmin.bat -lang jython -username [username] -password [password] -conntype NONE 

You may not be able to accomplish everything you need to do using wsadmin (eg. if you have to perform work against server nodes), but it will allow you to perform certain functions, like change your hostname (option 3).

Option 3

Change your host name to 127.0.0.1. Using Option 2, connect using conntype of NONE and change your server's host name. Refer to this guide http://java.boot.by/ibm-317/apas02.html for the steps on how to do that. Once you've change the host name, restart WebSphere and you should then be able to connect to wsadmin without the conntype or host/port parameters. Note that these commands have to be run directly against the server that you want to change, so make sure you start wsadmin from the right profile folder (not WebSphere\AppServer\bin):

cd c:\IBM\WebSphere\AppServer\profiles\ODMSample8810\bin\
wsadmin.bat -lang jython -username [username] -password [password] -conntype NONE

wsadmin>myserver = AdminConfig.list('ServerIndex')
wsadmin>AdminConfig.modify(myserver,  "[[hostName 127.0.0.1]]")
wsadmin>AdminConfig.show(myserver,  'hostName')
wsadmin>AdminConfig.save()