Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA2879552 for ; Wed, 16 Nov 2011 14:12:17 +0000 (UTC) Received: (qmail 41566 invoked by uid 500); 16 Nov 2011 14:12:17 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 41519 invoked by uid 500); 16 Nov 2011 14:12:17 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 41509 invoked by uid 99); 16 Nov 2011 14:12:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2011 14:12:17 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2011 14:12:14 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2476087937 for ; Wed, 16 Nov 2011 14:11:53 +0000 (UTC) Date: Wed, 16 Nov 2011 14:11:53 +0000 (UTC) From: "Timothy Bish (Assigned) (JIRA)" To: dev@activemq.apache.org Message-ID: <1027944060.34911.1321452713150.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1429101318.34472.1321439092255.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (AMQNET-350) Clients using the NMS library sometimes hijacks (binds) to the port that ActiveMQ is listening to MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQNET-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish reassigned AMQNET-350: ----------------------------------- Assignee: Timothy Bish (was: Jim Gomes) > Clients using the NMS library sometimes hijacks (binds) to the port that ActiveMQ is listening to > ------------------------------------------------------------------------------------------------- > > Key: AMQNET-350 > URL: https://issues.apache.org/jira/browse/AMQNET-350 > Project: ActiveMQ .Net > Issue Type: Bug > Affects Versions: 1.5.0, 1.5.1, 1.5.2 > Reporter: Frank Gynnild > Assignee: Timothy Bish > > If we stop ActiveMQ service first, we've sometimes seen that various clients (using the NMS library) binds to the same port as ActiveMQ uses for listening (61616). > This causes the ActiveMQ service to fail to start since its listening port is occupied. > Doing a "netstat -a -b" we can see the problem: > --- > TCP [fe80::c591:4e66:8992:debb%11]:61616 Gelado:61616 ESTABLISHED > TestClient.exe] > --- > When trying to start ActiveMQ we get this: > --- > 2011-11-16 10:27:38,223 | ERROR | Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616?keepAlive=true&wireFormat.tightEncodingEnabled=false&wireFormat.cacheEnabled=false&wireFormat.maxInactivityDuration=300000 due to: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind | org.apache.activemq.broker.BrokerService | main > java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616?keepAlive=true&wireFormat.tightEncodingEnabled=false&wireFormat.cacheEnabled=false&wireFormat.maxInactivityDuration=300000 due to: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind > at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27) > at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1678) > at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2166) > at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2082) > at org.apache.activemq.broker.BrokerService.start(BrokerService.java:516) > --- > When exiting the client process, the ActiveMQ service is able to start up again. > I had a look at the source code, and I think the bug is inside the TcpTransportFactory.cs: > {code} > if(!String.IsNullOrEmpty(location.AbsolutePath) && !location.AbsolutePath.Equals("/")) > { > int index = location.AbsolutePath.IndexOf(':'); > try > { > localPort = Int16.Parse(location.AbsolutePath.Substring(index + 1)); > localAddress = location.AbsolutePath.Substring(1, index - 1); > Tracer.DebugFormat("Binding Socket to {0} on port: {1}", localAddress, localPort); > } > catch > { > Tracer.Warn("Invalid Port value on URI for local bind option, ignoring."); > } > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira