【问题标题】:WSAdmin Error Creating SOAP ConnectionWSAdmin 创建 SOAP 连接时出错
【发布时间】:2014-09-30 21:44:18
【问题描述】:

当我运行以下命令时,它最终会失败并显示错误。

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:创建与主机“165.226.165.136”的“SOAP”连接时出错;异常信息:com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=无法找到主机 165.226.111.111 的有效 IP]
WASX7213I: 此脚本客户机未连接到服务器进程;请参阅日志文件 D:\WAS\V70\AppServer\profiles\logs\wsadmin.traceout 以获取更多信息。 WASX8011W: AdminTask 对象不可用。

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.

【问题讨论】:

  • 您确定,您指定了正确的主机/端口对吗?您是否尝试使用 telnet 来查看是否能够访问该主机/端口?也许您有一些防火墙阻止了您的通信。跟踪中的端口也与命令中的端口不同。

标签: web-services soap websphere wsadmin


【解决方案1】:

如果您登录到 WebSphere 控制台,并导航到服务器 > 服务器类型 > WebSphere 应用程序服务器,您应该会看到您的主机名不是 localhost:

您至少有三个选项可以解决此问题...

选项 1

使用主机和端口参数启动 wsadmin:

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

请注意,此选项可能会导致以下错误:

SRVE0255E: 处理 NNN.NNN.NNN.NNN:NNNN 的 Web 组/虚拟主机具有 未定义。

...这超出了此答案的范围,但可以通过一些谷歌搜索来解决。

选项 2

在 conntype 参数设置为 NONE 的情况下启动 wsadmin。

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

您可能无法使用 wsadmin 完成您需要做的所有事情(例如,如果您必须对服务器节点执行工作),但它允许您执行某些功能,例如更改您的主机名(选项 3)。

选项 3

将您的主机名更改为 127.0.0.1。使用选项 2,使用 NONE 的 conntype 进行连接并更改服务器的主机名。有关如何执行此操作的步骤,请参阅本指南 http://java.boot.by/ibm-317/apas02.html。更改主机名后,重新启动 WebSphere,然后您应该能够在没有 conntype 或 host/port 参数的情况下连接到 wsadmin。请注意,这些命令必须直接针对您要更改的服务器运行,因此请确保从正确的配置文件文件夹(而不是 WebSphere\AppServer\bin)启动 wsadmin:

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()

【讨论】:

  • 我收到了 Soap 异常和“无法解组 Soap RPC 调用”,因为我已将路径设置为主 bin,而不是配置文件 bin。你的最后一句话对我最有帮助。谢谢。
猜你喜欢
  • 1970-01-01
  • 2021-06-14
  • 1970-01-01
  • 2013-07-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-24
  • 2021-12-27
相关资源
最近更新 更多