I've read about 6-7 tutorials on the web about how to set up Apache with Tomcat using mod_jk, all of them different to each other. I feel stupid.
Here is my problem. I can get Tomcat running by itself. I have tried using mod_jk-2 to connect Apache and Tomcat and can bring up Tomcat Examples page using However when I click on one of the examples to run it, nothing happens (the little blue bar at the bottom of IE very slowly gets bigger).
My mod_jk.log says:
[jk_connect.c (203)]: jk_open_socket, connect() failed errno = 61
[jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 61
And I get the following errors like below in localhost_log.txt:
The scratchDir you specified: C:\_\tomcat4118\work\Standalone\localhost:80\tomcat-docs is unusable.
The scratchDir you specified: C:\_\tomcat4118\work\Standalone\localhost:8000\tomcat-docs is unusable.
The errors are repeated for the other directories, webdav, manager, etc.
More information..........
When I startup Apache I get:
24/03/2003 15:42:36 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
24/03/2003 15:42:36 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
24/03/2003 15:42:37 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
24/03/2003 15:42:38 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18
24/03/2003 15:42:50 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
24/03/2003 15:42:50 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
24/03/2003 15:42:50 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/172 config=C:\_\tomcat4118\conf\jk2.properties
And part of my Apache httpd.conf for virtual hosts:
Listen localhost:80
Listen localhost:8000
NameVirtualHost localhost:8000
<VirtualHost localhost:8000>
ServerAdmin myemail@mail.com
ServerName localhost:8000
DocumentRoot "c:/Apache2/htdocs2/"
ErrorLog logs/htdocs2-error.log
TransferLog logs/htdocs2-access.log
</VirtualHost>
I have two host entries in my server.xml, one for each virtual host. They are identical except for the below:
Host name="localhost:80" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false" modJk="c:/Apache2/modules/mod_jk-2.0.43.dll" />
<Host name="localhost:8000" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false" modJk="c:/Apache2/modules/mod_jk-2.0.43.dll" />
I haven't posted my generated mod_jk.conf, because I think I've already posted enough.
I have only two ideas about what may be wrong...
Tomcat doesn't like host names with colons, such as localhost:8000, because it can't create work directories for them, is this correct?
This is wrong: "INFO: JK2: ajp13 listening on /0.0.0.0:8009 " ajp13 should be listening on 127.0.0.1, is this correct?
Sorry for the long post and thankyou to any replies.
The discipline used to write things down is the first step in making them a reality.
Here is my problem. I can get Tomcat running by itself. I have tried using mod_jk-2 to connect Apache and Tomcat and can bring up Tomcat Examples page using However when I click on one of the examples to run it, nothing happens (the little blue bar at the bottom of IE very slowly gets bigger).
My mod_jk.log says:
[jk_connect.c (203)]: jk_open_socket, connect() failed errno = 61
[jk_ajp_common.c (626)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 61
And I get the following errors like below in localhost_log.txt:
The scratchDir you specified: C:\_\tomcat4118\work\Standalone\localhost:80\tomcat-docs is unusable.
The scratchDir you specified: C:\_\tomcat4118\work\Standalone\localhost:8000\tomcat-docs is unusable.
The errors are repeated for the other directories, webdav, manager, etc.
More information..........
When I startup Apache I get:
24/03/2003 15:42:36 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
24/03/2003 15:42:36 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
24/03/2003 15:42:37 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
24/03/2003 15:42:38 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18
24/03/2003 15:42:50 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
24/03/2003 15:42:50 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
24/03/2003 15:42:50 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/172 config=C:\_\tomcat4118\conf\jk2.properties
And part of my Apache httpd.conf for virtual hosts:
Listen localhost:80
Listen localhost:8000
NameVirtualHost localhost:8000
<VirtualHost localhost:8000>
ServerAdmin myemail@mail.com
ServerName localhost:8000
DocumentRoot "c:/Apache2/htdocs2/"
ErrorLog logs/htdocs2-error.log
TransferLog logs/htdocs2-access.log
</VirtualHost>
I have two host entries in my server.xml, one for each virtual host. They are identical except for the below:
Host name="localhost:80" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false" modJk="c:/Apache2/modules/mod_jk-2.0.43.dll" />
<Host name="localhost:8000" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false" modJk="c:/Apache2/modules/mod_jk-2.0.43.dll" />
I haven't posted my generated mod_jk.conf, because I think I've already posted enough.
I have only two ideas about what may be wrong...
Tomcat doesn't like host names with colons, such as localhost:8000, because it can't create work directories for them, is this correct?
This is wrong: "INFO: JK2: ajp13 listening on /0.0.0.0:8009 " ajp13 should be listening on 127.0.0.1, is this correct?
Sorry for the long post and thankyou to any replies.
The discipline used to write things down is the first step in making them a reality.