简体   繁体   English

java.net.BindException: RMI 端口已在使用错误

[英]java.net.BindException: RMI port already in use Error

I have a web application running on Tomcat and after weekly maintenance it has suddenly stopped working.我有一个在 Tomcat 上运行的 Web 应用程序,在每周维护后它突然停止工作。 Looking into the logs, I get the following error:查看日志,我收到以下错误:

2015-06-22 10:10:03,351 [RMIStartThread] ERROR com.corda.ccutil - Found an  existing RMI
registry on 10.0.5.143 with port: 2021
java.net.BindException: RMI port already in use
    at com.corda.ccutil.te.a(te.java:43)
    at com.corda.cvserver.kb.run(kb.java:50)
    at java.lang.Thread.run(Unknown Source)

As indicated in some of other blogs where people had this problem ( Getting Port already in use: 6969; nested exception on tomcat while start up? ), I looked up what was using port 2021 using netstat -anob command.正如人们遇到此问题的其他一些博客所示( 获取端口已在使用中:6969;启动时在 tomcat 上嵌套异常? ),我使用netstat -anob命令查找了使用端口 2021 的netstat -anob Here is the output:这是输出:

在此处输入图片说明

Using tasklist to then find the process with PID 2700, i get the output:使用 tasklist 然后找到 PID 为 2700 的进程,我得到输出:

在此处输入图片说明

If its tomcat using the port 2021, why is there a problem then?如果它的tomcat使用的是2021端口,那为什么会出现问题呢? I have tried restarting the server, stopping and starting tomcat and the web application.我尝试重新启动服务器,停止并启动 tomcat 和 Web 应用程序。 The application seems to work fine locally, but doesn't open up on any other remote location.该应用程序似乎在本地运行良好,但在任何其他远程位置都无法打开。

Does anyone have any ideas about what might have gone wrong ?有没有人对可能出错的地方有任何想法?

Thanks!谢谢!

Probably because your tomcat had stopped suddenly without liberating the used port and resources.可能是因为你的tomcat突然停止了,没有释放使用的端口和资源。 You can face this situation for example if you're running Tomcat in your IDE like eclipse and then close Eclipse without shutting down the server so the resources used by the server will not be liberated.您可能会遇到这种情况,例如,如果您在 IDE 中像 Eclipse 一样运行 Tomcat,然后在不关闭服务器的情况下关闭 Eclipse,那么服务器使用的资源将不会被释放。

Just kill the process that use the ports and then restart your server and it will work fine.只需杀死使用端口的进程,然后重新启动服务器,它就会正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 jenkins 更新错误:java.net.BindException:地址已在使用中 - jenkins update error: java.net.BindException: Address already in use “java.net.BindException: Address already in use”错误的解决方案? - Solution to "java.net.BindException: Address already in use" error? java.net.BindException:地址已在使用中 - java.net.BindException: Address already in use “java.net.BindException:已经在使用的地址”当我已在同一端口上运行服务时 - “java.net.BindException: Address already in use” when I am already running a service on the same port ServerSocket端口问题(java.net.BindException:已在使用的地址:JVM_Bind) - ServerSocket port issue (java.net.BindException: Address already in use: JVM_Bind) java.net.BindException:地址已在使用中:JVM_Bind但没有端口在使用它 - java.net.BindException: Address already in use: JVM_Bind BUT NO port using it Java Linux:java.net.BindException:地址已在使用中 - Java Linux: java.net.BindException: Address already in use Hadoop-java.net.BindException:地址已在使用中 - Hadoop - java.net.BindException: Address already in use 如何解决java.net.BindException:地址已在使用中 - How to solve java.net.BindException: Address already in use 线程“ main”中的异常java.net.BindException:地址已在使用中 - Exception in thread “main” java.net.BindException: Address already in use
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM