That's exactly the cause of the problem! After changing to 0.0.0.0, it works perfectly.
Thank you, Andreas! Andreas.Weber wrote: > > Hi, > > when looking at the activemq.xml in the activemq-web-console-5.3.2.war, > you'll see that the openwire transportConnector there is defined as: > > uri="tcp://localhost:61616" > > In the activemq.xml of the standalone ActiveMQ, we have: > > uri="tcp://0.0.0.0:61616" > > I wonder if that causes your problems - see: > https://issues.apache.org/activemq/browse/AMQ-2094 > > Best regards, > Andreas > > >> -----Ursprüngliche Nachricht----- >> Von: test4john [mailto:test4j...@yahoo.com] >> Gesendet: Freitag, 28. Mai 2010 17:18 >> An: users@activemq.apache.org >> Betreff: Re: Connection refused with embeded AMQ in Tomcat >> >> >> Thanks, Joe. >> >> on the server machine, telnet locahost 61616 is ok; telnet >> xxx.yyy.zzz.xyz >> 61616 will give: Connecting To xxx.yyy.zzz.xyz...Could not open >> connection >> to the host, on port 61616: Connect failed >> >> But if install AMQ as standalone, both telnet to localhost and telnet >> xxx.yyy.zzz.xyz are OK. >> >> Wondered if it is a firewall problem but the server's firewall is >> actually >> off .. >> >> >> >> Joe Fernandez wrote: >> > >> > Is the AMQ message broker running on the server machine and listening >> on >> > port 61616? >> > >> > If so, try telnet'ing to xxx.yyy.zzz.xyz 61616 and see if the broker >> > responds. >> > >> > Joe >> > ActiveMQ Ref Guide - http://bit.ly/AMQRefGuide >> > >> > >> > >> > test4john wrote: >> >> >> >> 1. brand new installation of tomcat 6; >> >> >> >> 2. activemq-all-5.3.2.jar put under lib; >> >> >> >> 3. activemq-web-console-5.3.2.war put under webapps; >> >> >> >> 4. start tomcat and >> >> http://localhost:8080/activemq-web-console-5.3.2/queues.jsp works >> fine; >> >> >> >> 5. connectionFactory = new >> >> ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_USER, >> >> ActiveMQConnection.DEFAULT_PASSWORD, "tcp://localhost:61616"); >> >> mainQueueConnection = >> >> connectionFactory.createConnection(); >> >> mainQueueConnection.start(); >> >> works fine; >> >> >> >> 6. if run the same code from another machine, only change "localhost" >> to >> >> the ip of the server machine(xxx.yyy.zzz.xyz), exception caught: >> >> javax.jms.JMSException: Could not connect to broker URL: >> >> tcp://xxx.yyy.zzz.xyz:61616. Reason: java.net.ConnectException: >> >> Connection refused: connect >> >> >> >> 7. even on the same machine (the server machine), if change >> "localhost" >> >> to ip, exception happened: >> >> javax.jms.JMSException: Could not connect to broker URL: >> >> tcp://xxx.yyy.zzz.xyz:61616. Reason: java.net.ConnectException: >> >> Connection timed out: connect >> >> >> >> any idea? >> >> >> >> thanks! >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://old.nabble.com/Connection-refused-with-embeded-AMQ-in-Tomcat- >> tp28700068p28708231.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > > -- View this message in context: http://old.nabble.com/Connection-refused-with-embeded-AMQ-in-Tomcat-tp28700068p28745907.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.