You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by R Blake <bl...@mac.com> on 2003/03/29 08:18:25 UTC
mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT FINDING
workers2.properties in DFAULT location
hi all,
i've gotten mod_jk2/2.0.3-dev, tomcat 4.1.24 LE, and Apache/2.1.0 built and
playing nicely together on MacOSX 10.2.4. html, jsp & servlets all
behaving exactly as they should!
just fyi, my Apache 'server-info" reports:
Apache/2.1.0-dev (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
mod_jk2/2.0.3-dev PHP/4.3.2-RC
now, to my problem .....
everything builds fine, and I've set up my config/properties files
correctly, but on "apachectl start", my /var/log/apache2_error.log is
showing:
[error] config.update(): Can't find config file
/usr/conf/workers2.properties
in order to make this work, I have to "kludge" a bit by:
mkdir /usr/conf
ln -s /etc/apache2/workers2.properties /usr/conf/workers2.properties
where /etc/apache2 is my httpd.conf directory .... and where mod_jk SHOULD
be looking for workers2.properties
now, I know the REASON this is happening ..... mod_jk2's code defines:
#define JK_WORKER_FILE_DEF ("${serverRoot}/conf/workers2.properties") in
several places, and an apxs build of mod_jk2 is grabbing "prefix: /usr" for
the ServerRoot, because I use the Darwin/MacOS (config.layout) template
when building apache2:
# Darwin/Mac OS Layout u
<Layout Darwin?
prefix: /usr
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/libexec+
mandir: ${prefix}/share/man
datadir: /Library/WebServer
sysconfdir: /etc+
installbuilddir: ${prefix}/share/httpd/build
errordir: ${prefix}/share/httpd/error
iconsdir: ${prefix}/share/httpd/icons
htdocsdir: ${datadir}/Documents
manualdir: /Library/WebServer/Documents/docs/apache2
cgidir: ${datadir}/CGI-Executables
includedir: ${prefix}/include+
localstatedir: /var
runtimedir: ${localstatedir}/run
logfiledir: ${localstatedir}/log+
proxycachedir: ${runtimedir}/proxy
</Layout>
its seems to be MISSING/IGNORING the "sysconfdir: /etc+" .....
MY QUESTION IS:
where would I set the config file location default so that mod_jk2
picks-up/finds workers2.properties in "/etc/apache2" rather than defaulting
to /usr/conf"?
thanks,
blakers
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT FINDING
workers2.properties in DFAULT location
Posted by R Blake <bl...@mac.com>.
BINGO!
i suppose that should've been obvious .... but thanks!
blakers
-- On Saturday, March 29, 2003 3:34 PM -0600 Quinton McCombs
<qm...@nequalsone.com> wrote:
> JkSet config.file /etc/apache2/worker2.properties
>
> The above directive can be placed anywhere inside your httpd.conf file.
> It will set the location of your config file for jk2.
>
>> -----Original Message-----
>> From: R Blake [mailto:blakers@mac.com]
>> Sent: Saturday, March 29, 2003 2:07 AM
>> To: Tomcat Users List
>> Cc: Anthony Marlowe
>> Subject: Re: mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT
>> FINDING workers2.properties in DFAULT location
>>
>>
>> hi
>>
>> > I've built 2.0.44 on Mac OS X with mod_jk2 and and running Tomcat
>> > 4.1.8 and 4.1.24. If the apache directory patch is set up correctly
>> > apache should look for it conf directory, based on how you defined
>> > --prefix in configure. It should look something like this:
>> >
>> > "./configure" \
>> > "--prefix= /Library/Apache2" \
>> "--with-apxs=/Library/Apache2/bin/apxs"
>> > \ "--with-java-home=/Library/Java/Home" \
>> > "--with-java-platform=2" \
>> > "--enable-jni" \
>> > "--enable-so" \
>> > "--enable-proxy" \
>> > "--enable-imap" \
>> > "--enable-ssl" \
>> > "--enable-modules=most" \
>> > "--enable-mods-shared=all" \
>> > "--enable-java=/System/Library/Frameworks/JavaVM.framework/Versions/
>> > 1.4.1"
>>
>> agreed .... that's what's got me a bit confused. prefix, and
>> all other
>> template settings are invoked in my configure with
>> "-enable-layout-=Darwin"
>> ...
>>
>> ./configure \
>> --enable-layout=Darwin --with-port=80 --with-mpm=prefork \
>> --enable-mods-shared=all --enable-so \
>> --sysconfdir=/etc/apache2 \ --enable-dav --enable-dav-fs \
>> --enable-ssl --with-ssl \ --enable-suexec
>> --with-suexec-caller=www \ --with-z \ --enable-proxy \
>> --enable-proxy-connect \ --enable-proxy-ftp \
> --enable-proxy-http \ --enable-logio \ --enable-> authn-dbm
> --enable-authz-dbm
>>
>> which, if you look in my original pst, includes:
>>
>> >> prefix: /usr
>> >> exec_prefix: ${prefix}
>> >> bindir: ${exec_prefix}/bin
>> >> sbindir: ${exec_prefix}/sbin
>> >> libdir: ${exec_prefix}/lib
>> >> libexecdir: ${exec_prefix}/libexec+
>> >> mandir: ${prefix}/share/man
>> >> datadir: /Library/WebServer
>> >> sysconfdir: /etc+
>>
>> > Then the workers2.properties file should be found in the
>> > /Library/Apache2/conf directory and apache should find it.
>>
>> So that's my point ..... its grapping the ${serverroot} from apache's
>> prefix=/usr .... but IGNORING where the sysconf files
>> ACTUALLY are ...
>> i.e., in /etc/apache2
>>
>> > does you jk2.properties file look like? See mine below:
>>
>> mine is very simple:
>>
>> handler.list=apr,channelSocket,request
>> shm.file=/usr/local/tomcat/work/jk2.shm
>>
>> your comments have comfirmed i how it is behaving, but,
>> again, it SHOULD
>> find it in /etc/apache2, no?
>>
>> thx,
>>
>> blakers
>>
>> >## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT
>> IS STOPED ##
>> > WHEN YOU EDIT THE FILE.
>> >
>> >## COMMENTS WILL BE _LOST_
>> >
>> >## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
>> >
>> > serverRoot=/Library/Apache2
>> ># Set the desired handler list
>> > handler.list=apr,request,container,channelJni
>> >#
>> ># Override the default port for the socketChannel
>> ># channelSocket.port=8019
>> ># Default:
>> ># channelUnix.file=${jkHome}/work/jk2.socket
>> ># Just to check if the the config is working
>> ># shm.file=${jkHome}/work/jk2.shm
>> >
>> ># In order to enable jni use any channelJni directive
>> > channelJni.disabled = 0 # And one of the following directives:
>> >
>> ># apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
>> >
>> ># If set to inprocess the mod_jk2 will Register natives
>> itself # This
>> > will enable the starting of the Tomcat from mod_jk2
>> > apr.jniModeSo=inprocess
>> >
>> > Regards,
>> >
>> > Tony
>> >
>> >
>> >
>> > On Saturday, Mar 29, 2003, at 08:18 Europe/Berlin, R Blake wrote:
>> >
>> >> hi all,
>> >>
>> >> i've gotten mod_jk2/2.0.3-dev, tomcat 4.1.24 LE, and Apache/2.1.0
>> >> built and playing nicely together on MacOSX 10.2.4. html, jsp &
>> >> servlets all behaving exactly as they should!
>> >>
>> >> just fyi, my Apache 'server-info" reports:
>> >>
>> >> Apache/2.1.0-dev (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
>> >> mod_jk2/2.0.3-dev PHP/4.3.2-RC
>> >>
>> >> now, to my problem .....
>> >>
>> >> everything builds fine, and I've set up my config/properties files
>> >> correctly, but on "apachectl start", my
>> /var/log/apache2_error.log
>> >> is
>> >> showing:
>> >>
>> >> [error] config.update(): Can't find config file
>> >> /usr/conf/workers2.properties
>> >>
>> >>
>> >> in order to make this work, I have to "kludge" a bit by:
>> >>
>> >> mkdir /usr/conf
>> >> ln -s /etc/apache2/workers2.properties
>> >> /usr/conf/workers2.properties
>> >>
>> >> where /etc/apache2 is my httpd.conf directory .... and
>> where mod_jk
>> >> SHOULD be looking for workers2.properties
>> >>
>> >> now, I know the REASON this is happening ..... mod_jk2's code
>> >> defines:
>> >>
>> >> # define JK_WORKER_FILE_DEF
>> >> ("${serverRoot}/conf/workers2.properties")
>> >> in several places, and an apxs build of mod_jk2 is
>> grabbing "prefix:
>> >> /usr" for the ServerRoot, because I use the Darwin/MacOS
>> >> (config.layout) template when building apache2:
>> >>
>> >> # Darwin/Mac OS Layout u
>> >> <Layout Darwin?
>> >> prefix: /usr
>> >> exec_prefix: ${prefix}
>> >> bindir: ${exec_prefix}/bin
>> >> sbindir: ${exec_prefix}/sbin
>> >> libdir: ${exec_prefix}/lib
>> >> libexecdir: ${exec_prefix}/libexec+
>> >> mandir: ${prefix}/share/man
>> >> datadir: /Library/WebServer
>> >> sysconfdir: /etc+
>> >> installbuilddir: ${prefix}/share/httpd/build
>> >> errordir: ${prefix}/share/httpd/error
>> >> iconsdir: ${prefix}/share/httpd/icons
>> >> htdocsdir: ${datadir}/Documents
>> >> manualdir: /Library/WebServer/Documents/docs/apache2
>> >> cgidir: ${datadir}/CGI-Executables
>> >> includedir: ${prefix}/include+
>> >> localstatedir: /var
>> >> runtimedir: ${localstatedir}/run
>> >> logfiledir: ${localstatedir}/log+
>> >> proxycachedir: ${runtimedir}/proxy
>> >> </Layout>
>> >>
>> >> its seems to be MISSING/IGNORING the "sysconfdir:
>> /etc+" .....
>> >>
>> >> MY QUESTION IS:
>> >>
>> >> where would I set the config file location default so that
>> >> mod_jk2 picks-up/finds workers2.properties in
>> "/etc/apache2" rather
>> >> than defaulting to /usr/conf"?
>> >>
>> >> thanks,
>> >>
>> >> blakers
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
--------------------------------------
R Blake
blakers <at> mac <dot> com
--------------------------------------
MacOSX ..... because Windows sux.
--------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT FINDING workers2.properties in DFAULT location
Posted by Quinton McCombs <qm...@nequalsone.com>.
JkSet config.file /etc/apache2/worker2.properties
The above directive can be placed anywhere inside your httpd.conf file.
It will set the location of your config file for jk2.
> -----Original Message-----
> From: R Blake [mailto:blakers@mac.com]
> Sent: Saturday, March 29, 2003 2:07 AM
> To: Tomcat Users List
> Cc: Anthony Marlowe
> Subject: Re: mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT
> FINDING workers2.properties in DFAULT location
>
>
> hi
>
> > I've built 2.0.44 on Mac OS X with mod_jk2 and and running Tomcat
> > 4.1.8 and 4.1.24. If the apache directory patch is set up correctly
> > apache should look for it conf directory, based on how you defined
> > --prefix in configure. It should look something like this:
> >
> > "./configure" \
> > "--prefix= /Library/Apache2" \
> "--with-apxs=/Library/Apache2/bin/apxs"
> > \ "--with-java-home=/Library/Java/Home" \
> > "--with-java-platform=2" \
> > "--enable-jni" \
> > "--enable-so" \
> > "--enable-proxy" \
> > "--enable-imap" \
> > "--enable-ssl" \
> > "--enable-modules=most" \
> > "--enable-mods-shared=all" \
> > "--enable-java=/System/Library/Frameworks/JavaVM.framework/Versions/
> > 1.4.1"
>
> agreed .... that's what's got me a bit confused. prefix, and
> all other
> template settings are invoked in my configure with
> "-enable-layout-=Darwin"
> ...
>
> ./configure \
> --enable-layout=Darwin --with-port=80 --with-mpm=prefork \
> --enable-mods-shared=all --enable-so \
> --sysconfdir=/etc/apache2 \ --enable-dav --enable-dav-fs \
> --enable-ssl --with-ssl \ --enable-suexec
> --with-suexec-caller=www \ --with-z \ --enable-proxy \
> --enable-proxy-connect \ --enable-proxy-ftp \
--enable-proxy-http \ --enable-logio \ --enable-> authn-dbm
--enable-authz-dbm
>
> which, if you look in my original pst, includes:
>
> >> prefix: /usr
> >> exec_prefix: ${prefix}
> >> bindir: ${exec_prefix}/bin
> >> sbindir: ${exec_prefix}/sbin
> >> libdir: ${exec_prefix}/lib
> >> libexecdir: ${exec_prefix}/libexec+
> >> mandir: ${prefix}/share/man
> >> datadir: /Library/WebServer
> >> sysconfdir: /etc+
>
> > Then the workers2.properties file should be found in the
> > /Library/Apache2/conf directory and apache should find it.
>
> So that's my point ..... its grapping the ${serverroot} from apache's
> prefix=/usr .... but IGNORING where the sysconf files
> ACTUALLY are ...
> i.e., in /etc/apache2
>
> > does you jk2.properties file look like? See mine below:
>
> mine is very simple:
>
> handler.list=apr,channelSocket,request
> shm.file=/usr/local/tomcat/work/jk2.shm
>
> your comments have comfirmed i how it is behaving, but,
> again, it SHOULD
> find it in /etc/apache2, no?
>
> thx,
>
> blakers
>
> >## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT
> IS STOPED ##
> >WHEN YOU EDIT THE FILE.
> >
> >## COMMENTS WILL BE _LOST_
> >
> >## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
> >
> > serverRoot=/Library/Apache2
> ># Set the desired handler list
> >handler.list=apr,request,container,channelJni
> >#
> ># Override the default port for the socketChannel
> ># channelSocket.port=8019
> ># Default:
> ># channelUnix.file=${jkHome}/work/jk2.socket
> ># Just to check if the the config is working
> ># shm.file=${jkHome}/work/jk2.shm
> >
> ># In order to enable jni use any channelJni directive
> >channelJni.disabled = 0 # And one of the following directives:
> >
> ># apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
> >
> ># If set to inprocess the mod_jk2 will Register natives
> itself # This
> >will enable the starting of the Tomcat from mod_jk2
> >apr.jniModeSo=inprocess
> >
> > Regards,
> >
> > Tony
> >
> >
> >
> > On Saturday, Mar 29, 2003, at 08:18 Europe/Berlin, R Blake wrote:
> >
> >> hi all,
> >>
> >> i've gotten mod_jk2/2.0.3-dev, tomcat 4.1.24 LE, and Apache/2.1.0
> >> built and playing nicely together on MacOSX 10.2.4. html, jsp &
> >> servlets all behaving exactly as they should!
> >>
> >> just fyi, my Apache 'server-info" reports:
> >>
> >> Apache/2.1.0-dev (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
> >> mod_jk2/2.0.3-dev PHP/4.3.2-RC
> >>
> >> now, to my problem .....
> >>
> >> everything builds fine, and I've set up my config/properties files
> >> correctly, but on "apachectl start", my
> /var/log/apache2_error.log
> >> is
> >> showing:
> >>
> >> [error] config.update(): Can't find config file
> >> /usr/conf/workers2.properties
> >>
> >>
> >> in order to make this work, I have to "kludge" a bit by:
> >>
> >> mkdir /usr/conf
> >> ln -s /etc/apache2/workers2.properties
> >> /usr/conf/workers2.properties
> >>
> >> where /etc/apache2 is my httpd.conf directory .... and
> where mod_jk
> >> SHOULD be looking for workers2.properties
> >>
> >> now, I know the REASON this is happening ..... mod_jk2's code
> >> defines:
> >>
> >> # define JK_WORKER_FILE_DEF
> >> ("${serverRoot}/conf/workers2.properties")
> >> in several places, and an apxs build of mod_jk2 is
> grabbing "prefix:
> >> /usr" for the ServerRoot, because I use the Darwin/MacOS
> >> (config.layout) template when building apache2:
> >>
> >> # Darwin/Mac OS Layout u
> >> <Layout Darwin?
> >> prefix: /usr
> >> exec_prefix: ${prefix}
> >> bindir: ${exec_prefix}/bin
> >> sbindir: ${exec_prefix}/sbin
> >> libdir: ${exec_prefix}/lib
> >> libexecdir: ${exec_prefix}/libexec+
> >> mandir: ${prefix}/share/man
> >> datadir: /Library/WebServer
> >> sysconfdir: /etc+
> >> installbuilddir: ${prefix}/share/httpd/build
> >> errordir: ${prefix}/share/httpd/error
> >> iconsdir: ${prefix}/share/httpd/icons
> >> htdocsdir: ${datadir}/Documents
> >> manualdir: /Library/WebServer/Documents/docs/apache2
> >> cgidir: ${datadir}/CGI-Executables
> >> includedir: ${prefix}/include+
> >> localstatedir: /var
> >> runtimedir: ${localstatedir}/run
> >> logfiledir: ${localstatedir}/log+
> >> proxycachedir: ${runtimedir}/proxy
> >> </Layout>
> >>
> >> its seems to be MISSING/IGNORING the "sysconfdir:
> /etc+" .....
> >>
> >> MY QUESTION IS:
> >>
> >> where would I set the config file location default so that
> >> mod_jk2 picks-up/finds workers2.properties in
> "/etc/apache2" rather
> >> than defaulting to /usr/conf"?
> >>
> >> thanks,
> >>
> >> blakers
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT FINDING
workers2.properties in DFAULT location
Posted by R Blake <bl...@mac.com>.
hi
> I've built 2.0.44 on Mac OS X with mod_jk2 and and running Tomcat 4.1.8
> and 4.1.24. If the apache directory patch is set up correctly apache
> should look for it conf directory, based on how you defined --prefix in
> configure. It should look something like this:
>
> "./configure" \
> "--prefix= /Library/Apache2" \
> "--with-apxs=/Library/Apache2/bin/apxs" \
> "--with-java-home=/Library/Java/Home" \
> "--with-java-platform=2" \
> "--enable-jni" \
> "--enable-so" \
> "--enable-proxy" \
> "--enable-imap" \
> "--enable-ssl" \
> "--enable-modules=most" \
> "--enable-mods-shared=all" \
> "--enable-java=/System/Library/Frameworks/JavaVM.framework/Versions/
> 1.4.1"
agreed .... that's what's got me a bit confused. prefix, and all other
template settings are invoked in my configure with "-enable-layout-=Darwin"
...
./configure \
--enable-layout=Darwin --with-port=80 --with-mpm=prefork \
--enable-mods-shared=all --enable-so \
--sysconfdir=/etc/apache2 \
--enable-dav --enable-dav-fs \
--enable-ssl --with-ssl \
--enable-suexec --with-suexec-caller=www \
--with-z \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-logio \
--enable-authn-dbm --enable-authz-dbm
which, if you look in my original pst, includes:
>> prefix: /usr
>> exec_prefix: ${prefix}
>> bindir: ${exec_prefix}/bin
>> sbindir: ${exec_prefix}/sbin
>> libdir: ${exec_prefix}/lib
>> libexecdir: ${exec_prefix}/libexec+
>> mandir: ${prefix}/share/man
>> datadir: /Library/WebServer
>> sysconfdir: /etc+
> Then the workers2.properties file should be found in the
> /Library/Apache2/conf directory and apache should find it.
So that's my point ..... its grapping the ${serverroot} from apache's
prefix=/usr .... but IGNORING where the sysconf files ACTUALLY are ...
i.e., in /etc/apache2
> does you jk2.properties file look like? See mine below:
mine is very simple:
handler.list=apr,channelSocket,request
shm.file=/usr/local/tomcat/work/jk2.shm
your comments have comfirmed i how it is behaving, but, again, it SHOULD
find it in /etc/apache2, no?
thx,
blakers
>## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
>## WHEN YOU EDIT THE FILE.
>
>## COMMENTS WILL BE _LOST_
>
>## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
>
> serverRoot=/Library/Apache2
># Set the desired handler list
> handler.list=apr,request,container,channelJni
>#
># Override the default port for the socketChannel
># channelSocket.port=8019
># Default:
># channelUnix.file=${jkHome}/work/jk2.socket
># Just to check if the the config is working
># shm.file=${jkHome}/work/jk2.shm
>
># In order to enable jni use any channelJni directive
> channelJni.disabled = 0
># And one of the following directives:
>
># apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
>
># If set to inprocess the mod_jk2 will Register natives itself
># This will enable the starting of the Tomcat from mod_jk2
> apr.jniModeSo=inprocess
>
> Regards,
>
> Tony
>
>
>
> On Saturday, Mar 29, 2003, at 08:18 Europe/Berlin, R Blake wrote:
>
>> hi all,
>>
>> i've gotten mod_jk2/2.0.3-dev, tomcat 4.1.24 LE, and Apache/2.1.0
>> built and playing nicely together on MacOSX 10.2.4. html, jsp &
>> servlets all behaving exactly as they should!
>>
>> just fyi, my Apache 'server-info" reports:
>>
>> Apache/2.1.0-dev (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
>> mod_jk2/2.0.3-dev PHP/4.3.2-RC
>>
>> now, to my problem .....
>>
>> everything builds fine, and I've set up my config/properties files
>> correctly, but on "apachectl start", my /var/log/apache2_error.log is
>> showing:
>>
>> [error] config.update(): Can't find config file
>> /usr/conf/workers2.properties
>>
>>
>> in order to make this work, I have to "kludge" a bit by:
>>
>> mkdir /usr/conf
>> ln -s /etc/apache2/workers2.properties
>> /usr/conf/workers2.properties
>>
>> where /etc/apache2 is my httpd.conf directory .... and where mod_jk
>> SHOULD be looking for workers2.properties
>>
>> now, I know the REASON this is happening ..... mod_jk2's code defines:
>>
>> # define JK_WORKER_FILE_DEF ("${serverRoot}/conf/workers2.properties")
>> in several places, and an apxs build of mod_jk2 is grabbing "prefix:
>> /usr" for the ServerRoot, because I use the Darwin/MacOS
>> (config.layout) template when building apache2:
>>
>> # Darwin/Mac OS Layout u
>> <Layout Darwin?
>> prefix: /usr
>> exec_prefix: ${prefix}
>> bindir: ${exec_prefix}/bin
>> sbindir: ${exec_prefix}/sbin
>> libdir: ${exec_prefix}/lib
>> libexecdir: ${exec_prefix}/libexec+
>> mandir: ${prefix}/share/man
>> datadir: /Library/WebServer
>> sysconfdir: /etc+
>> installbuilddir: ${prefix}/share/httpd/build
>> errordir: ${prefix}/share/httpd/error
>> iconsdir: ${prefix}/share/httpd/icons
>> htdocsdir: ${datadir}/Documents
>> manualdir: /Library/WebServer/Documents/docs/apache2
>> cgidir: ${datadir}/CGI-Executables
>> includedir: ${prefix}/include+
>> localstatedir: /var
>> runtimedir: ${localstatedir}/run
>> logfiledir: ${localstatedir}/log+
>> proxycachedir: ${runtimedir}/proxy
>> </Layout>
>>
>> its seems to be MISSING/IGNORING the "sysconfdir: /etc+" .....
>>
>> MY QUESTION IS:
>>
>> where would I set the config file location default so that
>> mod_jk2 picks-up/finds workers2.properties in "/etc/apache2" rather
>> than defaulting to /usr/conf"?
>>
>> thanks,
>>
>> blakers
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
help? JNI config FAILS for inprocess Tomcat at vm: initialization
on OSX
Posted by R Blake <bl...@mac.com>.
hi,
i've got tomcat 4.1.24 LE + apache2 2.1.0 cvs + mod_jk2 all behaving nicely
for 'out of process' Tomcat.
however, when I try to launch tomcat 'in process', it fails, and the
catalina.out log shows:
INFO: Starting Coyote HTTP/1.1 on port 8080
[Sat Mar 29 18:07:59 2003] ( info ) [jk_config_file.c (320)] cfg.update()
Updating config /etc/apache2/workers2.properties 0 1048989584
[Sat Mar 29 18:07:59 2003] ( info ) [jk_config_file.c (331)]
config.setConfig(): Reading properties /etc/apache2/workers2.properties 27
[Sat Mar 29 18:07:59 2003] ( info ) [jk_logger_file.c (224)] Level DEBUG 0
[Sat Mar 29 18:07:59 2003] ( info ) [jk_logger_file.c (184)] Initializing
log file stderr
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)]
jni.guessJvmDll() failed /Library/Java/Home/jre/bin/classic/libjvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)]
jni.guessJvmDll() failed /Library/Java/Home/jre/bin/client/jvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)]
jni.guessJvmDll() failed /Library/Java/Home/jre/lib/i386/classic/libjvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)]
jni.guessJvmDll() failed /Library/Java/Home/jre/lib/i386/client/libjvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)]
jni.guessJvmDll() failed /Library/Java/Home/jre/bin/classic/jvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (468)]
jni.guessJvmDll() failed
[Sat Mar 29 18:07:59 2003] (error ) [jk_vm_default.c (496)] vm.init(): no
jvm_dll_path, will use LD_LIBRARY_PATH libjvm.so
[Sat Mar 29 18:07:59 2003] (error ) [jk_vm_default.c (246)] Can't load
native library libjvm.so : cannot create object file image or add lib
[Sat Mar 29 18:07:59 2003] (emerg ) [jk_vm_default.c (507)] jni.loadJvm()
Error - can't load jvm dll
[Sat Mar 29 18:07:59 2003] (error ) [jk_workerEnv.c (229)]
workerEnv.initChannel() init failed for channel.jni:jni
[Sat Mar 29 18:07:59 2003] ( info ) [jk_worker_jni.c (239)]
workerJni.Init() Skipping initialization for the -1 13086
[Sat Mar 29 18:07:59 2003] (error ) [jk_workerEnv.c (193)]
workerEnv.initWorkers() init failed for worker.jni:onStartup
[Sat Mar 29 18:07:59 2003] ( info ) [jk_worker_jni.c (239)]
workerJni.Init() Skipping initialization for the -1 13086
[Sat Mar 29 18:07:59 2003] (error ) [jk_workerEnv.c (193)]
workerEnv.initWorkers() init failed for worker.jni:onShutdown
now, i'm not terribly surprised by this ..... cuz OSX's jvm can be found at:
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Libraries/libjvm
.dylib
i've tried a clean build with LDFLAGS set to:
setenv LDFLAGS "-ldl -F/System/Library/PrivateFrameworks -framework
JavaVM"
but no dice ..... same error
a quick peek in "jk_vm_default.c" shows that the jni.guessJvmDll checks are
only for ".so" libs
noting the "will use LD_LIBRARY_PATH libjvm.so ", and i naivelely added
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Libraries/ to my
LD_LIBRARY_PATH and tried again -- even with a symbolic link from
libjvm.dylib to libjvm.so, its still failing with the same errors.
clearly, i'm missing something .....
any help/ideas?
for reference, here are my jk2.properties & workers2.properties:
=========================================================================
#############################################
# /etc/local/tomcat/conf/jk2.properties
#############################################
#Minimum JNI configuration is the simplest one to make the Tomcat working
#from inside the web server as inprocess. The only comunication channel used
#is JNI. The JK2 will register all the native calls by itself, so there is
#no need to specify the native library on Java side.
#handler.list=apr,channelSocket,channelJni,request
handler.list=apr,request,container,channelJni
shm.file=/usr/local/tomcat/work/jk2.shm
tomcatAuthentication=true
channelSocket.port=8009
# Tomcat: in process; native libs will be reg'd by JK2
# If not then it has to be the absolute path of the jkjni dynamic library.
apr.jniModeSo=inprocess
# jkjni dynamic library: either in java.library.path, or absolute path
apr.NativeSo=/usr/libexec/apache2/jkjni.so
# Tomcat: out of process
# jtc=/usr/local/tomcat-connectors
# apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so
# Or you can use the mod_jk2 directly
# apr.jniModeSo=/usr/libexec/apache2/mod_jk2.so
=========================================================================
=========================================================================
#############################################
## /etc/apache2/workers2.properties -
#############################################
####################
# Global Settings
####################
[logger]
level=DEBUG
[config:]
file=/etc/apache2/conf/workers2.properties
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0
[shm]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=/var/log/shm.file
size=1048576
debug=0
disabled=0
[vm:]
#info=Parameters used to load a JVM in the server process
OPT=-Djava.class.path=/usr/local/tomcat/bin/tomcat-jni.jar;/usr/local/tomca
t/server/lib/catalina.jar
OPT=-Dtomcat.home=/usr/local/tomcat
OPT=-Dcatalina.home=/usr/local/tomcat
OPT=-Xmx128M
####################
# Load Balancing
####################
#[lb:lb]
#info=Default load balancer.
#debug=0
#[lb:lb_1]
#info=A second load balancer.
#debug=0
####################
# Channel Definitions
####################
# JNI channel
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
# TCP socket channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
port=8009
host=127.0.0.1
debug=0
#tomcatId=localhost:8009
#[channel.socket:localhost:8019]
#info=A second tomcat instance.
#debug=0
#tomcatId=localhost:8019
#lb_factor=1
#group=lb
#group=lb_1
#disabled=0
# UNIX socket channel
[channel.un:/usr/local/tomcat/work/jk2.socket]
tomcatId=localhost:8009
debug=0
####################
# Worker Definitions
####################
# define "status" worker
[status:status]
info=Status worker, displays runtime informations
# define "ajp13" worker
[ajp13:localhost:8009]
#channel=channel.un:/usr/local/tomcat/work/jk2.socket
channel=channel.socket:localhost:8009
# JNI worker startup handler
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
stdout=/var/log/apache2/tomcat_jni.log
stderr=/var/log/apache2/tomcat_jni.log
# JNI worker shutdown handler
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
####################
# URI mappings
####################
# status applications
[uri:/status/*]
group=status:status
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:status
# uriEnv.setAttribute() the worker directive is deprecated. Use 'group'
instead.
# /Library/WebServer/webapps
[uri:/*.jsp]
group=ajp13:localhost:8009
#group=ajp13:/usr/local/tomcat/work/jk2.socket
debug=0
[uri:/*/servlets/]
group=ajp13:localhost:8009
debug=0
[uri:/manager/*]
group=ajp13:localhost:8009
debug=0
[uri:/examples/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-blank/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-example/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-template/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-upload/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-validator/*]
group=ajp13:localhost:8009
debug=0
[uri:/tiles-documentation/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-documentation/*]
group=ajp13:localhost:8009
debug=0
[uri:/struts-exercise-taglib/*]
group=ajp13:localhost:8009
debug=0
#[uri:127.0.0.1:8003]
#info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to
test it
#alias=myVirtualHost:8003
#[uri:127.0.0.1:8003/ex]
#info=Example webapp in the virtual host. It'll go to lb_1 ( i.e.
localhost:8019 )
#context=/ex
#group=lb_1
#[uri:/examples]
#info=Example webapp in the default context.
#context=/examples
#debug=0
#[uri:/examples1/*]
#info=A second webapp, this time going to the second tomcat only.
#group=lb_1
#debug=0
# Map the Tomcat examples webapp to the Web server uri space
#[uri:/examples/*]
#info=Map the whole webapp
=========================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk2+tomcat+apache2 on OSX: WORKS! but NOT FINDING workers2.properties in DFAULT location
Posted by Anthony Marlowe <am...@mac.com>.
Hi,
I've built 2.0.44 on Mac OS X with mod_jk2 and and running Tomcat 4.1.8
and 4.1.24. If the apache directory patch is set up correctly apache
should look for it conf directory, based on how you defined --prefix in
configure. It should look something like this:
"./configure" \
"--prefix= /Library/Apache2" \
"--with-apxs=/Library/Apache2/bin/apxs" \
"--with-java-home=/Library/Java/Home" \
"--with-java-platform=2" \
"--enable-jni" \
"--enable-so" \
"--enable-proxy" \
"--enable-imap" \
"--enable-ssl" \
"--enable-modules=most" \
"--enable-mods-shared=all" \
"--enable-java=/System/Library/Frameworks/JavaVM.framework/Versions/
1.4.1"
Then the workers2.properties file should be found in the
/Library/Apache2/conf directory and apache should find it. Also what
does you jk2.properties file look like? See mine below:
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.
## COMMENTS WILL BE _LOST_
## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
serverRoot=/Library/Apache2
# Set the desired handler list
handler.list=apr,request,container,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config is working
# shm.file=${jkHome}/work/jk2.shm
# In order to enable jni use any channelJni directive
channelJni.disabled = 0
# And one of the following directives:
# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
apr.jniModeSo=inprocess
Regards,
Tony
On Saturday, Mar 29, 2003, at 08:18 Europe/Berlin, R Blake wrote:
> hi all,
>
> i've gotten mod_jk2/2.0.3-dev, tomcat 4.1.24 LE, and Apache/2.1.0
> built and playing nicely together on MacOSX 10.2.4. html, jsp &
> servlets all behaving exactly as they should!
>
> just fyi, my Apache 'server-info" reports:
>
> Apache/2.1.0-dev (Unix) mod_perl/1.99_08 Perl/v5.8.0 DAV/2
> mod_jk2/2.0.3-dev PHP/4.3.2-RC
>
> now, to my problem .....
>
> everything builds fine, and I've set up my config/properties files
> correctly, but on "apachectl start", my /var/log/apache2_error.log is
> showing:
>
> [error] config.update(): Can't find config file
> /usr/conf/workers2.properties
>
>
> in order to make this work, I have to "kludge" a bit by:
>
> mkdir /usr/conf
> ln -s /etc/apache2/workers2.properties
> /usr/conf/workers2.properties
>
> where /etc/apache2 is my httpd.conf directory .... and where mod_jk
> SHOULD be looking for workers2.properties
>
> now, I know the REASON this is happening ..... mod_jk2's code defines:
>
> #define JK_WORKER_FILE_DEF ("${serverRoot}/conf/workers2.properties")
> in several places, and an apxs build of mod_jk2 is grabbing "prefix:
> /usr" for the ServerRoot, because I use the Darwin/MacOS
> (config.layout) template when building apache2:
>
> # Darwin/Mac OS Layout u
> <Layout Darwin?
> prefix: /usr
> exec_prefix: ${prefix}
> bindir: ${exec_prefix}/bin
> sbindir: ${exec_prefix}/sbin
> libdir: ${exec_prefix}/lib
> libexecdir: ${exec_prefix}/libexec+
> mandir: ${prefix}/share/man
> datadir: /Library/WebServer
> sysconfdir: /etc+
> installbuilddir: ${prefix}/share/httpd/build
> errordir: ${prefix}/share/httpd/error
> iconsdir: ${prefix}/share/httpd/icons
> htdocsdir: ${datadir}/Documents
> manualdir: /Library/WebServer/Documents/docs/apache2
> cgidir: ${datadir}/CGI-Executables
> includedir: ${prefix}/include+
> localstatedir: /var
> runtimedir: ${localstatedir}/run
> logfiledir: ${localstatedir}/log+
> proxycachedir: ${runtimedir}/proxy
> </Layout>
>
> its seems to be MISSING/IGNORING the "sysconfdir: /etc+" .....
>
> MY QUESTION IS:
>
> where would I set the config file location default so that
> mod_jk2 picks-up/finds workers2.properties in "/etc/apache2" rather
> than defaulting to /usr/conf"?
>
> thanks,
>
> blakers
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org