-
1. Re: JNDI lookup always returns null
joelvogt Dec 11, 2002 5:03 PM (in response to rfrey)what os is this running on? What is an example value for your jndi lookup pmJndiName?
-
2. Re: JNDI lookup always returns null
chamal Dec 12, 2002 7:53 AM (in response to rfrey)I've got the same problem with JBoss 3.0.4, jdk1.4 under Linux Redhat and jdk1.3 on client.
-
3. Re: JNDI lookup always returns null
rfrey Dec 12, 2002 11:28 AM (in response to rfrey)Thanks for the replies.
I'm running Redhat 8.0 on the server and the client, with the 1.4.1 JDK from Sun.
The name that I'm passing is a static string. In this case, it's "PartnerManager", but I've tried several other names as well that match names obtained from JNDIView. All return objects when run on the same machine, but null when run on a different machine.
I've tried the same experiment with a virgin JBoss 3.0.4 installation with the same results.
The most curious thing to me is that a JNDI browser client would see the full JNDI tree when run on locahost, but report a null tree when run on a different host. It's like there's a firewall blocking port 1099, except (as I said), there's no ipchains config at all on these machines, and furthermore, there's no ConnectionException reported.
I'd attach various configuration files, but as I mentioned, I'm getting the same problem with the vanilla JBoss installation, so I don't think that's the issue.
Thanks,
Rod. -
4. Re: JNDI lookup always returns null
rfrey Dec 12, 2002 11:49 AM (in response to rfrey)As an addendum, running
nmap -sT -p 1099 10.0.0.2
from my web server, against my application server, shows the port as open, so I guess that means it's not a firewall issue.
Sigh. -
5. Re: JNDI lookup always returns null
nznl Dec 12, 2002 8:05 PM (in response to rfrey)I have this exact same problem. Interestingly, I am seeing this in v3.0.4 standalone but when I run the same code in the v3.0.4 w/ Tomcat v4.1.12 bundle, it works fine.
Has anyone made any progress on this? -
6. Re: JNDI lookup always returns null
joelvogt Dec 12, 2002 8:30 PM (in response to rfrey)these things sometimes resolve to the /etc/hosts file in Redhat. try hacking around with this.
-
7. Re: JNDI lookup always returns null
nznl Dec 12, 2002 8:53 PM (in response to rfrey)I'll try that. I was wrong about the Tomcat bundle. It reproduces on any v3.0.4 bundle. We are all running Redhat, 6.2 in my case.
I checked the difference in /etc/hosts between my working server and the broken one and there was a difference but when I matched them, I saw no change in behaviour, even after a restart and a reboot.
Any other ideas? What kind of sniffer can we use to detect differences in the network traffic? -
8. Re: JNDI lookup always returns null
nznl Dec 12, 2002 8:56 PM (in response to rfrey)One more point. If the server is down, I get a ConnectTimeout exception. So the server is responding but with a null home interface or the data is getting corrupted by some network feature.
If I use a JNDI name that is not bound, I get the same null behaviour so this is not related to jndi availability. It has to be a linux config problem. But what? -
9. Re: JNDI lookup always returns null
nznl Dec 13, 2002 2:30 PM (in response to rfrey)One more observation : my only working server is Redhat v6.2. All of the others are Redhat 7.2 so it looks like this is a linux network config issue. Any ideas about what it could be?
-
10. Re: JNDI lookup always returns null
bauz Dec 19, 2002 10:24 AM (in response to rfrey)I have the same problem...The problem was on the /etc/hosts file.
http://groups.google.ch/groups?hl=it&lr=&ie=UTF-8&oe=UTF-8&threadm=926b34c9.0212051626.3b46a37%40posting.google.com&rnum=1&prev=/groups%3Fq%3Djavax.naming.CommunicationException.%2B%2BRoot%2Bexception%2Bis%2Bjava.rmi.ConnectException:%2BConnection%2Brefused%2Bto%2Bhost:%2B127.0.0.1%26hl%3Dit%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D926b34c9.0212051626.3b46a37%2540posting.google.com%26rnum%3D1 -
11. Re: JNDI lookup always returns null
bauz Dec 19, 2002 10:26 AM (in response to rfrey)I have the same problem...The problem was on the /etc/hosts file.
http://groups.google.ch/groups?hl=it&lr=&ie=UTF-8&oe=UTF-8&threadm=926b34c9.0212051626.3b46a37%40posting.google.com&rnum=1&prev=/groups%3Fq%3Djavax.naming.CommunicationException.%2B%2BRoot%2Bexception%2Bis%2Bjava.rmi.ConnectException:%2BConnection%2Brefused%2Bto%2Bhost:%2B127.0.0.1%26hl%3Dit%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D926b34c9.0212051626.3b46a37%2540posting.google.com%26rnum%3D1 -
12. Re: JNDI lookup always returns null
raphael Dec 30, 2002 7:21 AM (in response to rfrey)Had the same problem and solved it with the help from some previous postings by correcting my /etc/hosts
The problem seems to occur when you start JBoss on your host myhost and have a line in /etc/hosts saying:
127.0.0.1 localhost myhost
After that any lookup done from another host will return
null regardless which name you're looking up.
Correcting /etc/hosts to something like:
127.0.0.1 localhost
192.1.1.1 myhost
and restarting JBoss will solve the problem.
Thanks to Bauz (Mazzi) and Keith Simeon for the solution!
Cheers
Raphael