WebServices: Diagnosing a WSWS3192E due to a 502 Bad Gateway from the socket layer
 Technote (troubleshooting)
 
Problem(Abstract)
How to resolve the WSWS3192E due to a 502 Bad Gateway?
 
Cause
The problem - WSWS3192E due to a 502 Bad Gateway:

[10/20/04 14:42:43:082 CDT] 3d534f37 enterprise I
com.ibm.ws.webservices.engine.enterprise WSWS3243I: Info: Mapping
Exception to WebServicesFault.
[10/20/04 14:42:43:098 CDT] 3d534f37 enterprise I
com.ibm.ws.webservices.engine.enterprise TRAS0014I: The following
exception was logged WebServicesFault
faultCode: {http://websphere.ibm.com/webservices/}HTTP
faultString: (502)Bad Gateway
faultActor: null
faultDetail:
null: WSWS3192E: Error: return code: 502
<HTML>
<HEAD><TITLE>502 Bad Gateway</TITLE></HEAD>
<BODY>
<H1>Bad Gateway</H1>
<H4>
The following error occurred:<P>
[code=DNS_NO_DATA] The IP address was not found during the DNS lookup.
Contact your system administrator.
</H4>
<HR>
Please contact the administrator.
</BODY>
</HTML>
.
(502)Bad Gateway
at
com.ibm.ws.webservices.engine.transport.http.HTTPSender.readFromSocket(H
TTPSender.java:820)
at
com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSende
r.java:170)

This could be caused by a number of things:

  • run-time libraries not being available to the WebService,
  • networking problems,
  • a proxyHost setting that causes the WebServices request to be routed to the wrong host.
For the latter of the WebServices=all=enabled trace, you might see the following events which indicate a proxyHost is used and tells you what host that is and what port.
[
7/1/05 14:42:23:894 CDT] 233a08cd DefaultSocket d com.ibm.ws.webservices.engine.components.net.DefaultSocketFactory HTTPSender match: host: topaz02.ibm.com, pattern: ibm.com
[7/1/05 14:42:23:894 CDT] 233a08cd DefaultSocket d com.ibm.ws.webservices.engine.components.net.DefaultSocketFactory HTTPSender match: host: topaz02.ibm.com, pattern: IBM.com
[7/1/05 14:42:23:894 CDT] 233a08cd DefaultSocket d com.ibm.ws.webservices.engine.components.net.DefaultSocketFactory WSWS3443I: Info: HTTP Proxy Hostname: corpproxy1.ibm.com, Proxy Port: 3128, Proxy Username: , Proxy Password:
'META-INF/services/com.ibm.ws.webservices.engine.components.net.SocketFactory.props
 
Resolving the problem
1. Provide run-time libraries needed by the WebService
If you are accessing Microsoft® SQL Server from within the Web Service, make sure the run time connectivity libraries are installed on your server.

2. Correcting Network Connectivity or Configuration Problems
This could be the network problem. Check your network configuration and make sure it is correct. That is, make sure that the DNS server is configured properly. Check the configuration of the firewall to make certain you can connect through the firewall to the host that is hosting the Web Service.

Look for network errors such as this:
The following error occurred
[code=DNS_NO_DATA] The IP address was not found during the DNS lookup.

Do a nslookup against the IP and Hostname and make sure it matches the one used in the WebService URL or in the proxyHost setting, if the latter is used.

3. Verifying that the proxyHost settings are correct for the WebService
If the Application Server running the WebServices client or the WebServices client itself sets the proxyHost on the Java™ Virtual Machine (JVM), then it may be that none of the sites where the WebServices servers are located may be reachable, since the server will try to connect through the proxyHost to reach the WebService. Removing the proxyHost setting on the Application Server or not setting the proxyHost explicitly in a WebServices application may allow all of the WebServices application to connect to the proper host and prevent the bad gateway error.
How do you determine whether the Application Server is using a proxyHost. The JVM setting http.proxyHost and https.proxyHost and http.nonProxyHost determines if a proxyHost will be used. It may be that setting of the http.proxyHost or https.proxyHost is causing the problem. This setting can be set on the Generic JVM arguments of the Application Server.

These two links show you how one can set the http.proxyHost and http.proxyPort.
http://java.sun.com/docs/books/tutorial/networking/urls/_setProxy.html

http://www.javaworld.com/javaworld/javatips/jw-javatip42.html

4. The WebService fails due to the proxy authentication not being configured can cause a webservice to fail with this error message. If calling the webservice from a browser window works fine (both locally and from another client), then perhaps the problem is due to the proxy authentication configuration.

1) Accessing remote systems
describes how to configure the Portal Server to access a remote system using a ContentAccessService.

2) Content Access Service
describes the Content Access Service in more detail.

3) For information on configuring Portal Server for proxy authentication, refer to the appropriate Portal Server Information center; for example Portal Server 5.1 Information Center.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Web Services (for example: SOAP or UDDI or WSGW or WSIF)
Operating system(s): AIX
Software version: 5.1.1
Software edition:
Reference #: 1224900
IBM Group: Software Group
Modified date: Dec 7, 2005