由于我设置-Djava.net.preferIPv4Stack = true,我的Tomcat因为无法建立环回连接而抛出错误,但仍显示问题。
我正在使用Windows 8.1和jdk1.8.0_152。
我在网上尝试了很多问题,但没有帮助解决这个问题。
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.23
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 28 2017 10:30:11 UTC
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.23.0
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 8.1
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.3
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_152\jre
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_152-b16
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: H:\apache-tomcat-8.5.23
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: H:\apache-tomcat-8.5.23
28-Oct-2017 16:54:15.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=H:\apache-tomcat-8.5.23\conf\logging.properties
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=H:\apache-tomcat-8.5.23
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=H:\apache-tomcat-8.5.23
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=H:\apache-tomcat-8.5.23\temp
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.14] using APR version [1.6.2].
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
28-Oct-2017 16:54:15.567 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
28-Oct-2017 16:54:16.602 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2l 25 May 2017]
28-Oct-2017 16:54:16.821 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8082"]
28-Oct-2017 16:54:37.852 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8082"]
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:94)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:171)
at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
at java.nio.channels.Pipe.open(Pipe.java:155)
at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
at java.nio.channels.Selector.open(Selector.java:227)
at org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector(NioSelectorPool.java:66)
at org.apache.tomcat.util.net.NioSelectorPool.open(NioSelectorPool.java:130)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:227)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:982)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:245)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:620)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:66)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:997)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.startup.Catalina.load(Catalina.java:621)
at org.apache.catalina.startup.Catalina.load(Catalina.java:644)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
Caused by: java.net.ConnectException: Connection timed out: connect