This content has been marked as final.
Show 36 replies
-
1. 3819173
rp6 Feb 8, 2002 3:25 PM (in response to adrian.brock)"crowley" wrote:
"crowley" wrote:
Perhaps you should try
worker.ajp12.host=127.0.0.1 -
2. Re: Connection refused to host: 127.0.0.1
adrian.brock Feb 8, 2002 3:29 PM (in response to adrian.brock)There is something wrong with your ip configuration.
RMI thinks your server's ip address is 127.0.0.1
You can check this by adding the following parameter
to the java command in run.sh or run.bat
(on the SERVER side !)
-Djava.rmi.server.hostname
RMI will now use the server's hostname instead of
trying to determine the ip address.
If this fixes your problem, then check you ip configuration.
You might want to continue to use host names?
Regards,
Adrian -
3. Re: Connection refused to host: 127.0.0.1
adrian.brock Feb 8, 2002 3:30 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
"adrian@jboss.org" wrote:
You can get similar problems on multi-homed servers.
i.e. servers with multiple ip addresses.
In this case always use
-Djava.rmi.server.hostname
Regards,
Adrian -
4. Re: Connection refused to host: 127.0.0.1
cpaul_it Mar 21, 2002 12:54 PM (in response to adrian.brock)"cpaul_it" wrote:
"cpaul_it" wrote:
The client having it's own jndi.properties still does not work.
I have two ip addresses on the JBoss server machine (one is 10.0.0.17 and the other is external).
On the client machine, which has only one ip address (10.0.0.51) I set the java.naming.provider.url to 10.0.0.17:1099. I know I am hitting the JBoss Server, because the java.rmi.ConnectIOException that is thrown indicates a failure trying to open a socket using the JBoss server's external ip address. The only way it could get the external address would be from the naming service running on the JBoss server.
Any other ideas? -
5. Re: Connection refused to host: 127.0.0.1
cpaul_it Mar 22, 2002 12:39 PM (in response to adrian.brock)"cpaul_it" wrote:
"cpaul_it" wrote:
As I continued to research, I eventually came back to this topic several times, and finally I realized that I had not picked up on the -Djava.rmi.server.hostname entry. So, as instructed, I set it to
-Djava.rmi.server.hostname=10.0.0.17 and it worked perfectly.
Thanks Adrian!
Paul -
6. Re: Connection refused to host: 127.0.0.1
tobias Feb 19, 2003 7:02 PM (in response to adrian.brock)"Tobias" wrote:
"Tobias" wrote:
On newer JBoss versions the error message may read:
javax.naming.CommunicationException. Root exception is
java.rmi.ConnectException: Connection refused to host: 127.0.0.1;
nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
On the machine the JBoss server runs on check your /etc/hosts file. Only having an localhost entry there is not enough. You need an additional entry with your IP address and your host name of the server.
RedHat installations are known to have these problems :(. -
7. Re: Connection refused to host: 127.0.0.1
tobias Feb 19, 2003 8:24 PM (in response to adrian.brock)"Tobias" wrote:
"Tobias" wrote:
On newer versions of JBoss the error message may vary, one reads:
javax.naming.CommunicationException. Root exception is
java.rmi.ConnectException: Connection refused to host: 127.0.0.1;
nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
RedHat installations are known to have a wrong /etc/hosts file on the SERVER. You need to check the following on the SERVER.
The command "hostname" returns the used hostname, let's say it is "peterpan". /etc/hosts needs to look like this then:
10.0.0.1 peterpan
127.0.0.1 localhost.localdomain localhost
After that change "ping peterpan" should NOT ping to 127.0.0.1 but to the server IP address which was assumed to be 10.0.0.1 in the above example.
Restart the JBoss server now and try again. -
8. Re: Connection refused to host: 127.0.0.1
tobias Feb 21, 2003 6:05 AM (in response to adrian.brock)"Tobias" wrote:
"Tobias" wrote:
I'd like to ask people who are seeing this problem to tell us in this thread which of the proposed solutions worked for them. -
9. Re: changing '/etc/hosts' solved the problem [Connection ref
kg1959 Mar 18, 2003 12:14 PM (in response to adrian.brock)"kg1959" wrote:
"kg1959" wrote:
Thanks for your valuable research work, fellows.
I took the solution to add an additional line in the /etc/hosts-file and now the clients run fine without the mentioned exception.
I hesitate to try out the -Djava=....-parameter-solution as the run.sh-script looks pretty complicated to me (newbie).
OS on my machine: RedHat-Linux 7.1
Thanks again !
Kurt -
10. Re: Connection refused to host: 127.0.0.1
jonlee Apr 23, 2003 10:23 PM (in response to adrian.brock)"jonlee" wrote:
"jonlee" wrote:
This is a known Sun Java RMI problem. Usually on Unices, the recommended solution is to ensure that the /etc/hosts is properly configured for resolution of the hostname.
However, this becomes a problem if you have DHCP on your primary interface. In this case, you may need to revert to using the -D:java.rmi.server.hostname=xxx.xxx.xxx.xxx type substitution or if you have a secondary interface, changing the hostname resolution in /etc/hosts to the secondary interface. You may have network-related side-effects with the latter.
If you must bind to the DHCP interface, you can put in some scripting substitutions to substitute the current assigned IP address. The problem will be that if the IP address changes during the lifetime of the server runtime instance, you will need to restart JBoss.
We've also had problems on Windows when dialled up to a client. If you start up JBoss when connected, the primary interface is the PPP. After disconnection, JBoss fails because the RMI interface was the PPP which has now gone - so you need to restart JBoss for things to work again. -
11. Re: Connection refused to host: 127.0.0.1
whitemouse Apr 28, 2003 2:22 AM (in response to adrian.brock)"whitemouse" wrote:
"whitemouse" wrote:
test -
12. Re: Connection refused to host: 127.0.0.1
keith_elliott May 30, 2003 8:10 AM (in response to adrian.brock)"keith_elliott" wrote:
"keith_elliott" wrote:
I recently experienced a similar problem.
In my case, JNDI simply would hang - no errors, no response, just hang.
Ultimately, we realized we had our /etc/hosts file setup incorrectly - the IP for the server was invalid.
Here's the thread where I discuss it in more detail: http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= -
13. Re: Connection refused to host: 127.0.0.1
ryanho Jun 17, 2003 3:55 AM (in response to adrian.brock)"ryanho" wrote:
"ryanho" wrote:
Both methods, i.e. editing run.sh JAVA_OPTS entry to add
-Djava.rmi.server.hostname entry
AND
adding the IP address to the /etc/hosts
Worked for me -
14. Re: Connection refused to host: 127.0.0.1
buckman1 Jun 23, 2003 5:07 PM (in response to adrian.brock)"buckman1" wrote:
"buckman1" wrote:
I'd just like to add, if you are trying to cluster JBoss with a linux and windows machine, you'll want to also make sure to do this step. I found out the hard way with RedHat 9 that even though the JavaGroups multi-cast test worked, I was still not seeing the windows and linux nodes find each other.