Gateway connection refused

Gateway connection refused: 
HTTP/1.0 502 Bad Gateway|Restart Connection

This error message indicates that something is wrong with the hostname or port# used to connect to your Adaptive Server. Check the [query] entry in $SYBASE/interfaces (UNIX) or in %SYBASE%\ini\sql.ini (Windows).

If the problem persists after you have verified the hostname and port#, you can learn more by starting the HTTP server using the “verbose” system property.

For Windows, go to a DOS prompt and enter:

httpd -Dverbose=1 > filename

For UNIX, enter:

sh httpd.sh -Dverbose=1 > filename &

where filename is the debug messages output file.

Your Web server probably does not support the connect method. Applets can connect only to the host from which they were downloaded.

The HTTP gateway and your Web server must run on the same host. In this scenario, your applet can connect to the same machine/host through the port controlled by the HTTP gateway, which routes the request to the appropriate database.

To see how this is accomplished, review the source of Isql.java and gateway.html in the sample2 subdirectory under the jConnect installation directory. Search for “proxy.”