Tomcat服务器启动Bug:Error running ‘Tomcat 9.0.37‘: Address localhost:1099 is already in use

1 出现的错误

在IDEA中启动Tomcat是出现Error running ‘Tomcat 8.5.97‘: Address localhost:1099 is already in use

Tomcat服务器启动Bug:Error running ‘Tomcat 9.0.37‘: Address localhost:1099 is already in use_第1张图片

 

或者:

Tomcat服务器启动Bug:Error running ‘Tomcat 9.0.37‘: Address localhost:1099 is already in use_第2张图片

或者:

Tomcat服务器启动Bug:Error running ‘Tomcat 9.0.37‘: Address localhost:1099 is already in use_第3张图片

或者在IDEA报的以下错误:

“E:\Tomcat\tomcat 8\apache-tomcat-8.5.69\bin\catalina.bat” run
[2021-08-30 03:14:49,880] Artifact jspDemo2021830:war exploded: Waiting for server connection to start artifact deployment…
Using CATALINA_BASE: “C:\Users\13288\AppData\Local\JetBrains\IntelliJIdea2021.2\tomcat\3b93619d-1539-4357-b492-cf9d388bd4db”
Using CATALINA_HOME: “E:\Tomcat\tomcat 8\apache-tomcat-8.5.69”
Using CATALINA_TMPDIR: “E:\Tomcat\tomcat 8\apache-tomcat-8.5.69\temp”
Using JRE_HOME: “E:\JDK1.8.301”
Using CLASSPATH: “E:\Tomcat\tomcat 8\apache-tomcat-8.5.69\bin\bootstrap.jar;E:\Tomcat\tomcat 8\apache-tomcat-8.5.69\bin\tomcat-juli.jar”
Using CATALINA_OPTS: “”
����: �����׳��쳣����: java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
sun.management.AgentConfigurationError: java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:480)
at sun.management.Agent.startAgent(Agent.java:262)
at sun.management.Agent.startAgent(Agent.java:452)
Caused by: java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:346)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:254)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:412)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:237)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:213)
at sun.rmi.registry.RegistryImpl.(RegistryImpl.java:173)
at sun.management.jmxremote.SingleEntryRegistry.(SingleEntryRegistry.java:49)
at sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:816)
at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:468)
… 2 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:102)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:513)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:180)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.(ServerSocket.java:237)
at java.net.ServerSocket.(ServerSocket.java:128)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:345)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:670)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:335)
… 11 more
Disconnected from server

2 解决方法

一共有两种方法

2.1 第一种

Ctrl+Alt+. 启动任务管理器-->详情信息-->java.exe-->结束任务

(如果不能用请看第二种方法)

Tomcat服务器启动Bug:Error running ‘Tomcat 9.0.37‘: Address localhost:1099 is already in use_第4张图片

第二种方法

第一种操作过后,还不可以使用,在IDEA控制台报--   java.rmi.server.ExportException: Port already in use: 1099  --这样的错误,则使用以下方法

cond中输入:

netstat -ano|findstr 1099

看下哪个占用了1099这个端口

taskkill /t /f /im 14516

这样就可以了

Tomcat服务器启动Bug:Error running ‘Tomcat 9.0.37‘: Address localhost:1099 is already in use_第5张图片

 

你可能感兴趣的:(Java,Web,java,tomcat,服务器,bug)