-
1. Re: JNP message queues through SSH tunnels
timfox Aug 24, 2006 9:46 AM (in response to cameronjones)I am unsure from your post whether you are trying to access JBoss MQ or JBoss Messaging queues on JBoss 4.x using Hermes.
JBoss MQ and JBoss Messaging are different products.
AFAIK the instructions on the Hermes site are for accessing JBoss MQ. I don't believe they have integrated Hermes with JBoss Messaging yet. -
2. Re: JNP message queues through SSH tunnels
cameronjones Aug 24, 2006 10:24 AM (in response to cameronjones)Thanks for the quick reply tim!
I'm using jboss messaging 1.0.1cr3 and i think you're right - the doco for setting up the connection is for MQ. I guess i just expected it to work since all i'm doing right now is trying to lookup the jndi context.
I thought i saw a post recently where someone was browsing queues using hermes locally... -
3. Re: JNP message queues through SSH tunnels
timfox Aug 24, 2006 11:06 AM (in response to cameronjones)I'm no Hermes expert but I don't imagine it should be too hard to set it up to work with Messaging since we're just providing a standard JMS API.
It's probably just a matter of making sure Hermes has access to the messaging client jar. -
4. Re: JNP message queues through SSH tunnels
cameronjones Aug 24, 2006 12:47 PM (in response to cameronjones)yeah, i tried that but it keeps giving me the error when accessing the initial context. i might try posting this onto the hemes forum - i'll post back my findings...
-
5. Re: JNP message queues through SSH tunnels
ovidiu.feodorov Aug 24, 2006 1:07 PM (in response to cameronjones)When you succeed, and if it's not too much of a trouble, you could summarize your conclusions in a short wiki page and link it to http://www.jboss.com/wiki/Wiki.jsp?page=JBossMessaging so others could use your findings.
Also, we have a JIRA task on Hermes: http://jira.jboss.org/jira/browse/JBMESSAGING-301. If you get Hermes working with Messaging, I could assign this task to you, and that would make you a Messaging contributor. Free IntelliJ license, in case you care :)
Thanks for using Messaging. -
6. Re: JNP message queues through SSH tunnels
cameronjones Aug 24, 2006 4:51 PM (in response to cameronjones)I've investigated a bit more and i think i've found the root of the problem. The lookup to the jnp server is working as expected, returning the correct resource however from the hermes logs it appears that it is then attempting to connect to an internal ip address instead of going through the localhost tunnel. Notice in the logs that it fails while trying to lookup ip address 10.11.64.61
I've tested hermes with jboss messaging on my local machine and everything works well - do you have any ideas on how i can get this to work?
Ovidiu - I'm more than happy to add to the doco :-)
2006-08-24 21:10:38,446 [Hermes ThreadPool-4] ERROR hermes.browser.tasks.HermesBrowserTaskListener - No message, linked exception is : null
hermes.HermesException: No message, linked exception is : null
at hermes.browser.model.tree.ContextTreeNode.setContext(ContextTreeNode.java:174)
at hermes.browser.model.tree.ContextTreeNode.(ContextTreeNode.java:65)
at hermes.browser.model.tree.ContextTreeNode.(ContextTreeNode.java:70)
at hermes.browser.components.ContextTreeModelFactory.create(ContextTreeModelFactory.java:60)
at hermes.browser.tasks.JNDIBrowseTask.invoke(JNDIBrowseTask.java:59)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:174)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:182)
at java.lang.Thread.run(Thread.java:595)
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 10.11.64.61; nested exception is:
java.net.ConnectException: Connection timed out: connect]
at org.jnp.interfaces.NamingContext.list(NamingContext.java:812)
at org.jnp.interfaces.NamingContext.list(NamingContext.java:786)
at javax.naming.InitialContext.list(InitialContext.java:395)
at hermes.browser.model.tree.ContextTreeNode.setContext(ContextTreeNode.java:101)
at hermes.browser.model.tree.ContextTreeNode.(ContextTreeNode.java:65)
at hermes.browser.model.tree.ContextTreeNode.(ContextTreeNode.java:70)
at hermes.browser.components.ContextTreeModelFactory.create(ContextTreeModelFactory.java:60)
at hermes.browser.tasks.JNDIBrowseTask.invoke(JNDIBrowseTask.java:59)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:174)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:182)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.rmi.ConnectException: Connection refused to host: 10.11.64.61; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
at org.jnp.server.NamingServer_Stub.list(Unknown Source)
at org.jnp.interfaces.NamingContext.list(NamingContext.java:800)
... 10 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:516)
at java.net.Socket.connect(Socket.java:466)
at java.net.Socket.(Socket.java:366)
at java.net.Socket.(Socket.java:179)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 15 more -
7. Re: JNP message queues through SSH tunnels
ovidiu.feodorov Aug 24, 2006 5:01 PM (in response to cameronjones)Keep in mind that JNDI server connection is just the first connection attempted by the JMS client. It also needs to go to the server-side Remoting connector:
<mbean code="org.jboss.remoting.transport.Connector" name="jboss.messaging:service=Connector,transport=socket" display-name="Socket transport Connector"> <attribute name="Configuration"> <config> <invoker transport="socket"> <attribute name="marshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute> <attribute name="unmarshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute> <attribute name="serializationtype" isParam="true">jboss</attribute> <attribute name="dataType" isParam="true">jms</attribute> <attribute name="socket.check_connection" isParam="true">false</attribute> <attribute name="timeout">0</attribute> <attribute name="serverBindAddress">${jboss.bind.address}</attribute> <attribute name="serverBindPort">4457</attribute> ......
-
8. Re: JNP message queues through SSH tunnels
cameronjones Aug 24, 2006 5:21 PM (in response to cameronjones)I also tried port forwarding rmi on 1098 onto the same port on localhost, but since it's trying the internal ip address this wouldn't make a differnce. Is there any configuration setting i can change on the server so it returns localhost instead of the ip address? then the port forwarding should work in a sneaky way :-)
-
9. Re: JNP message queues through SSH tunnels
tom.elrod Aug 28, 2006 9:40 AM (in response to cameronjones)I don't know hermes at all, so can't speak to that, but do know that is possible to configure the ip and port that clients connect to (when different from the actual network interface that server binds to). More information on how to configure this can be found at http://labs.jboss.com/portal/jbossremoting/docs/guide/ch05.html#d0e1020.
Only possible issue to doing this within messaging is related to how messaging creates the invoker locator given to the client. If is the one take from the server invoker, then using this config change will work. -
10. Re: JNP message queues through SSH tunnels
ruediger_pape Oct 18, 2006 10:32 AM (in response to cameronjones)Hi,
I have exactly the same problem.
Do you have any solution yet? Any help would be appreciated!
Thanks -
11. Queue Monitoring
mihirkumar Nov 7, 2008 4:08 AM (in response to cameronjones)Hi,
How to know the no of messages currently active in a queue?
Thanks
M.Kumar