运行Jboss 报错: 22:01:44,725 INFO [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-1) register: jboss.ws:context=,endpoint=org.tongda.busonline.facade.rest.impl.BusOnlineRestFacadeImpl 22:01:48,815 WARN [com.arjuna.ats.arjuna] (Transaction Expired Entry Monitor) ARJUNA012210: Unable to use InetAddress.getLocalHost() to resolve address. 22:01:49,153 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 22:03:20,960 INFO [stdout] (MSC service thread 1-2) 22:03:20,958 INFO [DruidDataSource] {dataSource-1} inited 22:03:26,238 INFO [stdout] (MSC service thread 1-2) 22:03:26,238 INFO [DruidDataSource] {dataSource-2} inited 22:04:05,074 INFO [stdout] (MSC service thread 1-2) 22:04:05,074 INFO [DruidDataSource] {dataSource-2} closed 22:04:05,076 INFO [stdout] (MSC service thread 1-2) 22:04:05,076 INFO [DruidDataSource] {dataSource-1} closed 22:04:05,273 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Error listenerStart 22:04:05,273 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Context [] startup failed due to previous errors 22:04:05,308 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: JBAS018040: Failed to start context at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
解决方法: 配置静态IP 修改/etc/hosts文件 配置上自己主机的主机名 /etc/sysconfig/network 注意自己的主机名是否和其它主机名冲突
[root@Test0 src]# vi /etc/hosts 添加自己的主机名到 127.0.0.1 后面 注意有空格 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 Test0 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6