Thursday, November 27, 2008

SSL + Tomcat workaround

*GEEK POST*

The patience on my colleague and myself has been wearing thin for the past 2 days. This being the third day, I guess, should be considered part of the "third time's a charm" concept.

Our problem was, our Tomcat 5.5.26 on a Windows Server 2003 machine requiring use of SSL, but did not behave. Port 443 was open and ready. https://tomcatserver failed to worked where http://tomcatserver:443 (i.e. non-secure) functioned normally. Firefox returned "Connection was interrupted" error message, and IE came back with something similar.

We've tried everything we could lay our Googly hands on. From various settings in the server.xml to verification of the SSL cert we've gotten from our Certification Authority. Everything appeared to be in order!

Then just this morning, I spotted something in the Google search I had left open since yesterday. This gave me a bit of clue which led me to finding this and also this as a whole thread of emails relating to my problem.

The bottom line is, disable/remove/rename the tcnative-1.dll file found in your Tomcat /bin folder and restart Tomcat. For example, I'd renamed mine to tcnative-1.dll~ to "disable" it. Thinking back, I realised I was asking for it when my itchy finger selected the "Native" option during the Tomcat installation. Apparently, although this native library is meant to help with scalability and performance of the server, it does NOT work.

We've practically wasted 2 whole days trying to figure this out,
throwing aside (almost) every other task we still have to complete. Surprisingly, we got saved by a forum thread message from a year ago (20 Jun 2007 to be exact) and also the bug report email thread of Tomcat two years (4 Aug 2006) ago. This said, the question that begs to be asked then is: shouldn't this problem be rectified after all this while? The original bug report dates all the way back to 10 Nov 2005!!!

No comments: