英文:
Getting HTTP Status 500 ? Internal Server Error while upgrading tomcat 7 to 8
问题
希望一切都好..!在将Tomcat 7升级到8时,我遇到了以下错误,而Tomcat正在8080端口上运行,但我的应用程序在8001端口上运行。我尝试在谷歌上搜索了这个问题,但是没有找到任何解决方法。虽然大多数人都建议安装一些库文件,但根据规定,我们不能下载并将它们放入应用程序中,因为它是客户端应用程序。
这里附上了错误和日志。请问有人可以帮助我解决这个问题吗?
08-Sep-2020 08:15:26.100 WARNING [main] org.apache.tomcat.util.digester.Digester.endElement No rules found matching 'Server/Service/Engine/Host/DefaultContext'.
08-Sep-2020 08:15:26.687 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.57
08-Sep-2020 08:15:26.688 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 30 2020 21:49:10 UTC
08-Sep-2020 08:15:26.688 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.57.0
08-Sep-2020 08:15:26.689 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: SunOS
08-Sep-2020 08:15:26.689 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.10
08-Sep-2020 08:15:26.690 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: sparcv9
08-Sep-2020 08:15:26.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/net/software/JDK/jdk1.8.0_77/jre
08-Sep-2020 08:15:26.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_77-b03
08-Sep-2020 08:15:26.692 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
08-Sep-2020 08:15:26.693 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/net/web/tomcat/apache-tomcat-8.5.57
08-Sep-2020 08:15:26.693 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/net/web/tomcat/apache-tomcat-8.5.57
08-Sep-2020 08:15:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/web/tomcat/apache-tomcat-8.5.57/conf/logging.properties
...
08-Sep-2020 08:15:59.641 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
08-Sep-2020 08:15:59.641 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
谢谢..!保持安全
英文:
Hope all are doing well..!
Am getting these errors while upgrading tomcat 7 to 8 And the tomcat is running on 8080 but my application is running on 8001.
I tried googling about this but am not getting any of those. All though most of them saying to install some lib files. But as per rules we can not download and put them in application as it is client application.
Here am attaching errors and logs.
Can anyone please help me to resolve this.
08-Sep-2020 08:15:26.687 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.57
08-Sep-2020 08:15:26.688 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 30 2020 21:49:10 UTC
08-Sep-2020 08:15:26.688 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.57.0
08-Sep-2020 08:15:26.689 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: SunOS
08-Sep-2020 08:15:26.689 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.10
08-Sep-2020 08:15:26.690 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: sparcv9
08-Sep-2020 08:15:26.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/net/software/JDK/jdk1.8.0_77/jre
08-Sep-2020 08:15:26.691 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_77-b03
08-Sep-2020 08:15:26.692 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
08-Sep-2020 08:15:26.693 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/net/web/tomcat/apache-tomcat-8.5.57
08-Sep-2020 08:15:26.693 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/net/web/tomcat/apache-tomcat-8.5.57
08-Sep-2020 08:15:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/web/tomcat/apache-tomcat-8.5.57/conf/logging.properties
08-Sep-2020 08:15:26.695 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
08-Sep-2020 08:15:26.696 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
08-Sep-2020 08:15:26.696 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
08-Sep-2020 08:15:26.697 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
08-Sep-2020 08:15:26.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
08-Sep-2020 08:15:26.698 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/web/tomcat/apache-tomcat-8.5.57
08-Sep-2020 08:15:26.699 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/web/tomcat/apache-tomcat-8.5.57
08-Sep-2020 08:15:26.819 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/web/tomcat/apache-tomcat-8.5.57/temp
08-Sep-2020 08:15:26.821 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [.:/topnet/lib:/usr/jdk/packages/lib/sparcv9:/lib/64:/usr/lib/64]
08-Sep-2020 08:15:29.000 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
08-Sep-2020 08:15:29.055 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1077)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:848)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:639)
at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
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:302)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:221)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1118)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:587)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1075)
... 13 more
08-Sep-2020 08:15:29.113 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
08-Sep-2020 08:15:29.121 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1077)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:848)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:639)
at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
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:302)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:221)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1118)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:587)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1075)
... 13 more
08-Sep-2020 08:15:29.581 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 6956 ms
08-Sep-2020 08:15:29.721 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
08-Sep-2020 08:15:29.722 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.57
08-Sep-2020 08:15:31.546 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Sep-2020 08:15:32.004 WARNING [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [331] milliseconds.
08-Sep-2020 08:15:33.171 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Sep-2020 08:15:33.343 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Sep-2020 08:15:33.587 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Sep-2020 08:15:34.185 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Sep-2020 08:15:34.214 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/CTPDauClient.war]
08-Sep-2020 08:15:47.718 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Sep-2020 08:15:54.769 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/CTPDauClient.war] has finished in [20,555] ms
08-Sep-2020 08:15:54.775 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/ROOT]
08-Sep-2020 08:15:54.844 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/ROOT] has finished in [69] ms
08-Sep-2020 08:15:54.845 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/docs]
08-Sep-2020 08:15:54.905 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/docs] has finished in [59] ms
08-Sep-2020 08:15:54.905 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/examples]
08-Sep-2020 08:15:58.993 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/examples] has finished in [4,088] ms
08-Sep-2020 08:15:58.995 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/host-manager]
08-Sep-2020 08:15:59.105 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/host-manager] has finished in [109] ms
08-Sep-2020 08:15:59.106 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/manager]
08-Sep-2020 08:15:59.192 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/manager] has finished in [85] ms
08-Sep-2020 08:15:59.193 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/data]
08-Sep-2020 08:15:59.293 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/net/web/tomcat/apache-tomcat-8.5.57/webapps/data] has finished in [99] ms
08-Sep-2020 08:15:59.352 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 29765 ms
08-Sep-2020 08:15:59.358 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:421)
at org.apache.catalina.startup.Catalina.await(Catalina.java:776)
at org.apache.catalina.startup.Catalina.start(Catalina.java:722)
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.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
08-Sep-2020 08:15:59.361 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
08-Sep-2020 08:15:59.362 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
08-Sep-2020 08:15:59.363 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
08-Sep-2020 08:15:59.565 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [CTPDauClient] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
08-Sep-2020 08:15:59.638 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
08-Sep-2020 08:15:59.639 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
08-Sep-2020 08:15:59.641 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
08-Sep-2020 08:15:59.641 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
答案1
得分: 1
你已经在相同的端口上运行了某个东西。可能是你的应用的旧版本。如果冲突在你的计算机重启后仍然存在,可以参考 https://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows 获取更多关于如何查找造成冲突的原因的信息。
英文:
You already have something running on the same port. Probably the old version of your application. Refer to https://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows for more info on how to figure out what is causing a conflict if it persists past a reboot of your machine.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论