Hostname
如何更改 Websphere Portal Server 6.1 的主機名
我有一個帶有 Websphere Application Server 6.1.0.35 和 Websphere Portal Server 6.1.0.5 的系統。現在我更改了主機名。
由於有關這方面的官方 IBM 說明不再可用(400 Bad Request) - 我如何告訴 Websphere Portal 它的主機名已更改?這必須完成,尤其是預設的計劃任務之一,即拋出 UnknownHostException(見下文)。
我已經對安裝目錄中的所有 .xml 和 .properties 文件進行了搜尋和替換。
[28.07.11 11:22:17:241 CEST] 0000008e ORBRas E com.ibm.ws.security.orbssl.WSSSLClientSocketFactoryImpl createSSLSocket WebContainer : 1 JSSL0130E: java.io.IOException: Zeigt an, dass eine E/A-Ausnahme eingetreten ist. Ursache: oldhostname.my.domain java.net.UnknownHostException: oldhostname.my.domain at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:236) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:389) at java.net.Socket.connect(Socket.java:556) at com.ibm.jsse2.pc.connect(pc.java:282) at com.ibm.jsse2.pc.<init>(pc.java:292) at com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:9) at com.ibm.ws.security.orbssl.WSSSLClientSocketFactoryImpl.createSSLSocket(WSSSLClientSocketFactoryImpl.java:288) at com.ibm.ws.orbimpl.transport.WSSSLTransportConnection.createSocket(WSSSLTransportConnection.java:231) at com.ibm.ws.orbimpl.transport.WSSSLTransportConnection.createSocket(WSSSLTransportConnection.java:310) at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:356) at com.ibm.ws.orbimpl.transport.WSTransport$1.run(WSTransport.java:495) at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) at com.ibm.ws.orbimpl.transport.WSTransport.getConnection(WSTransport.java:492) at com.ibm.CORBA.transport.TransportBase.getConnection(TransportBase.java:187) at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:93) at com.ibm.rmi.iiop.GIOPImpl.getConnection(GIOPImpl.java:129) at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:205) at com.ibm.rmi.corba.ClientDelegate.locate(ClientDelegate.java:1966) at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:1991) at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1155) at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1270) at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1327) at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1131) at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1293) at com.ibm.rmi.corba.ClientDelegate.request(ClientDelegate.java:1869) at com.ibm.CORBA.iiop.ClientDelegate.request(ClientDelegate.java:1249) at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:458) at com.ibm.websphere.scheduler._NotificationSinkHome_Stub.create(_NotificationSinkHome_Stub.java:214) at com.ibm.ws.scheduler.NotificationSinkHolder.createBeanInstance(NotificationSinkHolder.java:273) at com.ibm.ws.scheduler.NotificationSinkHolder.fireEvent(NotificationSinkHolder.java:188) at com.ibm.ws.scheduler.NotificationSinkHolder.sendNotificationToListeners(NotificationSinkHolder.java:176) at com.ibm.ws.scheduler.SchedulerImpl.fireNotification(SchedulerImpl.java:2538) at com.ibm.ws.scheduler.SchedulerImpl$2.run(SchedulerImpl.java:976) at java.security.AccessController.doPrivileged(AccessController.java:241) at com.ibm.ws.scheduler.SchedulerImpl.cancel(SchedulerImpl.java:917) at com.ibm.wps.datastore.ejb.cleanup.SchedulerManagerBean.createUniqueTask(SchedulerManagerBean.java:179) at com.ibm.wps.datastore.ejb.cleanup.EJSRemoteStatelessSchedulerManager_03598d10.createUniqueTask(Unknown Source) at com.ibm.wps.datastore.ejb.cleanup._SchedulerManager_Stub.createUniqueTask(_SchedulerManager_Stub.java:273) at com.ibm.wps.command.scheduler.UpdateSchedulerTaskCommand.internalExecute(UpdateSchedulerTaskCommand.java:210) at com.ibm.wps.command.scheduler.AbstractSchedulerTaskCommand$1.run(AbstractSchedulerTaskCommand.java:189) at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4193) at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4290) at com.ibm.wps.command.scheduler.AbstractSchedulerTaskCommand.execute(AbstractSchedulerTaskCommand.java:196) at com.ibm.wps.ai.scheduler.AITaskScheduler.registerTasksInternal(AITaskScheduler.java:210) at com.ibm.wps.ai.scheduler.AITaskScheduler.registerTasks(AITaskScheduler.java:114) at com.ibm.wps.ai.scheduler.AITaskScheduler.registerTasks(AITaskScheduler.java:84) at com.ibm.wps.ai.scheduler.AITaskScheduler.beginRequest(AITaskScheduler.java:379) at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.ibm.wps.cei.ControllerImpl$Group$Handler.invoke(ControllerImpl.java:471) at $Proxy15.beginRequest(Unknown Source) 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.wps.services.events.ReflectHandler.invoke(ReflectHandler.java:94) at $Proxy16.beginRequest(Unknown Source) at com.ibm.wps.engine.Servlet.doGet(Servlet.java:494) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1258) at com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:648) at com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:93) at com.ibm.wps.engine.Servlet.service(Servlet.java:1249) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145) at com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:113) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:191) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:381) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:94) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:848) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:691) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3574) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
在 WebSphere 安裝中更改主機名沒有簡單或快速的方法。我唯一能想到的就是在漂亮的 xml 文件中找到對舊主機名的所有引用並更改它。之後,您可能還需要重命名您的 was/wps 配置文件中的很多文件。
然後在您嘗試再次啟動配置文件時祈禱一下。
要消除“錯誤”消息,只需將舊主機名添加到 etc/hosts,以便 java 可以將其解析為有用的東西並重新啟動 jvm。
Google搜尋實際上為我找到了多個有用的點擊。總之,執行此操作的方法似乎是使用 wsadmin 腳本:
AdminTask.changeHostName('[-nodeName <node_name> -hostName <new_host_name>]')