Topic
  • 5 replies
  • Latest Post - ‏2012-11-21T16:39:13Z by peacocb
SystemAdmin
SystemAdmin
188 Posts

Pinned topic Unable to start HealthCenter agent when the hostname includes underscore

‏2012-11-21T10:27:33Z |
I noticed that if the hostname includes underscore ("_"), HealthCenter fails to start.
Attached are the error messages I encountered with AIX Java5 SR12. The hostname is aix_per in this case.
I know that underscore is not allowed for the hostname, but the client does not want to change it so quickly.

The question is: Is there any workaround to resolve this situation, like explicitly specifying the IP address of the host?

$java -Xhealthcenter:port=1980
Nov 21, 2012 7:19:22 PM com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean startMBeanServer
SEVERE: Health Center agent failed to start.
java.net.MalformedURLException: Bad URL path: _per:1980/jndi/rmi://aix_per:1980/jmxrmi
at javax.management.remote.JMXServiceURL.validate(JMXServiceURL.java:363)
at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:223)
at com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean.startMBeanServer(HCLaunchMBean.java:529)
at com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean$JmxStarterThread.run(HCLaunchMBean.java:252)
Nov 21, 2012 7:19:22 PM com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean startAgent
INFO: Health Center agent did not start correctly.
Nov 21, 2012 7:19:22 PM com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean startAgent
INFO: Agent version "1.3.0.20101014"

Usage: java -options class http://args...
(following lines omitted)
I tried -Djava.rmi.server.hostname=<ipaddress>, but it seems that this property does not work for HealthCenter.

$ java -Djava.rmi.server.hostname=10.90.10.100 -Xhealthcenter:port=1980
Nov 21, 2012 7:27:21 PM com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean startMBeanServer
SEVERE: Health Center agent failed to start.
java.net.MalformedURLException: Bad URL path: _per:1980/jndi/rmi://aix_per:1980/jmxrmi
at javax.management.remote.JMXServiceURL.validate(JMXServiceURL.java:363)
at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:223)
at com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean.startMBeanServer(HCLaunchMBean.java:529)
at com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean$JmxStarterThread.run(HCLaunchMBean.java:252)
Nov 21, 2012 7:27:21 PM com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean startAgent
INFO: Health Center agent did not start correctly.
Nov 21, 2012 7:27:21 PM com.ibm.java.diagnostics.healthcenter.agent.mbean.HCLaunchMBean startAgent
INFO: Agent version "1.3.0.20101014"

Usage: java -options class http://args...
Updated on 2012-11-21T16:39:13Z at 2012-11-21T16:39:13Z by peacocb
  • SystemAdmin
    SystemAdmin
    188 Posts

    Re: Unable to start HealthCenter agent when the hostname includes underscore

    ‏2012-11-21T10:58:34Z  
    Hi,

    Yes you can use the ip address instead of the host name.

    regards

    Toby
  • SystemAdmin
    SystemAdmin
    188 Posts

    Re: Unable to start HealthCenter agent when the hostname includes underscore

    ‏2012-11-21T11:20:17Z  
    Hi,

    Yes you can use the ip address instead of the host name.

    regards

    Toby
    Hi,

    Apologies but I misread your post. For the health center agent to start, it does require a valid hostname that does not contain an underscore. It is not possible to override with an ip address.

    regards

    Toby
  • peacocb
    peacocb
    22 Posts

    Re: Unable to start HealthCenter agent when the hostname includes underscore

    ‏2012-11-21T13:05:10Z  
    As an aside, I see you are running rather an old version of the agent (1.3) ... I suggest you upgrade the agent as this will provide more data for the client to visualize.

    The newer agents are shipped inside the client so assuming you have the latest client, you will have access to 2.0 agents. The agents are avail;able on a clickable link inside the Health Center client help. The way I get to the link is Help->Search and type "agent" in the search field. Then select the "Installing the Health Center agent" link.

    Brian Peacock
  • SystemAdmin
    SystemAdmin
    188 Posts

    Re: Unable to start HealthCenter agent when the hostname includes underscore

    ‏2012-11-21T15:16:37Z  
    Hi,

    Apologies but I misread your post. For the health center agent to start, it does require a valid hostname that does not contain an underscore. It is not possible to override with an ip address.

    regards

    Toby
    Thank you for the quick response!

    Is this not solved even if I switch to the latest agent as described below? It is difficult to ask the client to change the hostname.
  • peacocb
    peacocb
    22 Posts

    Re: Unable to start HealthCenter agent when the hostname includes underscore

    ‏2012-11-21T16:39:13Z  
    Thank you for the quick response!

    Is this not solved even if I switch to the latest agent as described below? It is difficult to ask the client to change the hostname.
    > Is this not solved even if I switch to the latest agent as described below?
    I don't believe a new agent will change this behaviour as the code in that particular area has not changed (from a quick scan of the code), sorry.

    > It is difficult to ask the client to change the hostname.
    That's a lot easier than trying to get http://www.ietf.org/rfc/rfc952.txt changed and then the Java System Classes changed :-)

    But seriously, I've tried this on my machine which happens to be Linux, and it works even with a 1.3 agent. This is just a lucky coincidence from the way localhost processing occurs on Linux and the extra code inside the Health Center agent to cater for this.

    On Linux a getLocalhost() call will return 127.0.0.1 instead of the correct ipAddress. Because of this extra code has to determine the real ipAddress and once it has done this it doesn't try and resolve it to a hostname and it uses the ipAddress when calling JMX. On Linux you can use the -Djava.rmi.server.hostname to override the ipAddress that the code calculates in case it is wrong, but on AIX this isn't used as the getLocalhost() call always works and thus the hostname can be determined from the DNS.

    Brian Peacock