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

前端 未结 16 1399
余生分开走
余生分开走 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: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");
            }
    

提交回复
热议问题