-
1. Re: JMS over HTTP with server behind a firewall problem
adrian.brock May 14, 2004 8:37 AM (in response to catalean)Yes, and the information you want is on the WIKI
http://www.jboss.org/wiki/Wiki.jsp?page=ConfigHTTPIL
Did you "READ THIS FIRST"? :-( -
2. Re: JMS over HTTP with server behind a firewall problem
catalean May 14, 2004 9:01 AM (in response to catalean)Yes i have read that, but i did't get the ideea, and even now it's not realy clear to me: which attribute i need to configure, "UseHostName"? setted to false? this is all that is needed? Thanks very much for your response.
-
3. Re: JMS over HTTP with server behind a firewall problem
adrian.brock May 14, 2004 9:15 AM (in response to catalean)<attribute name="URLHostName">firewall</attribute> <attribute name="URLPort">port open for forwarding</attribute>
When you get it working, please add your example config to the WIKI
with a short explanation.
Of course you should obfuscate your host/port :-) -
4. Re: JMS over HTTP with server behind a firewall problem
themuppeteer May 16, 2004 2:14 PM (in response to catalean)Hello,
I'm having exactely the same problem (I'm searching on it since januari now :(( )
I've trie the 'UseHostName' to false , and all the other suggestions u gave but it still doesnt work. My client keeps getting
avax.naming.CommunicationException: Operation failed. Root exception is java.n
et.UnknownHostException: ServerPCName
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:143)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect( ...
(My client is a java application that wants to connect over the internet to my pc (windows XP with zonealarm))
All I want is that my pc sends back it ip and not its windows hostname..
Any help would be highly appreciated..
Best and desperate regards,
themuppeteer -
5. Re: JMS over HTTP with server behind a firewall problem
catalean May 19, 2004 5:35 AM (in response to catalean)I can't get it working, i made the settings Adriand said; my HTTP IL JBoss service descriptor looks like this:
<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="org.jboss.mq.il.http.HTTPServerILService" name="jboss.mq:service=InvocationLayer,type=HTTP"> <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker</depends> <depends>jboss.web:service=WebServer</depends> <attribute name="ConnectionFactoryJNDIRef">HTTPConnectionFactory</attribute> <attribute name="XAConnectionFactoryJNDIRef">HTTPXAConnectionFactory</attribute> <attribute name="PingPeriod">0</attribute> <attribute name="TimeOut">60</attribute> <attribute name="RestInterval">0</attribute> <attribute name="URLHostName">firewall's IP</attribute> <attribute name="URLPort">8080</attribute> </mbean> </server>
-
6. Re: JMS over HTTP with server behind a firewall problem
catalean May 19, 2004 5:38 AM (in response to catalean)As i said, i made the necessary configuration settings, but it seems that those settings have no effect on my server, it keeps responding back with his host name and not with the firewall's IP specified by the attribute "URLHostName".
-
7. Re: JMS over HTTP with server behind a firewall problem
adrian.brock May 19, 2004 6:47 AM (in response to catalean)I have no idea what your post means.
Why would the settings have an affect on the server?
It is the client behaviour you are trying to modify.
Post errors and TRACE logging. -
8. Re: JMS over HTTP with server behind a firewall problem
catalean May 20, 2004 6:27 AM (in response to catalean)This is how things are looking from my point of view: i have a client application who want's to use JMS over HTTP; on the client side these jndi properties are used:
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory java.naming.provider.url=http://public_IP_address:8080/invoker/JNDIFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
"public_IP_address" is the IP which is translated by the firewall into a internal IP address, so each call can reach my internal server.
And a lookup after the HTTPXAConnectioFactory is made successfuly. When the actual topic connection is to be made the following error occurs:javax.naming.CommunicationException: Operation failed [Root exception is java.net.UnknownHostException: LIMS] at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:50) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45) at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) at $Proxy0.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ro.citrusmedia.lims.base.ui.commutil.JNDIManager.initJMS(JNDIManager.java:102) at ro.citrusmedia.lims.base.ui.commutil.JNDIManager.init(JNDIManager.java:61) at ro.citrusmedia.lims.base.ui.BaseModuleEntry.contactServer(BaseModuleEntry.java:243) at ro.citrusmedia.lims.base.ui.BaseModuleEntry.create(BaseModuleEntry.java:110) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:412) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:818) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791) at ro.citrusmedia.lims.system.ModuleController.registerAndStartModules(ModuleController.java:295) at ro.citrusmedia.lims.system.ModuleController.loadModules(ModuleController.java:191) at ro.citrusmedia.lims.system.Application$1.run(Application.java:146) at java.lang.Thread.run(Thread.java:534) Caused by: java.net.UnknownHostException: LIMS at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:402) at sun.net.www.http.HttpClient.openServer(HttpClient.java:618) at sun.net.www.http.HttpClient.<init>(HttpClient.java:306) at sun.net.www.http.HttpClient.<init>(HttpClient.java:267) at sun.net.www.http.HttpClient.New(HttpClient.java:339) at sun.net.www.http.HttpClient.New(HttpClient.java:320) at sun.net.www.http.HttpClient.New(HttpClient.java:315) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:560) at org.jboss.invocation.http.interfaces.Util.invoke(Util.java:101) at org.jboss.invocation.http.interfaces.HttpInvokerProxy.invoke(HttpInvokerProxy.java:102) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96) at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:42) ... 23 more
Can you tell me, how does my client application end up trying to connect to "LIMS" (the internal host name of the server machine)? as i understand, the client application should try to connect to "public_IP_address". -
9. Re: JMS over HTTP with server behind a firewall problem
catalean May 20, 2004 6:30 AM (in response to catalean)The error does't occur when the actual topic connection is to be made, but when the client application try to lookup after the topic's JNDI name.
-
10. Re: JMS over HTTP with server behind a firewall problem
catalean May 20, 2004 7:06 AM (in response to catalean)Sorry, i was wrong on the previous two posts, because it seems that the error is occuring when trying to lookup after the HTTPXAConnectionFactory; so it does't even get the connection factory. Is possible that the connection to be made is a HTTPS connection? the following debug appear in my log:
DEBUG [Util] httpsConnClass: class javax.net.ssl.HttpsURLConnection
-
11. Re: JMS over HTTP with server behind a firewall problem
adrian.brock May 20, 2004 9:35 AM (in response to catalean)You have changed the httpilservice, but not the httpinvoker used by jndi over http.
See deploy/http-invoker.sar/META-INF/jboss-service.xml -
12. Re: JMS over HTTP with server behind a firewall problem
catalean May 21, 2004 6:57 AM (in response to catalean)This is the missing piece, thanks very much for you pacience; one more question, do i have to set the "InvokerURL" attribute at each mbean from there, or just at the HttpProxyFactory mbean?
-
13. Re: JMS over HTTP with server behind a firewall problem
adrian.brock May 21, 2004 7:03 AM (in response to catalean)If you want to use all the services I guess you will have the same problem, yes.
Some are for EJB, https or readonly naming - read the comments. -
14. Re: RMI over HTTP , hostname appears in client instead of ip
themuppeteer May 26, 2004 7:44 AM (in response to catalean)Hello,
I made a post yesterday but for some reason it got deleted.. I still have the problem after doing all these changes.
I took the deploy/http-invoker.sar/META-INF/jboss-service.xml file from
http://nemesisit.rdsnet.ro/opendocs/ejboverhttp_f.html and changed external server to my ip adres and port to 8080.
I run windows xp,single computer at home so no network. I usually run zonealarm but I turn it off for the tests to avoid problems.
I use JBoss 3.2.3
I don't use JMS but I did change the httpilservice also to be sure..
Still the hostname appears on the other side and I get an UnknownhostException when I do the create on my home object..
Can anyone help me please ?