Re: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
I eventually solved this problem. In addition to the first two entries, you also need the 'shm' entry. # workers2.properties # [channel.socket:localhost:8009] tomcatId=localhost:8009 [uri:/jsp-examples/*] [shm] file=/usr/local/apache/logs/shm.file size=1048576 Even if the Tomcat instance is running on a different server than Apache, you still seem to require this "shared memory" entry. The documentation doesn't seem to indicate that [shm] is a *requirement*, so I can only assume there's something different about my environment. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
I'm not sure it matters but you should try to define the worker before the uri mapping. Or else take out the worker property all together in the uri definition for the /examples-jsp path. [uri:/jsp-examples/*] info=Map the whole webapp - Original Message - From: "Jeremy Barth" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 23, 2003 1:42 PM Subject: Re: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48 > At 01:13 PM 12/23/2003 -0800, Liem Do wrote: > >Try adding a worker definition to the workers2.properties like below. Your > >jsp-examples uri mapping specifies a worker but there's none defined in the > >file. > > > ># define the worker > >[ajp13:localhost:8009] > >channel=channel.socket:localhost:8009 > > > >Hope that helps. > >LD > > Thanks, but even with this workers2.properties file: > > [channel.socket:localhost:8009] > info=Ajp13 forwarding over socket > tomcatId=localhost:8009 > > [uri:/jsp-examples/*] > info=Map the whole webapp > worker=ajp13:localhost:8009 > > [ajp13:localhost:8009] > channel=channel.socket:localhost:8009 > > "http://servername/jsp-examples"; doesn't work. > > Again, the Tomcat documentation at: > > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html > > clearly describes a working "Minimum Configuration" workers2.properties file: > > # Define the communication channel > [channel.socket:localhost:8009] > info=Ajp13 forwarding over socket > tomcatId=localhost:8009 > > # Map the Tomcat examples webapp to the Web server uri space > [uri:/jsp-examples/*] # the actual URI is "/examples/*" which doesn't exist > info=Map the whole webapp > > that purportedly works, but I just get 500 errors. Sorry to be taking up > list bandwidth for what's probably just my own denseness. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
At 01:13 PM 12/23/2003 -0800, Liem Do wrote: >Try adding a worker definition to the workers2.properties like below. Your >jsp-examples uri mapping specifies a worker but there's none defined in the >file. > ># define the worker >[ajp13:localhost:8009] >channel=channel.socket:localhost:8009 > >Hope that helps. >LD Thanks, but even with this workers2.properties file: [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 [uri:/jsp-examples/*] info=Map the whole webapp worker=ajp13:localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 "http://servername/jsp-examples"; doesn't work. Again, the Tomcat documentation at: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html clearly describes a working "Minimum Configuration" workers2.properties file: # Define the communication channel [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 # Map the Tomcat examples webapp to the Web server uri space [uri:/jsp-examples/*] # the actual URI is "/examples/*" which doesn't exist info=Map the whole webapp that purportedly works, but I just get 500 errors. Sorry to be taking up list bandwidth for what's probably just my own denseness. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
Try adding a worker definition to the workers2.properties like below. Your jsp-examples uri mapping specifies a worker but there's none defined in the file. # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 Hope that helps. LD - Original Message - From: "Jeremy Barth" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 23, 2003 12:57 PM Subject: RE: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48 > At 01:33 PM 12/23/2003 -0700, Wendell Holmes wrote: > >If jkstatus works, then Apache is working with Tomcat, no? > >IIRC, the actual path to the jsp-examples is /webapps/examples/jsp-examples, > >so your uri mapping should be [uri:/examples/jsp-examples/*] I think. > > > >You should have an Apache error log that says 'file does not exist' where > >you tried to access /jsp-examples, since Apache nor jk2 would have a path to > >that dir. > > > >Wendell > > I don't know about Tomcat 4, but in Tomcat 5 there is no "examples" > webapp. In the webapps dir for Tomcat 5 you've got: > > ROOT/ > balancer/ > jsp-examples/ > servlets-examples/ > tomcat-docs/ > > Also, "jsp-examples" does work when executed directly from port 8080, so > I don't think the pathline to the webapp itself is incorrect: > > http://servername:8080/jsp-examples Works -- talk directly to Tomcat > http://servername/jsp-examples FAILS -- via JK2 connector > > I've tried the same setup (mod_jk2/tomcat5.0.16/apache2.0.48) in both > Unix and Windows with the same result, so whatever mistake I'm making, > it's consistent. If anyone else has gotten the examples to work, I'd > be interested in how you did it. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
At 01:33 PM 12/23/2003 -0700, Wendell Holmes wrote: >If jkstatus works, then Apache is working with Tomcat, no? >IIRC, the actual path to the jsp-examples is /webapps/examples/jsp-examples, >so your uri mapping should be [uri:/examples/jsp-examples/*] I think. > >You should have an Apache error log that says 'file does not exist' where >you tried to access /jsp-examples, since Apache nor jk2 would have a path to >that dir. > >Wendell I don't know about Tomcat 4, but in Tomcat 5 there is no "examples" webapp. In the webapps dir for Tomcat 5 you've got: ROOT/ balancer/ jsp-examples/ servlets-examples/ tomcat-docs/ Also, "jsp-examples" does work when executed directly from port 8080, so I don't think the pathline to the webapp itself is incorrect: http://servername:8080/jsp-examples Works -- talk directly to Tomcat http://servername/jsp-examples FAILS -- via JK2 connector I've tried the same setup (mod_jk2/tomcat5.0.16/apache2.0.48) in both Unix and Windows with the same result, so whatever mistake I'm making, it's consistent. If anyone else has gotten the examples to work, I'd be interested in how you did it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48
If jkstatus works, then Apache is working with Tomcat, no? IIRC, the actual path to the jsp-examples is /webapps/examples/jsp-examples, so your uri mapping should be [uri:/examples/jsp-examples/*] I think. You should have an Apache error log that says 'file does not exist' where you tried to access /jsp-examples, since Apache nor jk2 would have a path to that dir. Wendell -Original Message- From: Jeremy Barth [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 11:42 AM To: [EMAIL PROTECTED] Subject: mod_jk2/2.0.2 failure in Tomcat 5.0.16 / Apache 2.0.48 I've looked at the list archives, but can't find much on JK2 with Tomcat 5 (though there's plenty of material on Tomcat 4). I'm sure I'm missing something obvious, but I can't get even the example webapps to work with Apache 2.0.48 / Tomcat 5.0.16 / JK2. I am following the example given here (yes, the documentation that comes with Tomcat 5 refers to this v4.1 page): http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/confighowto.html My config and log files are below, but in essence here is the problem: http://servername/jkstatus Works -- verify JK module status http://servername:8080/jsp-examples Works -- talk directly to Tomcat http://servername/jsp-examples FAILS -- via JK2 connector Here are my config files, very simple and based on that confighowto.html: workers2.properties [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 # The documentation refers to "examples" but there is no such webapp in # Tomcat 5; there is, however, a jsp-examples webapp # [uri:/jsp-examples/*] info=Map the whole webapp worker=ajp13:localhost:8009 # Set up jkstatus and debug logging # [status:status] info=Status worker, displays runtime info [uri:/jkstatus/*] info=Display status info and checks config file for changes group=status: worker=status:status [logger] level=DEBUG [logger.file:my_logfile] level=DEBUG file=/usr/local/apache/logs/jk2.log [workerEnv:] info=Global server options logger=logger.file:my_logfile jk2.properties Empty (i.e. just accept the defaults, e.g. channelSocket.port=8009) server.xml factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml httpd.conf -- # Add in the jk2 module LoadModule jk2_module modules/mod_jk2.so The log files: /usr/local/apache/logs/jk2.log simply says it couldn't connect, but no indication is given as to why: ( info ) [jk_logger_file.c (184)] Initializing log file /usr/local/apache/logs/jk2.log (debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98 (debug ) [jk_env.c (248)] env.createBean2(): Create [lb] lb (debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null) (debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:6 21bc60 (debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null) (debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:7 21fc70 (debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98 (debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null) (debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:8 223c80 (debug ) [jk_env.c (312)] env.createBean2(): register lb:lb 219c30 (debug ) [jk_env.c (248)] env.createBean2(): Create [threadMutex] (null) (debug ) [jk_env.c (312)] env.createBean2(): register threadMutex:9 225c88 (debug ) [jk_env.c (383)] env.getByName(): Get by name ajp13:localhost:8009 1fdbe8 (debug ) [jk_env.c (383)] env.getByName(): Get by name ajp13:localhost:8009 1fdbe8 (debug ) [jk_env.c (248)] env.createBean2(): Create [handler.response] (debug ) [jk_env.c (312)] env.createBean2(): register handler.response: 227c98 (debug ) [jk_env.c (248)] env.createBean2(): Create [handler.logon] (debug ) [jk_env.c (312)] env.createBean2(): register handler.logon: 1c71e0 (error ) [jk_shm.c (333)] shm.init(): No file (debug ) [jk_env.c (248)] env.createBean2(): Create [uri] * (debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98 (debug ) [jk_env.c (312)] env.createBean2(): register uri:* 245bc0 (debug ) [jk_uriMap.c (377)] uriMap.init() Fixing Host * (debug ) [jk_env.c (248)] env.createBean2(): Create [uri] */ (debug ) [jk_env.c (383)] env.getByName(): Get by name workerEnv 1edb98 (debug ) [jk_env.c (312)] env.createBean2(): register uri:*/ 249bd0 (debug ) [jk_uriMap.c (464)] uriMap: fix uri (null) context (null) host * (debug ) [jk_uriMap.c (464)] uriMap: fix uri /jsp-examples/* context (null) host * (debug ) [jk_uriMap.c (464)] uriMap: fix uri /jkstatus/* context (null) host *