-
1. Re: QueueConnectionFactory lookups wrong host
stephanenicoll Oct 28, 2003 1:31 AM (in response to sohnj)That's because your JNDI properties are not taken into account. From where are you running this code?
-
2. Re: QueueConnectionFactory lookups wrong host
sohnj Oct 28, 2003 7:03 AM (in response to sohnj)I am running from a seperate project directory for the client.
Does JBOSS default to localhost when it doesn't find jndi properties?
I've created other clients, not using JMS/MDB but utililzing session bean in the same manner and it's been working. Are JMS different? -
3. Re: QueueConnectionFactory lookups wrong host
stephanenicoll Oct 28, 2003 7:04 AM (in response to sohnj)No, it crashes when the properties are not found. Are you sure the properties are ok (name, ip adress, etc)
Regards,
Stephane -
4. Re: QueueConnectionFactory lookups wrong host
sohnj Oct 28, 2003 7:52 AM (in response to sohnj)For the initialcontext, I've added the name of the jndi lookups in the code as follow:
Hashtable env = new Hashtable();
env.put(Context.INITAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "xxxxx:1099");
env.put("java.naming.rmi.security.manager", "yes");
env.put("Context.URL_PKG_PREFIXES,"org.jboss.naming");
InitalContext context = new InitialContext(env);
System.out.println(context.getEnvironment());
Above code seems to print out the env correctly. Is there any other jndi properties that I need?
Thanks again! -
5. Re: QueueConnectionFactory lookups wrong host
adrian.brock Oct 28, 2003 7:52 AM (in response to sohnj)Is this the /etc/hosts FAQ?
Regards,
Adrian -
6. Re: QueueConnectionFactory lookups wrong host
stephanenicoll Oct 28, 2003 7:54 AM (in response to sohnj)Where is this FAQ? I am gonna read it instead of solving already solved issues.
Regards,
Stephane -
7. Re: QueueConnectionFactory lookups wrong host
adrian.brock Oct 28, 2003 8:49 AM (in response to sohnj)In the FAQ forum
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= discussion on RMI is irrelevent for JBossMQ unless
you are using the RMIConnectionFactory.
Regards,
Adrian -
8. Re: QueueConnectionFactory lookups wrong host
parlor Nov 6, 2003 11:01 AM (in response to sohnj)I am actually having the same or a similar problem. I am running Jboss 3.2.2 on both client and server. I create the initial context to the remote machine. jnp://192.168.100.x:1099 but the queue connection is made to a local queue. The lookups I do are for ConnectionFactory (Which is the OIL provider, I have also tries UIL2)
The odd thing is that if the server is not available the lookup of the Queue instance fails. If the server is up the queue is created then the Connection Factory, session etc. However, all messages sent end up at the local MDB instead of at the servers. -
9. Re: QueueConnectionFactory lookups wrong host
parlor Nov 6, 2003 12:33 PM (in response to sohnj)Just as a FYI. The same code works great under JBoss 3.2.1.
-
10. Re: QueueConnectionFactory lookups wrong host
parlor Nov 6, 2003 3:42 PM (in response to sohnj)A little furthur info. The code also works correctly when using RMIConnectionFactory. The problem seems directly related to the new jboss.bind.address feature in 3.2.2. It seems that the JMS connection types are not binding or at least accepting remote connections to them. I tried setting jboss.bind.address to my machines IP and Hostname on startup via run.sh but this caused local queries to jnp://localhost:1099 to fail. I then modified, as a test, uil2-service.xml to bind to the machines address and connections could then be achieved. However modifying uil2's bind address is not a viable solution.
I am not sure what the proper configuration settings are now with 3.2.2 to allow remote JMS connections and also allow JNDI lookups to localhost. Can anyone help with this? -
11. Re: QueueConnectionFactory lookups wrong host
chuckharris Nov 6, 2003 4:16 PM (in response to sohnj)If you find the solution to the problem you are experiencing, please post it. I am experiencing a similar problem.
-
12. Re: QueueConnectionFactory lookups wrong host
adrian.brock Nov 6, 2003 4:55 PM (in response to sohnj)Check /etc/hosts do you have
127.0.0.1 localhost.localdomain localhost myhost.com
Fix it.
127.0.0.1 localhost.localdomain localhost
1.2.3.4 myhost.com
That is a simple summary of the FAQ mentioned above.
There are other possiblities.
Connecting to the wrong server => misconfigured network
settings.,
Regards,
Adrian -
13. Re: QueueConnectionFactory lookups wrong host
parlor Nov 6, 2003 6:01 PM (in response to sohnj)The client is running WinXP. The server is running RH 9. The hosts file is the correct form.
127.0.0.1 localhost.localdomain localhost
192.168.100.119 host host.myhost.com
I find it odd that code works under 3.2.1 but not 3.2.2. The code will work under 3.2.2 if I use either the RMIConnectionFactory or if I modify uil2-service.xml to bind to 192.168.100.119.
We also verified that jboss on the server seems to listening on port 8093 by telneting to the port from the Windows machine. We also ran a windump and tcpdump on the appropriate machines. When UIL2 is bound to 0.0.0.0 we don't see any packets transmitted except for the JNDI calls on port 1099. If we bind UIL to the specific IP on the server then the tcp packet traffic goes through.
I also created a JMS client to remove JBoss from the client side to test only the connection to the server. When I attempt to create the queue connection it now throws a JMSException with a root socket exception - connection refused. Is it possible that the JNDI call to the server is returning the wrong location when UIL2 is bound to 0.0.0.0 on the server?
Thanks,
Phil -
14. Re: QueueConnectionFactory lookups wrong host
chuckharris Nov 6, 2003 6:29 PM (in response to sohnj)Both my client and host are win2k and both host files looked like
127.0.0.1 localhost
Usually, I use computer name or IP. So if the client is
ip 123.123.123.123
name client-11111
app server is
ip 789.789.789.789
name app-22222
what should each host file look like?