当前位置:   article > 正文

linux下springboot项目无法启动(80端口被占用却查不到)_port 80 is already in use. 但是找不到占用的端口 linux

port 80 is already in use. 但是找不到占用的端口 linux

 通过下面的方式启动项目时发现报错了

  1. 命令: java -jar project.jar
  2. ***************************
  3. APPLICATION FAILED TO START
  4. ***************************
  5. Description:
  6. Web server failed to start. Port 80 was already in use.
  7. Action:
  8. Identify and stop the process that's listening on port 80
  9. or configure this application to listen on another port.

 可通过 netstat 命令却查不到任何其它进程占用的提示信息. 猜测是项目内部的问题.

触发条件:

springboot 版本 2.7.8

配置端口和ssl如下:

  1. server:
  2. port: 80
  3. tomcat:
  4. max-http-header-size: 9000
  5. ssl:
  6. enabled: true
  7. key-store: /project/ssl/certificate.pfx
  8. key-store-type: PKCS12
  9. key-store-password: 123456

解读:

项目启动日志中有这样一句日志:

Tomcat initialized with port(s): 80 (https) 80 (http)

说明本该配置ssl为443的端口却再次配置到了80

纠正:

  1. server:
  2. port: 443
  3. tomcat:
  4. max-http-header-size: 9000
  5. ssl:
  6. enabled: true
  7. key-store: /project/ssl/certificate.pfx
  8. key-store-type: PKCS12
  9. key-store-password: 123456

这时候应该就好了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/707211
推荐阅读
相关标签
  

闽ICP备14008679号