最近部署在ubuntu下面的jenkins突然无法运行,就去找原因,先运行192.168.63.130:8080查看tomcat是否能够正常运行,结果无法打开tomcat默认界面
接着就去查启动日志
(1)日志位置: /usr/local/apache-tomcat/logs
进入该目录后使用命令: tail -f catalina.out
运行后该界面不要关闭,这是打印日志的
(2)进入/usr/local/apache-tomcat/bin
进入该目录后运行命令:./startup.sh
(3)这时候观察步骤1的位置,出现了如下日志
![](https://img.haomeiwen.com/i6323765/412f51ab4f38e068.png)
下面的任务就是分析日志,其中有两条
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
Caused by: java.net.BindException: Address already in use
初步判断端口被占用
(4)接着那就去修改端口
文件位置:/usr/local/apache-tomcat/conf/server.xml
接着我把端口修改成了8009,运行./startup.sh,还是报上面的错误
(5)抱着试试的态度,接着把能修改的都修改了,如图所示:
![](https://img.haomeiwen.com/i6323765/4bb5f405bb16b567.png)
最终进行运行验证,问题得到解决
![](https://img.haomeiwen.com/i6323765/dbb7c10ad92a9dcc.png)
网友评论