Websphere报错"Cannot get canonical host name for server" 解决方法


今天帮人装一台Websphere,启动的时候报错:Cannot get canonical host name for server

[13-4-5 20:22:23:273 CST] 0000000a SystemErr     R Caused by: javax.naming.ConfigurationException: Cannot get canonical host name for server.
        at com.ibm.ws.security.core.SecurityConfig.getHostName(SecurityConfig.java:2978)
        at com.ibm.ws.security.core.SecurityConfig.setValues(SecurityConfig.java:1276)
        at com.ibm.ws.security.core.distSecurityComponentImpl.initializeSecurityConfig(distSecurityComponentImpl.java:805)
        at com.ibm.ws.security.core.distSecurityComponentImpl.initialize(distSecurityComponentImpl.java:239)
        at com.ibm.ws.security.core.SecurityComponentImpl.initialize(SecurityComponentImpl.java:90)
        at com.ibm.ws.runtime.component.ContainerImpl.initializeComponent(ContainerImpl.java:1338)
        at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:1136)
        at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:356)


 

这是一个很常见,且简单的问题很明显是找不到主机名.检查系统主机名的配置文件

/etc/sysconfig/network
/etc/hosts


发现hosts文件里居然是空的~添加上

127.0.0.1 localhost.localdomain localhost

再启动一次. 成功~

[root@localhost server1]# /opt/IBM/WebSphere/AppServer/profiles/server01/bin/startServer.sh server1
ADMU0116I: 正在文件
           /opt/IBM/WebSphere/AppServer/profiles/server01/logs/server1/startServer.log
           中记录工具信息
ADMU0128I: 正在启动具有 server01 概要文件的工具
ADMU3100I: 正在从服务器读取配置:server1
ADMU3200I: 服务器已启动。等待初始化状态。
ADMU3000I: 为电子商务开放服务器 server1;进程标识为
           4853 



 

你可能感兴趣的:(Linux相关)