I have a linux system where a java web server application runs. The eth0 of this system is configured /started after the java application successfully starts, hence, when the jvm starts there is no network available.
The etc/hosts file contains the following:
*127.0.0.1 localhost.localdomain localhost*
*::1 localhost.localdomain localhost*
I want to monitor the JVM with Jconsole, hence I did change my startup script with the following:
But when I start my system I get the following error in my logging: Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: (none): (none)
And basically my server doesnt start and as a consequence network stays down.
My question is why do the jmx agent needs a network connection in order to properly start???
I have as well the possibility to have a second network connection via an usb key.
ethusb0 Link encap:Ethernet HWaddr inet addr:126.96.36.199 Bcast:0.0.0.0 Mask:255.255.255.192 inet6 addr:
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host
This should be up before my start.sh is executed. I had added to my start script the following:
Bu I still get the same error Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: (none): (none)
Can you please help me with some suggestions??? I don't know how the jmx agent and the MBean Server are starting within the jvm hence i can't really understand my problem.