[jira] Updated: (AMQ-2094) Can't bind the connector to localhost or actuall IP correctly.
[ https://issues.apache.org/activemq/browse/AMQ-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shawn Jiang updated AMQ-2094: - Attachment: AMQ-2094.patch Please help review the patch, thanks. Can't bind the connector to localhost or actuall IP correctly. -- Key: AMQ-2094 URL: https://issues.apache.org/activemq/browse/AMQ-2094 Project: ActiveMQ Issue Type: Bug Components: Geronimo Integration Affects Versions: 4.1.2, 5.2.0 Environment: Windows XP + SUN JDK 1.5 Reporter: Shawn Jiang Attachments: AMQ-2094.patch ActiveMQ server socket created with TcpTransportServer can't bind to localhost or actuall IP correctly. * expected result: ** localhost --- bind to 127.0.0.1 ** actual IP bind to actual IP * actual result: ** localhost --- bind to 0.0.0.0 ** actual IP bind to 0.0.0.0 {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 by default. Which causes a defect of geronimo: https://issues.apache.org/jira/browse/GERONIMO-4404 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2094) Can't bind the connector to localhost or actuall IP correctly.
[ https://issues.apache.org/activemq/browse/AMQ-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shawn Jiang updated AMQ-2094: - Patch Info: [Patch Available] Can't bind the connector to localhost or actuall IP correctly. -- Key: AMQ-2094 URL: https://issues.apache.org/activemq/browse/AMQ-2094 Project: ActiveMQ Issue Type: Bug Components: Geronimo Integration Affects Versions: 4.1.2, 5.2.0 Environment: Windows XP + SUN JDK 1.5 Reporter: Shawn Jiang Attachments: AMQ-2094.patch ActiveMQ server socket created with TcpTransportServer can't bind to localhost or actuall IP correctly. * expected result: ** localhost --- bind to 127.0.0.1 ** actual IP bind to actual IP * actual result: ** localhost --- bind to 0.0.0.0 ** actual IP bind to 0.0.0.0 {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 by default. Which causes a defect of geronimo: https://issues.apache.org/jira/browse/GERONIMO-4404 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.