-
1. Re: hostname
monk2005 May 24, 2007 1:13 PM (in response to kuvera)I have the same problem. Does any one run into a problem like this and have a solution for??
Thanks in advance -
2. Re: hostname
monk2005 May 24, 2007 2:29 PM (in response to kuvera)Finally solved!
1)
Make sure that your server OS host file does the accurate transilation
eg.
127.0.0.1 localhost
<external IP address> <computer name> <computer name with fully qualified domain name>
2) Make sure that your server jndi.properties file uses the following instead of localhost:1099
java.naming.provider.url=jnp://<computer name with fully qualified domain name>:1099
this should do it - have fun! -
3. Re: hostname
monk2005 May 25, 2007 9:15 AM (in response to kuvera)One more thing I forgot to mention.
3) Start the server with -b option (bind address)
eg.
run -c <server name [if not given default]> -b <computer name with fully qualified domain name>
Laterz -
4. Re: hostname
mithilwane Dec 24, 2007 9:04 AM (in response to kuvera)Did all this but still getting an exception
-
5. Re: hostname
mithilwane Dec 24, 2007 9:55 AM (in response to kuvera)Basically now when i run the client from a remote m/c the name resolution does occur but rmi fails.
Any Ideas -
6. Re: hostname
jaikiran Dec 25, 2007 2:30 AM (in response to kuvera)You will have to provide us more details about what you have done so far and what you are trying to do. Also, post the JBoss server version, the Java version and the entire exception stacktrace.
-
7. Re: hostname
mithilwane Dec 26, 2007 12:21 AM (in response to kuvera)JBoss version is 4.2.2 and jdk is 1.5.0_14
my hosts file has two entries
127.0.0.1 localhost
192.168.0.230 linuxserver myserver.server.com
jndi props looks like this
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://myserver.server.com:1099
i get this exception in my client
Running default port
D:\WorkCVS\EMS
Exception:javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: myserver.server.com; nested exception is:
java.net.UnknownHostException: myserver.server.com]
javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: myserver.server.com; nested exception is:
java.net.UnknownHostException: myserver.server.com]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:780)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.alphion.fm.client.FaultManageClient.init(FaultManageClient.java:48)
at com.lopsys.nms.client.fault.FaultManagerGUIClient.init(FaultManagerGUIClient.java:54)
at com.alphion.main.MainFrame.(MainFrame.java:111)
at com.alphion.main.MainFrame.main(MainFrame.java:571)
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:585)
at com.alphion.main.EMSSplash.main(EMSSplash.java:57)
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:585)
at com.alphion.main.WelcomeFrame.main(WelcomeFrame.java:167)
Caused by: java.rmi.UnknownHostException: Unknown host: myserver.server.com; nested exception is:
java.net.UnknownHostException: myserver.server.com
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:572)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
... 16 more
Caused by: java.net.UnknownHostException: myserver.server.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.(Socket.java:367)
at java.net.Socket.(Socket.java:180)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 21 more
java.lang.reflect.InvocationTargetException
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:585)
at com.alphion.main.EMSSplash.main(EMSSplash.java:57)
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:585)
at com.alphion.main.WelcomeFrame.main(WelcomeFrame.java:167)
Caused by: java.lang.NullPointerException
at com.alphion.fm.client.FaultManageClient.addAlpClientEventListener(FaultManageClient.java:75)
at com.lopsys.nms.client.fault.FaultManagerGUIClient.init(FaultManagerGUIClient.java:55)
at com.alphion.main.MainFrame.(MainFrame.java:111)
at com.alphion.main.MainFrame.main(MainFrame.java:571)
... 10 more -
8. Re: hostname
hsaha Jan 3, 2008 7:35 AM (in response to kuvera)It is quite clear from the exception that jboss is not able to resolve the hostname. Pls cross-check the following:
- Did you restart jboss after changing the host entries?
- Is the client in windows/linux? If windows, you need to change the correct file - C:\WINDOWS\system32\drivers\etc\hosts
Let us know whether it works.. -
9. Re: hostname
mithilwane Jan 8, 2008 7:28 AM (in response to kuvera)The hosts file that i specified is the one from the server m/c.
-
10. Re: hostname
jaikiran Jan 9, 2008 8:32 AM (in response to kuvera)So, are you able to ping myserver.server.com from the machine where this exception is occuring?
-
-
12. Re: hostname
kennychaffin Dec 11, 2008 4:53 PM (in response to kuvera)Thanks for the commentary above. Adding the remote machine to my windows hosts file solved my similar problem.
-
13. Re: hostname
kobiianko May 23, 2010 3:37 AM (in response to kennychaffin)I'm having the same problem,
the solution suggested here, does not seem to be a good one cause I don't wanna make all my users change there hosts file.
Is there a way to make jboss run on IP address only?
I'm having this problem on JBOSS 5.1, with JBOSS 4.0.5 it works fine(using only IP address)
-
14. Re: hostname
ivanbest May 27, 2011 5:38 AM (in response to kobiianko)In your jboss conf - change the following:
- <jboss_home>\server\<your_server>\deploy\jbossws.sar\jbossws.beans\META-INF\jboss-beans.xml
property alwaysModifySOAPAddress should be false
- bind the IP during Jboss start (ex. ./run.sh -b 192.168.2.3) (do not use -b 0.0.0.0)
Tested with Jboss 4.2.3.GA
Enjoy