I am running servoy (5.x) on a win2k3 server that is running IIS. The IIS is delivering a couple of critical applications on port 80 & 443, so servoy is running on 8080 and 8443 (for SSL). Everything is running just fine but the non-standard ports makes it hard to conect to the servoy app sometimes (ie through coprorate firewalls). Server only has a single IP so I cant run the apps on separate IPs. I’d like to put servoy behind IIS on port 80 using the tomecat jk 1.2 connector so that instead of: http://server.com:8080/servoy-webclient
the user can type http://server.com/servoy-webclient
and get to servoy. Much neater
So I followed the instructions for installing an ISAPI filter for IIS 6.0 here: http://www.iisadmin.co.uk/?p=40
The install works perfectly and everything looks good except it doesnt work
When trying to access the servoy app through port 80 I can see in the logs that the ISAPI filter is trying to forward the request onto tomcat:
Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_uri_worker_map.c (863): Found a wildchar match ‘/servoy-webclient*=worker1’
[Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_isapi_plugin.c (1922): check if [/servoy-webclient/] points to the web-inf directory
[Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_isapi_plugin.c (1938): [/servoy-webclient/] is a servlet url - should redirect to worker1
[Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_isapi_plugin.c (1978): fowarding escaped URI [/servoy-webclient/]
…
…but…its doesnt like the reply it gets from tomcat (servoy):
[Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_ajp_common.c (931): Connected socket 632 to (127.0.0.1:8080)
[Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_ajp_common.c (1070): sending to ajp13 pos=4 len=470 max=8192
…
[Sat Dec 12 20:04:12.740 2009] [1468:5956] [debug] jk_ajp_common.c (1560): (worker1) request body to send 0 - request body to resend 0
[Sat Dec 12 20:04:12.771 2009] [1468:5956] [error] jk_ajp_common.c (1172): wrong message format 0x4854 from 127.0.0.1:8080
…after which it fails and the end-user sees a message ‘Bad Gateway’ indicating that the ‘upstream’ server (tomcat/servoy) sent back the wrong answer.
I have spent many hours on this and have exhausted my knowledge of tomcat (not much to start with). Has it got anything to do with the connector type? It seems that the ISAPI filter is trying to make a connection of type ajp13 (standard tomcat connector). But the definations in the server.xml file for servoy are:
protocol=“HTTP/1.1”
would this make any dirrerence? Should I have a protocol=“AJP/1.3” in there somehow?
Any thoughts?
Happy to provide more log files, config files if required but I was tyying to keep the initial post readable
Fixed it!
Here’s the explanation in case anyone else is stupid enough to try and do this
You must have an ajp13 connector defined on another port in the server.xml file - then configure that ISAPI filter to forward requests to that connector. So after you have followed the instructions in the http://www.iisadmin.co.uk/?p=40 link you also need to modify your various setup files so that they look something like this:
worker.properties:
Define 1 real worker using ajp13
worker.list=worker1
Set properties for worker1 (ajp13)
ajp13 sits on another port to receive messages from ISAPI filter
ie to the outside world they both appear to be on the standard (443) SSL port - which is great as it means I can get to them from anywhere through corporate firewalls.