This is a discussion on Integration of tomcat and apache within the Apache Web Server forums, part of the Web Server and Related Forums category; I think I'm very close now. I can get apache and tomcat working independently of each other - I can ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I think I'm very close now.
I can get apache and tomcat working independently of each other - I can create independent servlet development directories for tomcat, etc. However, I decided to integrate the two of them mostly because apache is a "generally speaking" better web server than tomcat. I decided to use the jk_mod route to integrate the two and I think my only real problem is getting the appropriate dll. I'm using Apache 2.0.45 and tomcat 4.1.27. I've gone through this tutorial: http://www.galatea.com/flashguides/a...t-24-win32.xml which for some reason I found hard to find, but eventually the best integration tutorial I ever found - very clear and more importantly appopriate for my configuration (i.e. Apache 2.0.45 and tomcat 4.1.27). Anyway, I started out using this dll: mod_jk2-2.0.43.dll from this URL: http://jakarta.apache.org/builds/jak...0.2/bin/win32/ And I made it all the way to starting Tomcat, then I started Apache from the command prompt and I got this error: Syntax error on line 4 of C:/programs/Apache Group/Tomcat 4.1/conf/auto/mod_jk.c onf: Can't locate API module structure `jk_module' in file C:/programs/Apache Group/A pache2/modules/mod_jk2-2.0.43.dll: No error So I immediately conclude there must be a problem with the dll I downloaded - sure enough, I notice this text on the webpage I grabbed the dll from: mod_jk2-2.0.43.dll is for Apache 2.0.43 (and only 2.0.43) So this tells me that I have to get the dll that is appropriate for 2.0.45 - but there doesn't seem a dll from the jk2 release that is appropriate for that version of Apache. So I revert back to the old version of jk at: http://jakarta.apache.org/builds/jak...-connectors/jk and I grab the dll from: http://jakarta.apache.org/builds/jak...2.4/bin/win32/ (since I figure I want the latest version of the old jk application - v1.2.4) and I get this dll: mod_jk_2.0.46.dll and then I get this message: (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Well, as it turns out I actually configured tomcat to run on port 80 before so I could test my webapps without having to append the :8080 onto the URL, so I change tomcat back to using 8080 so that it doesn't intefere with Apache trying to make use of that port. Then I get tomcat running, then apache... this is a first at this point having both applications running with apache loading the mod_jk dll. Then I try one of my servlet applications and tomcat spits out this: Oct 5, 2003 2:02:11 PM org.apache.jk.common.ChannelSocket init INFO: Port busy 8009 java.net.BindException: Address already in use: JVM_Bind Oct 5, 2003 2:02:11 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8010 Oct 5, 2003 2:02:11 PM org.apache.jk.server.JkMain start INFO: Jk running ID=1 time=15/62 config=C:\programs\Apache Group\Tomcat 4.1\co f\jk2.properties Oct 5, 2003 2:02:28 PM org.apache.jk.common.MsgAjp processHeader SEVERE: BAD packet signature 4661 12 35 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 | .5.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 00 | . Unknown message 16 12 35 00 1d 10 80 01 00 00 00 15 41 70 61 63 68 | .5...?.....Apach 65 2f 32 2e 30 2e 34 35 20 28 57 69 6e 33 32 29 | e/2.0.45 (Win32) 00 | . This looks like a memory dump of what is being executed so again I assume this must be a problem with the dll. Then I notice that the name of the dll could be an indication of the version of Apache it is supposed to run with - so I grab this dll: mod_jk_2.0.45.dll from this page: http://jakarta.apache.org/builds/jak...2.3/bin/win32/ but then the same error happens again - i.e. tomcat spits out this: Oct 5, 2003 2:09:09 PM org.apache.jk.common.ChannelSocket init INFO: Port busy 8009 java.net.BindException: Address already in use: JVM_Bind Oct 5, 2003 2:09:09 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8010 Oct 5, 2003 2:09:09 PM org.apache.jk.server.JkMain start INFO: Jk running ID=1 time=0/47 config=C:\programs\Apache Group\Tomcat 4.1\conf \jk2.properties Oct 5, 2003 2:09:47 PM org.apache.jk.common.MsgAjp processHeader SEVERE: BAD packet signature 4661 12 35 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 | .5.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 00 | . Unknown message 16 12 35 00 1d 10 80 01 00 00 00 15 41 70 61 63 68 | .5...?.....Apach 65 2f 32 2e 30 2e 34 35 20 28 57 69 6e 33 32 29 | e/2.0.45 (Win32) 00 | . So now I'm at a loss - I think all of my configuration files (for both apache and tomcat) are configured properly - is the only real solution to this problem to simply get Apache 2.0.43 and then do this over again or is there a dll out there that will work in conjuncture with Apache 2.0.45 and tomcat 4.1.27 ??? Thanks, Novice |
|
|||
|
On 5 Oct 2003 11:09:05 -0700, in alt.apache.configuration you wrote:
>I think I'm very close now. I think so too. >Then I try one of my servlet applications and tomcat spits out this: >Oct 5, 2003 2:02:11 PM org.apache.jk.common.ChannelSocket init >INFO: Port busy 8009 java.net.BindException: Address already in use: >JVM_Bind >Oct 5, 2003 2:02:11 PM org.apache.jk.common.ChannelSocket init >INFO: JK2: ajp13 listening on /0.0.0.0:8010 >Oct 5, 2003 2:02:11 PM org.apache.jk.server.JkMain start >INFO: Jk running ID=1 time=15/62 config=C:\programs\Apache >Group\Tomcat 4.1\co >f\jk2.properties Without really double checking all your ver. numbers it sounds to me that you have the correct dll. I've only done this successfully a handfull of times and it is always like this. I would look at your server.xml file next and see if you've still got the jk1 connector defined or something. I don't think it would get this far if you had the wrong dll. In that case I don't think Apache would start successfully. I usually do it on Linux because I hate compiling Apache on Windows. |