[ https://issues.apache.org/jira/browse/GERONIMO-4404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shawn Jiang updated GERONIMO-4404: ---------------------------------- Summary: ActiveMQ connectors default to 0.0.0.0 when ServerHostname is set to localhost or actual IP. (was: ActiveMQ connectors default to 0.0.0.0 when ServerHostname is set to localhost) I updated the title to ActiveMQ connectors default to 0.0.0.0 when ServerHostname is set to localhost *or* actual IP. from ActiveMQ connectors default to 0.0.0.0 when ServerHostname is set to localhost. Because I found that when the ServerHostname was set to the actual IP of the machine. The ActiveMQ will still bind to 0.0.0.0. * ActiveMQ works only with localhost and 127.0.0.1 ** 61613 0.0.0.0 ActiveMQ Transport Connector ** 61616 0.0.0.0 ActiveMQ Transport Connector GERONIMO-4404 fixed the localhost to 0.0.0.0 problem, but the real connector \ creation code in activemq is: \ {code:title="org.apache.activemq.transport.tcp.TcpTransportServer"} InetAddress addr = InetAddress.getByName(host); try { if (host.trim().equals("localhost") || \ addr.equals(InetAddress.getLocalHost())) { //#1 start the socket with 0.0.0.0 this.serverSocket = \ serverSocketFactory.createServerSocket(bind.getPort(), backlog); } else { //#2 start the socket with the ip spcified in addr. this.serverSocket = \ serverSocketFactory.createServerSocket(bind.getPort(), backlog, addr); } {code} Since if you config the real IP as a host setting, \ addr.equals(InetAddress.getLocalHost()) will allways be true so that the #1 will be \ used to start the socket with 0.0.0.0. I'm not sure if it's a bug of activemq, \ there's nothing we can do from geronimo side for now to fix this. > ActiveMQ connectors default to 0.0.0.0 when ServerHostname is set to > localhost or actual IP. > -------------------------------------------------------------------------------------------- > > Key: GERONIMO-4404 > URL: https://issues.apache.org/jira/browse/GERONIMO-4404 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: ActiveMQ > Affects Versions: 2.1.3 > Reporter: Donald Woods > Assignee: Donald Woods > Priority: Minor > Fix For: 2.1.4 > > Attachments: G4404_branch21.patch, G4404_truck.patch > > > Ron Staerker reported that if you change ServerHostname in > config-substitutions.properties from 0.0.0.0 to 127.0.0.1, the default > ActiveMQ connectors on 61613 and 61616 will still bind to 0.0.0.0 instead of > the new ServerHostname value. This seems to b caused by several pom.xml > problems, where: > <config-property-setting > name="ServerUrl">tcp://${PlanServerHostname}:${PlanActiveMQPort}</config-property-setting> > where PlanServerHostname is 0.0.0.0 and not in config-substitutions.properties > <attribute name="host">#{ServerHostname}</attribute> > is being substituted in at build time to be 0.0.0.0 instead of putting > ${ServerHostname} in the plans. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.