2017年9月13日 | Leave a comment 问题: wildfly swarm jar 在本地时好的,但是把jar 部署到docker 运行就报错 Could not start ‘default’ listener. 2017-09-13 01:22:41,378 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service jboss.undertow.listener.default: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener. 2017-09-13 01:22:41,537 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Swarm 2017.9.4 (WildFly Core 2.2.1.Final) started (with errors) in 3148ms - Started 67 of 76 services (1 services failed or missing dependencies, 14 services are lazy, passive or on-demand) 2017-09-13 01:22:41,566 ERROR [stderr] (main) java.lang.reflect.InvocationTargetException 2017-09-13 01:22:41,567 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2017-09-13 01:22:41,569 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2017-09-13 01:22:41,570 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2017-09-13 01:22:41,571 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498) 2017-09-13 01:22:41,573 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:54) 2017-09-13 01:22:41,575 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:133) 2017-09-13 01:22:41,576 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:86) 2017-09-13 01:22:41,578 ERROR [stderr] (main) Caused by: java.lang.RuntimeException: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener. 2017-09-13 01:22:41,578 ERROR [stderr] (main) at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:45) 2017-09-13 01:22:41,579 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:114) 2017-09-13 01:22:41,579 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.start(Swarm.java:375) 2017-09-13 01:22:41,579 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:631) 2017-09-13 01:22:41,580 ERROR [stderr] (main) ... 7 more 2017-09-13 01:22:41,581 ERROR [stderr] (main) Caused by: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener. 2017-09-13 01:22:41,581 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:153) 2017-09-13 01:22:41,581 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 2017-09-13 01:22:41,582 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 2017-09-13 01:22:41,582 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2017-09-13 01:22:41,582 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2017-09-13 01:22:41,583 ERROR [stderr] (main) at java.lang.Thread.run(Thread.java:745) 2017-09-13 01:22:41,583 ERROR [stderr] (main) Caused by: java.net.SocketException: Protocol family unavailable 2017-09-13 01:22:41,584 ERROR [stderr] (main) at sun.nio.ch.Net.bind0(Native Method) 2017-09-13 01:22:41,584 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:433) 2017-09-13 01:22:41,584 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:425) 2017-09-13 01:22:41,585 ERROR [stderr] (main) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) 2017-09-13 01:22:41,586 ERROR [stderr] (main) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) 2017-09-13 01:22:41,586 ERROR [stderr] (main) at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:171) 2017-09-13 01:22:41,587 ERROR [stderr] (main) at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:245) 2017-09-13 01:22:41,587 ERROR [stderr] (main) at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126) 2017-09-13 01:22:41,587 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142) 2017-09-13 01:22:41,588 ERROR [stderr] (main) ... 5 more 2017-09-13 01:22:41,589 ERROR [stderr] (main) Exception in thread "main" java.lang.reflect.InvocationTargetException 2017-09-13 01:22:41,589 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2017-09-13 01:22:41,589 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2017-09-13 01:22:41,590 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2017-09-13 01:22:41,590 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498) 2017-09-13 01:22:41,591 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:54) 2017-09-13 01:22:41,591 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:133) 2017-09-13 01:22:41,592 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:86) 2017-09-13 01:22:41,592 ERROR [stderr] (main) Caused by: java.lang.RuntimeException: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener. 2017-09-13 01:22:41,594 ERROR [stderr] (main) at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:45) 2017-09-13 01:22:41,595 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:114) 2017-09-13 01:22:41,595 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.start(Swarm.java:375) 2017-09-13 01:22:41,596 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:631) 2017-09-13 01:22:41,598 ERROR [stderr] (main) ... 7 more 2017-09-13 01:22:41,599 ERROR [stderr] (main) Caused by: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener. 2017-09-13 01:22:41,599 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:153) 2017-09-13 01:22:41,600 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) 2017-09-13 01:22:41,601 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) 2017-09-13 01:22:41,602 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2017-09-13 01:22:41,604 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2017-09-13 01:22:41,605 ERROR [stderr] (main) at java.lang.Thread.run(Thread.java:745) 2017-09-13 01:22:41,606 ERROR [stderr] (main) Caused by: java.net.SocketException: Protocol family unavailable 2017-09-13 01:22:41,607 ERROR [stderr] (main) at sun.nio.ch.Net.bind0(Native Method) 2017-09-13 01:22:41,608 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:433) 2017-09-13 01:22:41,608 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:425) 2017-09-13 01:22:41,609 ERROR [stderr] (main) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) 2017-09-13 01:22:41,610 ERROR [stderr] (main) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) 2017-09-13 01:22:41,611 ERROR [stderr] (main) at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:171) 2017-09-13 01:22:41,612 ERROR [stderr] (main) at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:245) 2017-09-13 01:22:41,613 ERROR [stderr] (main) at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126) 2017-09-13 01:22:41,613 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142) 2017-09-13 01:22:41,614 ERROR [stderr] (main) ... 5 more 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 2017-09-13 01:22:41,378 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status reportWFLYCTL0186: Services which failed to start: service jboss.undertow.listener.default: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener. 2017-09-13 01:22:41,537 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Swarm 2017.9.4 (WildFly Core 2.2.1.Final) started (with errors) in 3148ms - Started 67 of 76 services (1 services failed or missing dependencies, 14 services are lazy, passive or on-demand)2017-09-13 01:22:41,566 ERROR [stderr] (main) java.lang.reflect.InvocationTargetException2017-09-13 01:22:41,567 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)2017-09-13 01:22:41,569 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)2017-09-13 01:22:41,570 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)2017-09-13 01:22:41,571 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498)2017-09-13 01:22:41,573 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:54)2017-09-13 01:22:41,575 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:133)2017-09-13 01:22:41,576 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:86)2017-09-13 01:22:41,578 ERROR [stderr] (main) Caused by: java.lang.RuntimeException: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener.2017-09-13 01:22:41,578 ERROR [stderr] (main) at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:45)2017-09-13 01:22:41,579 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:114)2017-09-13 01:22:41,579 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.start(Swarm.java:375)2017-09-13 01:22:41,579 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:631)2017-09-13 01:22:41,580 ERROR [stderr] (main) ... 7 more2017-09-13 01:22:41,581 ERROR [stderr] (main) Caused by: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener.2017-09-13 01:22:41,581 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:153)2017-09-13 01:22:41,581 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)2017-09-13 01:22:41,582 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)2017-09-13 01:22:41,582 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)2017-09-13 01:22:41,582 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)2017-09-13 01:22:41,583 ERROR [stderr] (main) at java.lang.Thread.run(Thread.java:745)2017-09-13 01:22:41,583 ERROR [stderr] (main) Caused by: java.net.SocketException: Protocol family unavailable2017-09-13 01:22:41,584 ERROR [stderr] (main) at sun.nio.ch.Net.bind0(Native Method)2017-09-13 01:22:41,584 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:433)2017-09-13 01:22:41,584 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:425)2017-09-13 01:22:41,585 ERROR [stderr] (main) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)2017-09-13 01:22:41,586 ERROR [stderr] (main) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)2017-09-13 01:22:41,586 ERROR [stderr] (main) at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:171)2017-09-13 01:22:41,587 ERROR [stderr] (main) at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:245)2017-09-13 01:22:41,587 ERROR [stderr] (main) at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126)2017-09-13 01:22:41,587 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142)2017-09-13 01:22:41,588 ERROR [stderr] (main) ... 5 more2017-09-13 01:22:41,589 ERROR [stderr] (main) Exception in thread "main" java.lang.reflect.InvocationTargetException2017-09-13 01:22:41,589 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)2017-09-13 01:22:41,589 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)2017-09-13 01:22:41,590 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)2017-09-13 01:22:41,590 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498)2017-09-13 01:22:41,591 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:54)2017-09-13 01:22:41,591 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:133)2017-09-13 01:22:41,592 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:86)2017-09-13 01:22:41,592 ERROR [stderr] (main) Caused by: java.lang.RuntimeException: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener.2017-09-13 01:22:41,594 ERROR [stderr] (main) at org.wildfly.swarm.spi.api.ClassLoading.withTCCL(ClassLoading.java:45)2017-09-13 01:22:41,595 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.ServerBootstrapImpl.bootstrap(ServerBootstrapImpl.java:114)2017-09-13 01:22:41,595 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.start(Swarm.java:375)2017-09-13 01:22:41,596 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:631)2017-09-13 01:22:41,598 ERROR [stderr] (main) ... 7 more2017-09-13 01:22:41,599 ERROR [stderr] (main) Caused by: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: WFLYUT0082: Could not start 'default' listener.2017-09-13 01:22:41,599 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:153)2017-09-13 01:22:41,600 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)2017-09-13 01:22:41,601 ERROR [stderr] (main) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)2017-09-13 01:22:41,602 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)2017-09-13 01:22:41,604 ERROR [stderr] (main) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)2017-09-13 01:22:41,605 ERROR [stderr] (main) at java.lang.Thread.run(Thread.java:745)2017-09-13 01:22:41,606 ERROR [stderr] (main) Caused by: java.net.SocketException: Protocol family unavailable2017-09-13 01:22:41,607 ERROR [stderr] (main) at sun.nio.ch.Net.bind0(Native Method)2017-09-13 01:22:41,608 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:433)2017-09-13 01:22:41,608 ERROR [stderr] (main) at sun.nio.ch.Net.bind(Net.java:425)2017-09-13 01:22:41,609 ERROR [stderr] (main) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)2017-09-13 01:22:41,610 ERROR [stderr] (main) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)2017-09-13 01:22:41,611 ERROR [stderr] (main) at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:171)2017-09-13 01:22:41,612 ERROR [stderr] (main) at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:245)2017-09-13 01:22:41,613 ERROR [stderr] (main) at org.wildfly.extension.undertow.HttpListenerService.startListening(HttpListenerService.java:126)2017-09-13 01:22:41,613 ERROR [stderr] (main) at org.wildfly.extension.undertow.ListenerService.start(ListenerService.java:142)2017-09-13 01:22:41,614 ERROR [stderr] (main) ... 5 more 解决: java -jar -Djava.net.preferIPv4Stack=true ***.jar 1 java -jar -Djava.net.preferIPv4Stack=true ***.jar 应该是由于wildfly swarm 没有处理好 ipv6 引起的 参考: http://www.cnblogs.com/amoyzhu/p/6912763.html