https://www.centosblog.com/how-to-change-hostname-on-centos-linux/
设置hostname后,JBOSS启动报错 JBWS022117: Invalid address provided
从错误信息看,是在验证IP时失败:
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 50) JBAS014612: Operation ("add") failed - address: ([("subsystem" => "webservices")]): java.lang.IllegalArgumentException: JBWS022117: Invalid address provided: TCC_T1.mart.com
at org.jboss.ws.common.management.AbstractServerConfig.toIPv6URLFormat(AbstractServerConfig.java:129)
at org.jboss.ws.common.management.AbstractServerConfig.setWebServiceHost(AbstractServerConfig.java:115)
at org.jboss.as.webservices.dmr.WSSubsystemAdd.createServerConfig(WSSubsystemAdd.java:101)
at org.jboss.as.webservices.dmr.WSSubsystemAdd.performBoottime(WSSubsystemAdd.java:88)
at org.jboss.as.controller.AbstractBoottimeAddStepHandler.performRuntime(AbstractBoottimeAddStepHandler.java:57)
查询JBoss EAP 6.2使用的jbossws-common版本:jbossws-common-2.2.3.Final-redhat-1.jar
cd JBOSS_HOME/modules/system/layers/base/org/jboss/ws/common/main
查找其jbossws-common源码,下载2.x的版本,查看代码发现:
当hostname中包含下划线时,会被认为是无效的hostname,修改hostname为TCC-T1.mart.com,启动成功。