tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emerson Cargnin <emer...@tre-sc.gov.br>
Subject Re: connection apache 1.3 to tomcat 4.1.24
Date Tue, 13 May 2003 18:11:26 GMT
could someone send an working copy of server.xml,workers.properties and 
httpd.conf ?
I need a conf with auto-conf working....

Hey john, i attached the files you ask......

I don't know why, but after changing debug direct at mod_jk.conf to 
emerg it looks that even when deleting this file, tomcat generates the 
conf file with emerg mode.... how i put this back? I tried to put 
debug="debug" at the "<listener..." under "<Host..." but it keeps 
generating emerg : )

Thanks for your help....


John Turner wrote:

>
> Are you sure you are using Apache 1.3?  Apache 1 typically needs both 
> LoadModule and AddModule, you can always put the AddModule directive 
> into an IF statement if needed, there are several examples of this in 
> a default httpd.conf file.
>
> My HOWTO doesn't say anything about AddModule because my HOWTO deals 
> with Apache 2, and Apache 2 doesn't use AddModule.
>
> Regarding the Apache log error, my guess is your VirtualHosts are not 
> correct, it looks like Apache is looking for numguess.jsp within its 
> default DocumentRoot.  In a typical, default Apache + Tomcat 
> installation, it would look for numguess.jsp in 
> /some/path/to/tomcat/webapps/examples/jsp.  So, unless you have 
> installed Tomcat in /srv/www/htdocs ($CATALINA_HOME=/srv/www/htdocs), 
> something else isn't right.
>
> The "done without a worker" error is pretty self-explanatory.
>
> I'd suggest that the next step be that you post your mod_jk.conf file 
> and your workers.properties file, and describe CATALINA_HOME.
>
> John
>
> On Sat, 10 May 2003 19:34:22 -0300, Emerson Cargnin 
> <emerson@tre-sc.gov.br> wrote:
>
>> At first thanks for your fast reply : )
>>
>> - about adding AddModule mod_jk.c  (if you're using JK)
>> I thing that adding the line   "LoadModule jk_module 
>> /usr/lib/apache/mod_jk.so" makes unecessary to add the line you told, 
>> and your tutorial doens't say anything about this line, but apache 
>> just give me the following warn telling that it's already loaded :
>>
>> [Wed Aug 15 23:20:05 2001] [warn] module mod_jk.c is already added, 
>> skipping
>>
>> - I'm almost there :). following the steps you tell at the tutorial, 
>> it creates the mod_jk.conf ok, but it looks that mod_jk doesn't find 
>> the webapps, although it's configured allright :
>>
>>
>> Apache log :
>> [Wed Aug 15 23:20:30 2001] [error] [client 10.9.7.58] File does not 
>> exist: /srv/www/htdocs/examples/jsp/num/numguess.jsp
>>
>> mod_jk.log
>>
>> [Wed Aug 15 23:20:05 2001]  [jk_worker.c (111)]: wc_open, done 1
>> [Wed Aug 15 23:20:30 2001]  [jk_uri_worker_map.c (460)]: Into 
>> jk_uri_worker_map_t::map_uri_to_worker
>> [Wed Aug 15 23:20:30 2001]  [jk_uri_worker_map.c (477)]: Attempting 
>> to map URI '/examples/jsp/num/numguess.jsp'
>> [Wed Aug 15 23:20:30 2001]  [jk_uri_worker_map.c (599)]: 
>> jk_uri_worker_map_t::map_uri_to_worker, done without a match
>>
>>
>> It looks everything you said before is allright...
>> any clue?
>>
>> John Turner wrote:
>>
>>>
>>>> From comments I've received, this HOWTO is not confusing.  It uses 
>>>> Apache
>>>
>>>
>>> 2, but the setup is the same for Apache 1.3.  It uses JK.  I've 
>>> never worked with SuSE, but I can't imagine it being much different 
>>> than Red Hat.
>>>
>>> http://www.johnturner.com/howto/rh72-howto.html
>>>
>>> That said, I see some things with your configuration.
>>>
>>> - you need this in httpd.conf:
>>>
>>> AddModule mod_jk.c  (if you're using JK)
>>>
>>> - you need a much simpler workers.properties file...dump ALL of that 
>>> JNI stuff.  Workers.properties shouldn't be more than this:
>>>
>>> # BEGIN workers.properties
>>> worker.list=ajp13
>>> worker.ajp13.port=8009
>>> worker.ajp13.host=localhost (or IP of Tomcat server)
>>> worker.ajp13.type=ajp13
>>> # END workers.properties
>>> - you need an additional Listener element in server.xml for EACH 
>>> Host container...either you are missing it or you didn't post it.  
>>> This is all described in my HOWTO.
>>>
>>> Your auto-generated mod_jk.conf file should look VERY similar to this:
>>> http://www.johnturner.com/howto/mod_jk_conf.html
>>>
>>> If it doesn't, go back and look at your server.xml and make sure 
>>> your ApacheConfig Listeners are correct.
>>>
>>> John
>>>
>>> On Sat, 10 May 2003 11:15:35 -0700, Emerson Cargnin <emerson@tre- 
>>> sc.gov.br> wrote:
>>>
>>>> It has 4 days since i'm trying to get apache 1.3 to talk to tomcat 
>>>> 4.1.24 through jk or jk2.
>>>> At first some questions that i haven't seem in my long search :
>>>>
>>>> - What's is the best and simpler connector? jk, jk2 or mod_webapp ?
>>>> In my case, I have to use apache 1.3.26 (in Suse linux) for 
>>>> compability with other php apps.  I'd like to use the autoconf and 
>>>> remote deploy feature of tomcat 4.1 (that's why i'm upgrading my 
>>>> 3.2.3 production server, which works fine for jk)
>>>> - Does jk works well for my case ? (apache 1.3.26 and tomcat 
>>>> 4.1.24). I read about jk2 is better for apache 2.0, is it true?
>>>> - If does, i think i have made some mistake, because it's not 
>>>> working :)
>>>>
>>>> My conf :
>>>>
>>>> ------------------------------------------------------------------------

>>>>
>>>>
>>>> -- 
>>>>
>>>>
>>>> ------------------------------------
>>>> http.conf  (lines added):
>>>> LoadModule jk_module /usr/lib/apache/mod_jk.so
>>>> Include 
>>>> /opt/local/jakarta-tomcat-4.1.24-LE-jdk14/conf/auto/mod_jk.conf
>>>>
>>>> ------------------------------------------------------------------------

>>>>
>>>>
>>>> -- 
>>>>
>>>>
>>>> ------------------------------------
>>>> server.xml
>>>>
>>>> under "<Server port=..." i put  (it's attached for better 
>>>> undertanding) :
>>>> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>>>> modJk="/usr/lib/apache/mod_jk.so" jkDebug="debug"
>>>> workersConfig="/opt/local/jakarta-tomcat-4.1.24-LE- 
>>>> jdk14/conf/jk/workers.properties"
>>>> jkLog="/opt/local/jakarta-tomcat-4.1.24-LE-jdk14/logs/mod_jk.log"/>
>>>> ------------------------------------------------------------------------

>>>>
>>>>
>>>> -- 
>>>>
>>>>
>>>> ------------------------------------
>>>> worker.properties configuration file  (it's at  /opt/local/jakarta- 
>>>> tomcat-4.1.24-LE-jdk14/conf/jk/workers.properties) :
>>>>
>>>> workers.java_home=/usr/java/j2sdk1.4.1_01
>>>> workers.CATALINA_HOME=/opt/local/jakarta-tomcat-4.1.24-LE-jdk14
>>>> ps=/
>>>>
>>>> worker.list=ajp13
>>>> worker.ajp13.port=8009
>>>> worker.ajp13.host=lagoa.tre-sc.gov.br
>>>> worker.ajp13.type=ajp13
>>>> worker.ajp13.lbfactor=1
>>>>
>>>> worker.loadbalancer.type=lb
>>>> worker.loadbalancer.balanced_workers=ajp13
>>>> worker.inprocess.type=jni
>>>> worker.inprocess.class_path=$(workers.CATALINA_HOME)$(ps)lib$(ps) 
>>>> tomcat.jar
>>>> worker.inprocess.cmd_line=start
>>>> worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps) 
>>>> classic$(ps)libjvm.so
>>>> worker.inprocess.stdout=$(workers.CATALINA_HOME)$(ps)logs$(ps) 
>>>> inprocess.stdout
>>>> worker.inprocess.stderr=$(workers.CATALINA_HOME)$(ps)logs$(ps) 
>>>> inprocess.stderr
>>>>
>>>> ------------------------------------------------------------------------

>>>>
>>>>
>>>> -- 
>>>>
>>>>
>>>> ------------------------------------
>>>>
>>>> here goes what happens :
>>>>
>>>> start tomcat, all ok.
>>>>
>>>> start apache, it says ok but in the log appears :
>>>> [Wed Aug 15 21:26:01 2001] [error] (2)No such file or directory: 
>>>> Error while opening the workers, jk will not work
>>>> [Wed Aug 15 21:26:02 2001] [error] (2)No such file or directory: 
>>>> Error while opening the workers, jk will not work
>>>> [Wed Aug 15 21:26:03 2001] [notice] Apache/1.3.26 (Linux/SuSE) 
>>>> configured -- resuming normal operations
>>>>
>>>> is it necessary to do some other specific configuration?
>>>> I tried jk2 before this, but it didn't work too :(
>>>> I saw a lot of tutorials about jk and jk2, but all of them are 
>>>> either confuse or don't use autoconf
>>>>
>>>> Any clue would help
>>>>
>>>> Thanks in advance
>>>>
>>>
>>>
>>>
>>
>
>
>

-- 
Emerson Cargnin
Analista de Sitemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181



Mime
View raw message