I am getting a Bad Gateway! error when running a ColdFusion page that calls a C++ dll.
The CF administrator runs and other pages with cfx dll calls run. The ColdFusion is 32bit because the DLLs are 32 bit. CGI, ASP.NET, and ISAPI are features enabled. The ColdFusion wsconfig ran normally. The iis user on this system has full permissions on directories. The cfx dll calls a 3rd party dll. An executable that makes a similar call to the same 3rd party dll runs successfully on the command line.
This cfx dll and 3rd party dll run on the current production system
- ColdFusion 8 32 bit
- Server 2003 32bit
- IIS 6
- ColdFusion used JRun in this version
Do you have some ideas on how to solve the error?
My server configuration where it is not working is:
- ColdFusion 11 Enterprise 32 bit
- Windows Server 2012 64 bit
- IIS 8.5
- ColdFusion uses Tomcat since version 10
The web page error is:
Bad Gateway!
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
Jakarta/ISAPI/isapi_redirector/1.2.37
The isapi_redirect.log is: Notice how it first runs the CLogP.cfm page, then it runs the wwwroot/index.htm page, and then shuts down the socket. It logs the error can't receive the response header message from tomcat, network problems or tomcat (127.0.0.1:8014) is down (errno=54)
[Wed Jun 03 18:56:57.123 2015] [1840:6896] [debug] ajp_process_callback::jk_ajp_common.c (1934): Getting real path
[Wed Jun 03 18:56:57.124 2015] [1840:6896] [debug] getRealPath::jk_isapi_plugin.c (4032): getRealPath(/myapplication/dlltestpages/CLogP.cfm) = C:\inetpub\wwwroot\mypath\web\dlltestpages\CLogP.cfm
[Wed Jun 03 18:56:57.125 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): sending to ajp13 pos=4 len=59 max=60
[Wed Jun 03 18:56:57.126 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0000 12 34 00 37 36 43 3A 5C 69 6E 65 74 70 75 62 5C - .4.76C:\inetpub\
[Wed Jun 03 18:56:57.126 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0010 77 77 77 72 6F 6F 74 5C 65 63 6F 73 75 71 7A 75 - wwwroot\mypath
[Wed Jun 03 18:56:57.127 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0020 5C 77 65 62 5C 64 6C 6C 74 65 73 74 70 61 67 65 - \web\dlltestpage
[Wed Jun 03 18:56:57.128 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0030 73 5C 43 4C 6F 67 50 2E 63 66 6D 00 00 00 00 00 - s\CLogP.cfm.....
[Wed Jun 03 18:56:57.130 2015] [1840:6896] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1428): received from ajp13 pos=0 len=14 max=65536
[Wed Jun 03 18:56:57.131 2015] [1840:6896] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1428): 0000 0F 00 0A 2F 69 6E 64 65 78 2E 68 74 6D 00 00 00 - .../index.htm...
[Wed Jun 03 18:56:57.132 2015] [1840:6896] [debug] ajp_process_callback::jk_ajp_common.c (1934): Getting real path
[Wed Jun 03 18:56:57.133 2015] [1840:6896] [debug] getRealPath::jk_isapi_plugin.c (4032): getRealPath(/index.htm) = C:\inetpub\wwwroot\index.htm
[Wed Jun 03 18:56:57.133 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): sending to ajp13 pos=4 len=33 max=34
[Wed Jun 03 18:56:57.134 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0000 12 34 00 1D 1C 43 3A 5C 69 6E 65 74 70 75 62 5C - .4...C:\inetpub\
[Wed Jun 03 18:56:57.135 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0010 77 77 77 72 6F 6F 74 5C 69 6E 64 65 78 2E 68 74 - wwwroot\index.ht
[Wed Jun 03 18:56:57.136 2015] [1840:6896] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1233): 0020 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - m...............
[Wed Jun 03 18:57:05.615 2015] [1840:6896] [debug] jk_shutdown_socket::jk_connect.c (732): About to shutdown socket 1644 [127.0.0.1:53412 -> 127.0.0.1:8014]
[Wed Jun 03 18:57:05.675 2015] [1840:6896] [debug] jk_shutdown_socket::jk_connect.c (814): Shutdown socket 1644 [127.0.0.1:53412 -> 127.0.0.1:8014] and read 0 lingering bytes in 0 sec.
[Wed Jun 03 18:57:05.676 2015] [1840:6896] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1316): (cfusion) can't receive the response header message from tomcat, network problems or tomcat (127.0.0.1:8014) is down (errno=54)
[Wed Jun 03 18:57:05.684 2015] [1840:6896] [error] ajp_get_reply::jk_ajp_common.c (2232): (cfusion) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Wed Jun 03 18:57:05.685 2015] [1840:6896] [error] ajp_service::jk_ajp_common.c (2735): (cfusion) sending request to tomcat failed (unrecoverable), (attempt=1)
[Wed Jun 03 18:57:05.687 2015] [1840:6896] [error] HttpExtensionProc::jk_isapi_plugin.c (2612): service() failed with http error 502
[Wed Jun 03 18:57:05.689 2015] [1840:6896] [debug] ajp_reset_endpoint::jk_ajp_common.c (828): (cfusion) resetting endpoint with socket -1 (socket shutdown)
[Wed Jun 03 18:57:05.696 2015] [1840:6896] [debug] ajp_done::jk_ajp_common.c (3218): recycling connection pool for worker cfusion and socket -1
The .cfm test page is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CLogP Test Page</title>
</head>
<body>
<DIV align = "Center">
If you do not get an error, CLogP has been set up correctly
<cfx_ClogP1 Smiles="O=COC=O">
</DIV>
</body>
</html>
The ColdFusion application log is:
Warning
The description for Event ID 80 from source ColdFusion 11 Application Server cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
ColdFusion 11 Application Server
the message resource is present but the message is not found in the string/message table
The cfx C++ definition is:
tag name cfx_CLogP1
server library dll C:/ColdFusion11/cfusion/cfx/ExternalComponents/cfx_CLogP.dll
Procedure ProcessTagRequest
Keep Library Loaded check
The ColdFusion logs show information but not errors.
The web server logs show a 502 error:
#Software: Microsoft Internet Information Services 8.5
#Version: 1.0
#Date: 2015-06-03 23:56:56
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2015-06-03 23:56:56 127.0.0.1 GET /myapplication/dlltestpages/CLogP.cfm - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 401 2 5 14265
2015-06-03 23:56:56 127.0.0.1 GET /myapplication/dlltestpages/CLogP.cfm - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 401 1 2148074254 154
2015-06-03 23:57:05 127.0.0.1 GET /myapplication/dlltestpages/CLogP.cfm - 80 AA\me 127.0.0.1 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 502 0 0 8732