-
1. Re: Linux JNDI Context Problem
marc.fleury Dec 6, 2001 12:47 AM (in response to hoguester)nah... I develop and debug and run on Linux...
something else is at play and for some reason your server doesn't know what 127.0.0.1 is. Try NOT hardcoding your IP and using the jndi.properties instead that will clear some fog -
2. Re: Linux JNDI Context Problem
hoguester Dec 6, 2001 12:59 AM (in response to hoguester)Thanks for the feedback...
I tried the JNDI props file, but with the same results. I'm not saying its a bug with Linux as I understand lots of folks deploy there ( I want to as well, and have in the past..with 2.2.x). I feel like the JB server is returning an invalid context to the client (indicating the JNDI context url is 127.0.0.1). Im not 100% clear on how that works behing the scenes. I'll investigate the possibility the JB server doesn't recognize itself as 127.0.0.1. Thanks again. -
3. Re: Linux JNDI Context Problem
gphat Dec 6, 2001 8:38 AM (in response to hoguester)Eureka!
For those having a problem similar to this, take a look at your /etc/hosts file. RedHat 7.2 seems to only make one entry, something like:
127.0.0.1 yurhost yurhost.localdomain.com
JBoss reads this and returns the address '127.0.0.1' back from your InitialContext call, thinking that is the address of 'yurhost.localdomain.com'.
Modifying your /etc/hosts file to read:
127.0.0.1 localhost
192.168.0.1 yurhost.localdomain.com yurhost
Seems to resolve the problem. (Do substitute the REAL address of the machine as the second entry, mind you.)
PS. My quick tests this morning seemed to solve the problem, I'll repost when I'm sure it's fixed. -
4. Re: Linux JNDI Context Problem
quantic Dec 7, 2001 7:57 AM (in response to hoguester)Yeah, it works on mine too. Thanks a lot, guy. Good work!
-
5. Re: Linux JNDI Context Problem
jwkaltz Dec 7, 2001 10:58 AM (in response to hoguester)Hey, this sounds like a new FAQ ;) There were some postings a few weeks ago where I think it was the same problem.
Frankly I am surprised to hear of a system where the localhost entry is missing in /etc/hosts
As far as I know that line should ALWAYS be present. Are you sure you didn't change the file and that Red Hat 7.2 actually installed it like that ? -
6. Re: Linux JNDI Context Problem
btarbox Feb 23, 2003 3:04 PM (in response to hoguester)Red Hat 8.0 creates an /etc/hosts file with exactly this form of entry as the only entry. So, this really probably should be in the FAQ, or even the documentation.