xiaolong620
V2EX  ›  Java

idea 端口被占用

  •  
  •   xiaolong620 · Jun 25, 2019 · 4968 views
    This topic created in 2703 days ago, the information mentioned may be changed or developed.

    大家有没有遇到过 idea 总是出现端口被占用,cmd 查询的话没有结果运行 idea 就提示端口被占用,有的时候一开机启动 idea 就这样,有的时候是重启 tomcat 服务的时候,好头疼啊

    Supplement 1  ·  Jun 25, 2019
    JMX port
    10 replies  •  2019-06-25 14:22:23 +08:00
    leon0318
    leon0318
    Jun 25, 2019 via Android
    1
    查询占用端口什么服务,要么 kill 要么换端口
    xiaolong620
    xiaolong620
    OP
    Jun 25, 2019
    2
    @leonme netstat -ano | findstr 1099 是这个命令吗,是的话这个查询没有结果的
    leon0318
    leon0318
    Jun 25, 2019
    3
    @xiaolong620 #2 lsof -i:port
    xiaolong620
    xiaolong620
    OP
    Jun 25, 2019
    4
    @leonme 我自己本地没在服务器上
    airfling
    airfling
    Jun 25, 2019
    5
    tomcat 和 idea 都是监听 8080 端口,你改一下就好了
    cnzjl
    cnzjl
    Jun 25, 2019
    6
    本地的话,可能是你之前起了服务没有关闭吧,还有 IDEA 启动的时候你看看下运行配置有一个 JMX port,这个端口是否被占用
    szq8014
    szq8014
    Jun 25, 2019
    7
    你这提问题得。。哪个端口占用说一下?不同的端口有不同的解决方式,你准备让帮你的人猜吗?

    1. 8080 这种 http 端口就是之前的进程或者 QQ, weixin 等会偶尔占用,排查一下就能解决。
    2. 34567 这种 5 位数的端口,是 IDEA debug attache 端口,在 tomcat 配置页面的 startup/connection > debug 选项下的一个端口,改一下就行了。
    xiaolong620
    xiaolong620
    OP
    Jun 25, 2019
    8
    @cnzjl 我怀疑 idea 自己占用自己端口。。。换一个提示占用一个,重启几次电脑就好了(重启一次是不行的)现在的解决办法
    xiaolong620
    xiaolong620
    OP
    Jun 25, 2019
    9
    @xiaolong620 好的,谢大佬提醒,是 jmx port 老提示占用
    sumarker
    sumarker
    Jun 25, 2019
    10
    kill 端口啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2070 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 00:10 · PVG 08:10 · LAX 16:10 · JFK 19:10
    ♥ Do have faith in what you're doing.