<tfoot id='UIbhF'></tfoot>
  • <i id='UIbhF'><tr id='UIbhF'><dt id='UIbhF'><q id='UIbhF'><span id='UIbhF'><b id='UIbhF'><form id='UIbhF'><ins id='UIbhF'></ins><ul id='UIbhF'></ul><sub id='UIbhF'></sub></form><legend id='UIbhF'></legend><bdo id='UIbhF'><pre id='UIbhF'><center id='UIbhF'></center></pre></bdo></b><th id='UIbhF'></th></span></q></dt></tr></i><div id='UIbhF'><tfoot id='UIbhF'></tfoot><dl id='UIbhF'><fieldset id='UIbhF'></fieldset></dl></div>

      <small id='UIbhF'></small><noframes id='UIbhF'>

        <bdo id='UIbhF'></bdo><ul id='UIbhF'></ul>
        <legend id='UIbhF'><style id='UIbhF'><dir id='UIbhF'><q id='UIbhF'></q></dir></style></legend>
      1. java.net.BindException:地址已在使用中:JVM_Bind

        java.net.BindException: Address already in use: JVM_Bind(java.net.BindException:地址已在使用中:JVM_Bind)
      2. <small id='9f5QU'></small><noframes id='9f5QU'>

        <tfoot id='9f5QU'></tfoot>
        <i id='9f5QU'><tr id='9f5QU'><dt id='9f5QU'><q id='9f5QU'><span id='9f5QU'><b id='9f5QU'><form id='9f5QU'><ins id='9f5QU'></ins><ul id='9f5QU'></ul><sub id='9f5QU'></sub></form><legend id='9f5QU'></legend><bdo id='9f5QU'><pre id='9f5QU'><center id='9f5QU'></center></pre></bdo></b><th id='9f5QU'></th></span></q></dt></tr></i><div id='9f5QU'><tfoot id='9f5QU'></tfoot><dl id='9f5QU'><fieldset id='9f5QU'></fieldset></dl></div>
      3. <legend id='9f5QU'><style id='9f5QU'><dir id='9f5QU'><q id='9f5QU'></q></dir></style></legend>

            <tbody id='9f5QU'></tbody>

                  <bdo id='9f5QU'></bdo><ul id='9f5QU'></ul>

                  本文介绍了java.net.BindException:地址已在使用中:JVM_Bind的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的服务器中有 2 个 tomcat 正在运行

                  I have 2 tomcats running in my server

                  一个是tomcat 7,一个是tomcat 8,第一个的配置文件server.xml是:

                  one Tomcat 7 and the other is tomcat 8, the configuration file server.xml for the first is:

                             <Connector port="8080" protocol="HTTP/1.1"
                             connectionTimeout="20000"
                             redirectPort="8443" />
                               ...
                             <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
                  

                  在第二个tomcat中有:

                  In the second tomcat have:

                              <Connector port="8080" protocol="HTTP/1.1"
                              connectionTimeout="20000"
                              redirectPort="8443" />
                              ...
                              <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
                  

                  但是当我运行第一个 tomcat 时,控制台说

                  but when I run the first tomcat the console say

                  java.net.BindException: Address already in use: JVM_Bind
                  at java.net.DualStackPlainSocketImpl.bind0(Native Method)
                  at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
                  at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
                  at java.net.PlainSocketImpl.bind(Unknown Source)
                  at java.net.ServerSocket.bind(Unknown Source)
                  at java.net.ServerSocket.<init>(Unknown Source)
                  at org.apache.catalina.core.StandardServer.await(StandardServer.java:420)
                  at org.apache.catalina.startup.Catalina.await(Catalina.java:713)
                  at org.apache.catalina.startup.Catalina.start(Catalina.java:659)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
                  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
                  

                  但第二次运行良好,我使用命令 netstate -tnao 并验证端口是免费的

                  but the second run good, i using the command netstate -tnao and i verified that the ports are free

                  推荐答案

                  <Connector port="8080" protocol="HTTP/1.1"
                         connectionTimeout="20000"
                         redirectPort="8443" />
                  

                  8080 是服务器将运行的端口号.只有一个服务器(您将首先启动)将运行.其他的会抛出 Jvm Bind Exception.

                  8080 is the port number on which server will run. Only one server (which you will start first) would run. Other one will throw Jvm Bind Exception.

                  所以,更改端口号,使它们是唯一的.

                  So, change the port number so that they are unique.

                  你运行第一台服务器然后使用 netstat 命令查看正在使用的端口.

                  One you run first server then use netstat command to see the ports which are in use.

                  这篇关于java.net.BindException:地址已在使用中:JVM_Bind的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                        <bdo id='PbYYi'></bdo><ul id='PbYYi'></ul>

                        <small id='PbYYi'></small><noframes id='PbYYi'>

                      • <tfoot id='PbYYi'></tfoot>
                        <i id='PbYYi'><tr id='PbYYi'><dt id='PbYYi'><q id='PbYYi'><span id='PbYYi'><b id='PbYYi'><form id='PbYYi'><ins id='PbYYi'></ins><ul id='PbYYi'></ul><sub id='PbYYi'></sub></form><legend id='PbYYi'></legend><bdo id='PbYYi'><pre id='PbYYi'><center id='PbYYi'></center></pre></bdo></b><th id='PbYYi'></th></span></q></dt></tr></i><div id='PbYYi'><tfoot id='PbYYi'></tfoot><dl id='PbYYi'><fieldset id='PbYYi'></fieldset></dl></div>
                            <legend id='PbYYi'><style id='PbYYi'><dir id='PbYYi'><q id='PbYYi'></q></dir></style></legend>
                              <tbody id='PbYYi'></tbody>