Seeing java.net.ConnectException: Connection timed out in EAP / JWS logs

Solution Verified - Updated -

Issue

  • Unable to connect database server from JWS server and seeing Caused by: java.net.ConnectException: (Connection timed out)at log.
  • Calls to external web services are causing the error Caused by: java.net.ConnectException: Connection timed out. The error is intermittent, in our tests occurs only in this server.

      2019-08-20 07:38:19,468 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-27) Error Rendering View[/context/main.xhtml]: javax.faces.FacesException: javax.el.ELException: /context/page.xhtml @639,178 value="#{queryMB.viewImage(file)}": javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request
      at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2415)
      ...
      Caused by: java.net.ConnectException: Connection timeout (Connection timed out)
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      at java.net.Socket.connect(Socket.java:589)
      at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
      at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
      at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
      at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:883)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
      at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:283)
      ... 150 more
    

Environment

  • Red Hat JBoss Web Server (JWS)
    • 5.x
  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content