对WebSphere6的某一参数修改后,重启服务,想查看修改的效果,结果修改前后没变化,于是怀疑是否重新启动成功,查看日志,果真出问题了:
************* End Display Current Environment ************* [13-6-28 11:12:45:242 CST] 0000000a BundleResolve 3 found resource bundle com.ibm.ejs.resources.RasMessages in OSGi bundle com.ibm.ws.portletcontainer.internal [13-6-28 11:12:45:239 CST] 0000000a ManagerAdmin I TRAS0017I: 启动跟踪状态是 *=info:com.ibm.*=all。 [13-6-28 11:12:45:248 CST] 0000000a WsServerContr 1 Executing executeUtilityOnWindows with args: F:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\config whaleNode01Cell whaleNode01 server1 -fromWinService \\.\pipe\w6SvcPipe_29F77_122A0 -username xxx -password ******** [13-6-28 11:12:45:249 CST] 0000000a WsServerContr 1 invokedByWindowsService has been set to true earlier [13-6-28 11:12:45:249 CST] 0000000a ManagerAdmin I TRAS0018I: 跟踪状态已更改。新的跟踪状态是 *=info。 [13-6-28 11:12:45:671 CST] 0000000a AdminTool A ADMU0128I: 正在启动具有 AppSrv01 概要文件的工具 [13-6-28 11:12:45:672 CST] 0000000a AdminTool A ADMU3100I: 正在从服务器读取配置:server1 [13-6-28 11:12:49:273 CST] 0000000a SSLConfig W CWPKI0041W: 一个或多个密钥库正在使用缺省密码。 [13-6-28 11:12:49:295 CST] 0000000a SSLConfigMana I CWPKI0027I: 对 HTTPS URL 连接禁用缺省主机名验证。 [13-6-28 11:12:50:240 CST] 0000000a WsServerStop E ADMU3002E: 尝试处理服务器 server1 时发生异常 [13-6-28 11:12:50:241 CST] 0000000a WsServerStop E ADMU3007E: 异常 com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: 启用 SOAP 连接器安全性时,系统无法创建连接到端口 8880 上的主机 whale 的 SOAP 连接器。 [13-6-28 11:12:50:242 CST] 0000000a WsServerStop A ADMU3007E: 异常 com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: 启用 SOAP 连接器安全性时,系统无法创建连接到端口 8880 上的主机 whale 的 SOAP 连接器。 at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:527) at com.ibm.websphere.management.AdminClientFactory.access$000(AdminClientFactory.java:107) at com.ibm.websphere.management.AdminClientFactory$1.run(AdminClientFactory.java:185) at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63) at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:181) at com.ibm.ws.management.tools.LaunchUtils.getAdminClient(LaunchUtils.java:372) at com.ibm.ws.management.tools.LaunchUtils.getAdminClient(LaunchUtils.java:312) at com.ibm.ws.management.tools.WsServerStop.runTool(WsServerStop.java:332) at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:263) at com.ibm.ws.management.tools.WsServerController.executeUtilityOnWindows(WsServerController.java:136) at com.ibm.ws.management.tools.WsServerStop.main(WsServerStop.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:183) at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:90) at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:72) 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:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) 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:339) at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:94) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:522) at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:382) ... 31 more Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found] at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:354) at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:184) ... 36 more Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found] at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:449) at org.apache.soap.rpc.Call.WASinvoke(Call.java:433) at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:319) at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:312) ... 37 more [13-6-28 11:12:50:256 CST] 0000000a AdminTool A ADMU0509I: 无法到达 server“server1”。服务器看上去已停止。 [13-6-28 11:12:50:257 CST] 0000000a AdminTool A ADMU0211I: 在文件 F:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\stopServer.log 中可看到错误的详细信息 [13-6-28 11:12:50:290 CST] 00000010 WindowsServic 3 inputRec == Service failed to stop. stopServer return code -10 [13-6-28 11:12:50:292 CST] 0000000a WindowsServic 1 retCode from childProcess.waitFor() is -10 [13-6-28 11:12:50:293 CST] 0000000a WindowsServic 3 -- interrupt the thread that is collecting stdout [13-6-28 11:12:51:293 CST] 0000000f WindowsServic 3 readAndDisplayServiceLogFile(), caught InterruptedException [13-6-28 11:12:51:293 CST] 0000000a WindowsServic 3 exitCode = -10 [13-6-28 11:12:51:293 CST] 0000000a WindowsServic 3 Service failed to stop. stopServer return code -10 [13-6-28 11:12:51:299 CST] 0000000a AdminTool A ADMU7705E: 在尝试停止与服务器相关联的 Windows 服务时失败:server1; 在执行 WASService.exe 时可能发生了错误: Service failed to stop. stopServer return code -10
异常的关键在于这一句:
异常 com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: 启用 SOAP 连接器安全性时,系统无法创建连接到端口 8880 上的主机 whale 的 SOAP 连接器。
启用SOAP连接器安全性验证后,WAS会通过SOAP_CONNECTOR_ADDRESS设置的端口来验证安全性,这个端口设置是在 "服务器---应用程序服务器---server---端口"部分操作,查看第二列的名字是否与你的主机名字相同,
最后说下解决方案:
Window:在C:\WINDOWS\system32\drivers\etc目录下的Hosts中添加你的IP和之前的主机名就可以了(或者改成你的IP和localhost)
eg:
127.0.0.1 whale
127.0.0.1 localhost
Linux同理,文件位置在 /etc/hosts文件下。
修改后,如果是在window下关闭并重新启动websphere服务,会在cmd命令下提示把安全验证加入安全列表什么的,选择Y,然后会弹出一个窗体,第一行忽视,默认即可,第二行和第三行分别输入websphere登陆的用户名和密码,over。