In our enterprize application, App-server (Glassfish) connects to a Content Management system to get some static content to be displayed on web pages. Connection is made through:
org.apache.commons.httpclient.HttpClient
There are 4 App-Servers to server user's HTTPRequests and all of them connects to this content management system to fetch static content.
Let's assume CMS URL that App-Server connect to is : http://somedomain.com/content
This mechanism works fine without any issue, but sometimes one of these App-server starts throwing:
java.net.NoRouteToHostException: No route to host
This exception appears from just one of these serverthat indicates there is no global issue with the connectivity to Content Management System. When this exception occurs I even tried hitting the CMS through web browser by typing http://somedomain.com/content
in address bar and that works fine.
When we restart the affected Server, problem disappears.
Would like to know what can dynamically introduce this error?