Click to See Complete Forum and Search --> : I would pay $ for a jakarta-tomcat NHF


nanode
02-19-2001, 01:29 PM
After several weeks I've come back to the task of getting jakarta-tomcat to work. For those who don't know, tomcat is a java servlet engine.

I have tomcat built and installed. It will start up properly without complaint. My problem is with apache.

per jakarta docs. I add these lines to apache's httpd.conf


#
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /usr/local/jakarta/jakarta-tomcat/conf/workers.properties
JkLogFile /usr/local/apache/logs/mod_jk.log
JkLogLevel warn


And when I attempt to start apache:


root@stout:/usr/local/jakarta/build/tomcat/bin# /usr/local/apache/bin/apachectl start
Syntax error on line 211 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_jk.so into server: /usr/local/apache/libexec/mod_jk.so: undefined symbol: ajp12_worker_factory
/usr/local/apache/bin/apachectl start: httpd could not be started
root@stout:/usr/local/jakarta/build/tomcat/bin#


I was able to successfully compile modk_jk.so and cp it to apache's libexec.

Any ideas or direction is greatly appreciated.

PLBlaze
02-20-2001, 01:11 PM
What package contains mod_jk.so?I have tomcat running on apache 1.3.14 but will upgrade to 1.3.17 soon and would like to build jserv/jakarta tomcat/ant again.I only have mod_jserv.so with my apache.More details would be welcome...stop by irc.worldirc.org #linuxnewbie maybe we could discuss the issue?

nanode
02-20-2001, 01:36 PM
PLBlaze:

Thanks for the offer. I am beginning to narrow down the issue. I've fixed up the include into httpd.conf - but I still am getting issues loading mod_jk.so.

BTW: I believe I built that from .../native/apache-1.3/

I am also running apache 1.3.14, per the jakarta docs mod_jk.so was supposedly an improvement of mod_jserv.so

I feel like everyone else is at this big party and I wasn't invited - want this to work :)

PLBlaze
02-20-2001, 03:01 PM
I played even more with tomcat and yes now i get the point (mod_jk.so is the replacemet for older mod_jserv.so).I went ahead and built mod_jk.so,copied it to apache/libexec directory,stopped apache then edited httpd.conf and added a line to load the module along with few others pointing to tomcat/mod_jk configuration files then started apache and tomcat (startup.sh in tomcat's bin dir) and guess what? it worked not a single problem.Maybe you should try a search on google for mod_jk.so?it should bring some related stuff.If you need more info email me and i'll try to help ya with mod_jk.Hope this helps again.

nanode
02-20-2001, 03:53 PM
PL:

are you including the mod_jk.conf-auto (or whatever it was) or the plain mod_jk.conf?

I read somewhere to cp the auto to the plain one and then include that into httpd.conf
I know I'm close. :)
Thanks for the encouragement.

PLBlaze
02-28-2001, 01:31 AM
nanode, yes i do have a line pointing to the conf file but beware,tomcat it's picky about config files because upon startup it creates it's own file.This is what i have in my httpd.conf



LoadModule jk_module libexec/mod_jk.so

AddModule mod_jk.c

JkWorkersFile /usr/local/jakarta/build/tomcat/conf/workers.properties

JkLogFile /var/lib/apache/logs/mod_jk.log

JkLogLevel warn

Include /usr/local/jakarta/build/tomcat/conf/mod_jk.conf-auto



That's all i had to do to get tomcat running,just make sure to start it up via startup.sh in it's bin directory.Then fire up your browser and point it at http://localhost/tomcat or http://localhost:8080 Hope this helps again.

[ 28 February 2001: Message edited by: PLBlaze ]

nanode
02-28-2001, 10:54 AM
PLBlaze:

Thanks for the reply. Your example was helpful, but I still get a complaint about ajp12_worker_factory when I startup apache.


root@stout:/usr/local/jakarta/build/tomcat/bin# /usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl stop: httpd stopped
root@stout:/usr/local/jakarta/build/tomcat/bin# ./startup.sh
Using classpath: /usr/local/jakarta/build/tomcat/classes:/usr/local/jakarta/build/tomcat/lib/ant.jar:/usr/local/jakarta/build/tomcat/lib/jaxp.jar:/usr/local/jakarta/build/tomcat/lib/parser.jar:/usr /local/jakarta/build/tomcat/lib/servlet.jar:/usr/local/jakarta/build/tomcat/lib/test:/usr/local/jdk1.3/lib/tools.jar:/root/myjava:/home/nanode/myjava/tapper/lib:/home/nanode/myjava /screenpainter/lib:/usr/local/jakarta/jakarta-ant/lib/ant.jar:/usr/local/jaxp1.0.1/parser.jar:/usr/local/jaxp1.0.1/jaxp.jar:/usr/local/jsse1.0.2/lib/jcert.jar:/usr/local/jsse1.0.2/ lib/jnet.jar:/usr/local/jsse1.0.2/lib/jsse.jar:/home/nanode/myjava/package/lib:/usr/local/jython-2.0/jython.jar:.
root@stout:/usr/local/jakarta/build/tomcat/bin# 2001-02-28 06:46:07 - ContextManager: Adding context Ctx( /examples )
2001-02-28 06:46:07 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2001-02-28 06:46:07 - ContextManager: Adding context Ctx( )
2001-02-28 06:46:07 - ContextManager: Adding context Ctx( /test )
2001-02-28 06:46:09 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2001-02-28 06:46:09 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007

root@stout:/usr/local/jakarta/build/tomcat/bin# /usr/local/apache/bin/apachectl start
Syntax error on line 218 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_jk.so into server: /usr/local/apache/libexec/mod_jk.so: undefined symbol: ajp12_worker_factory
/usr/local/apache/bin/apachectl start: httpd could not be started
root@stout:/usr/local/jakarta/build/tomcat/bin#


I suspect mod_jk.so was somehow improperly built. Looking at the .so file (I know it's compiled) does show ajp12_worker_factory several times.

Anyhow, you've renewed my interest. I'll get this working.

Thanks