Skip to content

启动tomcat一直提示JMX端口被占用

  • 问题描述:启动tomcat一直提示JMX端口被占用,但是端口实际上没有被占用,通过下面命令查看端口发现并未被占用

    shell
    netstat -ano | findstr <端口>
  • 问题原因:电脑开启了 Hiper-V 服务,可以通过下面命令查看Hyper-V保留的端口

    shell
    netsh interface ipv4 show excludedportrange protocol=tcp

    image-20250924121704516

  • 问题解决方案:选择一个不在上面范围的端口作为JMX port即可

MIT版权,未经许可禁止任何形式的转载