Author Topic: infraserver VM error occurs while pollme.jar is executing  (Read 207 times)

Miles

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
infraserver VM error occurs while pollme.jar is executing
« on: June 04, 2017, 11:17:55 AM »
The firewall is disabled and "java -jar /opt/SPECpoll/pollme.jar -n \`hostname\`-int -p 8001 > /tmp/pollme.out 2>&1&" >> /etc/rc.d/rc.local" is wrote to rc.local.
After reboot, the java command doesn't work well and there is error message in pollme.out.
And the similar error is in my werbserver.

pollme.out

Creating RMI listener using RMI Registry port 8001
[ERROR] RMI server bind fails: java.rmi.UnknownHostException: Unknown host: Infraserver-int; nested exception is:
   java.net.UnknownHostException: Infraserver-int
java.rmi.UnknownHostException: Unknown host: Infraserver-int; nested exception is:
   java.net.UnknownHostException: Infraserver-int
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:616)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
   at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
   at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
   at java.rmi.Naming.rebind(Naming.java:177)
   at org.spec.specpoll.pollme.main(pollme.java:195)
Caused by: java.net.UnknownHostException: Infraserver-int
   at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
   at java.net.Socket.connect(Socket.java:579)
   at java.net.Socket.connect(Socket.java:528)
   at java.net.Socket.<init>(Socket.java:425)
   at java.net.Socket.<init>(Socket.java:208)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
   ... 6 more
« Last Edit: June 05, 2017, 01:13:36 AM by Miles »

abond

  • Moderator
  • Newbie
  • *****
  • Posts: 30
  • Karma: +5/-0
Re: infraserver VM error occurs while pollme.jar is executing
« Reply #1 on: June 06, 2017, 04:04:04 PM »
Is there an entry for infraserver-int in the /etc/hosts file on the infraserver VM?

abond

  • Moderator
  • Newbie
  • *****
  • Posts: 30
  • Karma: +5/-0
Re: infraserver VM error occurs while pollme.jar is executing
« Reply #2 on: June 06, 2017, 04:24:58 PM »
Also you might want to try just running the command by itself on the command line to try and get any issues fixed without having to run it from rc.local.

You can just run the command:
java -jar /opt/SPECpoll/pollme.jar -n `hostname`-int -p 8001

Sometimes there are also differences in the shell environment present when the rc.local commands are run that what is set up under your normal root or other interactive login.  Running it from the interactive login will help validate that the command can work correctly.  If work correctly in an interactive login, you can then look at what differences there might be in the shell environment running at boot time.

Andy

Miles

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +0/-0
Re: infraserver VM error occurs while pollme.jar is executing
« Reply #3 on: June 11, 2017, 11:43:03 AM »
HI abond
Sorry for my late feedback.
Thanks for your suggestion.
But I got the same result.

AnoopGupta

  • Moderator
  • Jr. Member
  • *****
  • Posts: 60
  • Karma: +0/-0
Re: infraserver VM error occurs while pollme.jar is executing
« Reply #4 on: June 12, 2017, 12:30:12 PM »
Note that hostname is case sensitive. Please ensure you have an entry for Infraserver-int and an IP address specified in /etc/hosts

If you continue to see the UnknownHostException, please attach your /etc/hosts file.