Linux下Tomcat启动报错:port already in use

版权声明:不卑不亢,不骄不躁---好男人就是我,我就是曾哥. https://blog.csdn.net/weixin_42884584/article/details/84985057

Linux下Tomcat启动报错:port already in use,导致该问题的原因很多。

启动tomcat,报错如下:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8301; nested exception is:java.net.BindException: Address already in use

检查了${TOMCAT_HOME}/conf/server.xml,context.xml,web.xml等配置文件,未发现配置8301端口的地方。

于是从 ${TOMCAT_HOME}/bin/catalina.sh 启动文件中找到了答案。

JAVA_OPTS="-server -Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.pwd.file=/opt/app/appcode/jmxremote.password -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8301"

不知道这里配置是什么作用。时间原因暂不深究了,解决方式就是将这里的端口改一下就行。

猜你喜欢

转载自blog.csdn.net/weixin_42884584/article/details/84985057