环境
- Linux/Ubuntu20.04LTS
- IntelliJ IDEA Community Editon 2021.1
- java-11-openjdk-amd64
- apache-tomcat-7.0.109
异常
tomcat服务端口被占用!
严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8087"]
java.net.BindException: 地址已在使用 (Bind failed) <null>:8087
7月 14, 2021 9:45:36 下午 org.apache.catalina.core.StandardServer await
严重: StandardServer.await: create[localhost:8005]:
原因
- 端口地址已在使用,端口地址冲突
- 上次运行服务没有及时关闭,服务仍在运行,故造成端口冲突
方案
- 端口冲突,直接修改配置文件里的端口号后,重新运行项目
- 服务未及时关闭造成,关闭上次运行的服务,打开tomcat目录所在文件,直接关闭服务,执行 $ ./shutdown.sh
lauiji@lauiji-IdeaPad-15sIML-2020:/usr/local/apache-tomcat-7.0.109/bin$ ./shutdown.sh
重新运行项目即可
说明
- 【遇上雨季,吃定彩虹】 --Layuji
- 由个人整理发布,编写过程难免有所遗漏或错误,恳请指出,以免误导大家!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。