Activemq can't run due to address already in use error

前端 未结 16 1378
余生分开走
余生分开走 2021-02-12 18:06

How to solve the error?

Java Runtime: Oracle Corporation 1.7.0_05 E:\\Program Files\\Java\\jdk1.7.0_05\\jre
  Heap sizes: current=1004928k  free=994439k  max=100         


        
相关标签:
16条回答
  • 2021-02-12 18:48

    Go to installation_folder/conf folder and open up activemq.xml file. On the file look for transport connectors. You can change the port value from there. I changed it to 6616 from 61616. I could not see what process was using it in windows by running netstat -ao command.

    <transportConnectors>
            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
            <transportConnector name="openwire" uri="tcp://0.0.0.0:6616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
        </transportConnectors>
    
    0 讨论(0)
  • 2021-02-12 18:49

    Sometimes this error is caused when you have Mosquitto installed alongside ActiveMQ. this is a port number conflict caused by Mosquitto MQTT service running on port 1883 whiles Activemq server MQTT feature tries to run on that port. What you have to do is to either edit the mqtt conntector port in the conf/activemq.xml or commenting that line out like this

    <!-- <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/> --> 
    

    Then start the service again

    0 讨论(0)
  • 2021-02-12 18:51

    ERROR | Failed to start Artemis JMS Message Broker. Reason: Address already in use

    In my case i had to make kill the process that was using 8161 in bootstrap.xml (in etc folder)

    Following below steps to find PID and kill the process

    1. find the process id that is using this port (in your case, 8161). In command prompt write: netstat -a -o -n and look at the process id.
    2. Next kill the process by typing: taskkill /F /PID "process id" by running the command prompt in administrator mode
    0 讨论(0)
  • 2021-02-12 18:55

    If you are using a java code. Try a check like this.

            if (!brokerService.isStarted()) {
                System.out.println("Bringing up the ActiveMQ Broker");
                brokerService.addConnector("tcp://localhost:61616");
                brokerService.setBrokerName("Broker");
                brokerService.setUseJmx(true);
                brokerService.start();
            } else {
                System.out.println("ActiveMQ Broker already started");
            }
    
    0 讨论(0)
  • 2021-02-12 18:57

    I run into this issue when deploying an embedded active MQ broker as part of a application based on Apache Camel on a Windows Server 2012R2 host. I followed the advice of posted above and changed the port to which the broker was bound (from 61616 to 6616)

    0 讨论(0)
  • 2021-02-12 19:00

    Try running it with admin rights.

    In windows- Go to the directory -apache-activemq-5.4.3\bin and Right click on activemq.bat and run as administrator.

    Cheers

    0 讨论(0)
提交回复
热议问题