0

Our lab uses several ruggedized military laptops in a closed-network business environment. These computers are running identical Windows 7 versions, networked with static IP's, running Apache Tomcat and Java.

This issue only occurs if the device’s name or IP address is in the local hosts file and when the device is powered up it is not connected to the network. When those combination of factors occur, several web applications fail consistently, resulting in HTTP 500 errors, as follows:

Could not call log service due to:
java.net.UnknownHostException: examplePc1: examplePc1 at
java.net.InetAddress.getLocalHost(Unknown Source)
at ...myservices.wrappers.logservice.LogServiceWrapper.log(Unknown Source)
at org.apache.jsp.checkConnection_jsp._jspService(checkConnection_jsp.java:150)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
etc...

Here are the version details:

  • Microsoft Windows 7 Professional (6.1.7601), Service Pack 1, Build 7601
  • Java 7 (1.7.0_45)
  • Apache Tomcat (7.0)

The issue is resolved when the device's IP address is commented-out or removed from the Hosts file. However having a many more devices at the enterprise level means that tailoring the hosts file for each laptop is not practical.

Is this an issue with Windows 7? If so, where this bug is documented?

I have posted the conjugate question with an emphasis on the suspect code on Stack Overflow, here.

  • What makes you think this is a home network environment? Yes, the details in my question overlaps the Stack Overflow domain, but SE doesn't have a forum covering both. These computers are running in a lab in a CM-controlled business environment. If you knew who the customer was, you would understand that "bleeding-edge" is not their distinguishing characteristic. – MAbraham1 May 27 '15 at 18:24
  • 3
    This looks like a programming question. The code you've cited has many ways it can fail and if you really need something reliable you'll need to rethink how you get the local host name. – Michael Hampton May 27 '15 at 18:39
  • @MichaelHampton, I've reworded it for SF, and provided a similar question on SO. Let me know if the question looks alright, or if something's amiss. – MAbraham1 May 27 '15 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.