Re: problems with mod_jk2
hi, start the tomcat server and find where mod_jk2.so is creating. copy that path in server.xml ex: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=/etc/httpd/modules/mod_jk2.so / and in httpd.conf u should add this line Include /usr/local/tomcat/conf/auto/mod_jk.conf and start apache after 1 min. bcz tomcat creates mod_jk.so after some time.,better thing is see the time of creation of mod_jk2.so,using ls -l option. . i am giving one url to u. http://johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html i think it's help for u. /usr/local/apache2/modules/jkjni.so /etc/httpd/modules/mod_jk2.so sarojini chowdary [EMAIL PROTECTED] wrote: Please Help... Hi, I have problem with mod_jk2.so I have installed redhat 9 and I used the default version of apache that came with redhat 9 i.e. apache/2.0.40 and I installed and configured tomcat 5.0.25. Till now both work fine when I start them alone. I have installed mod_jk 2 connector latest version i.e. jakarta-tomcat-connectors-jk2-2.0.4-src. I restarted tomcat. And when I look at CATALINA_OUT I see this line. INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so: /usr/local/apache2/modules/jkjni.so: undefined symbol: apr_md5_final When I try to use apu-config to know the list of libraries to attach it says the command is not found. After this point, when I try to restart apache it gives this error. Starting httpd: Syntax error on line 157 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send [FAILED] I was trying to fix it right from past 2 days and I could not do it. Please tel me what I should do. Thanks in advance. Sarojini. IndusRAD Inc. Peoria, IL, 61606 USA 309-691-0591 Yahoo! India Careers: Over 50,000 jobs online Go to: http://yahoo.naukri.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers!
RE: problems with mod_jk2
I've clipped the relevant sections of some recent list postings that got me pointed in the correct direction. I've been following along with this guide. http://www.opq.se/sxs/internet_serving/c875.html Another list member responded: Have a read through this, http://jakarta.apache.org/tomcat/connectors-doc/jk2/index.html Which I did and used the following config files: I used the min configuration given in the jk docs of. jk2.properties: # The default port is 8009 but you can use another one # channelSocket.port=8019 workers2.properties: # 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:/examples/*] info=Map the whole webapp And this works, which means my problem, is in trying to create the Unix channel. I don't know why the Unix channel config did not work, heck I don't even know the difference between a Unix channel and socket channel! Jeff_Birt -Original Message- From: sarojini chowdary [mailto:[EMAIL PROTECTED] Sent: Sunday, July 11, 2004 1:39 PM To: [EMAIL PROTECTED] Subject: problems with mod_jk2 Please Help... Hi, I have problem with mod_jk2.so I have installed redhat 9 and I used the default version of apache that came with redhat 9 i.e. apache/2.0.40 and I installed and configured tomcat 5.0.25. Till now both work fine when I start them alone. I have installed mod_jk 2 connector latest version i.e. jakarta-tomcat-connectors-jk2-2.0.4-src. I restarted tomcat. And when I look at CATALINA_OUT I see this line. INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so: /usr/local/apache2/modules/jkjni.so: undefined symbol: apr_md5_final When I try to use apu-config to know the list of libraries to attach it says the command is not found. After this point, when I try to restart apache it gives this error. Starting httpd: Syntax error on line 157 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send [FAILED] I was trying to fix it right from past 2 days and I could not do it. Please tel me what I should do. Thanks in advance. Sarojini. IndusRAD Inc. Peoria, IL, 61606 USA 309-691-0591 Yahoo! India Careers: Over 50,000 jobs online Go to: http://yahoo.naukri.com/ - 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: Problems building mod_jk2 with ant
I've never had any joy compiling jk or jk2 with ant, its more straight forward just to use the native scripts ./configure --with-apxs2=/usr/local/apache2/sbin/apxs make then copy the built module to the correct location. Mark On 12 Jun 2004, at 12:26, Lars Nielsen Lind wrote: I am having some problems building mod_jk2 with ant. I use jakarta-tomcat-connectors-jk2-2.0.4-src. I have modified ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties.sample this way: tomcat5.home=/opt/jakarta-tomcat-5.0.25 and saved it as ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties Now I am running ant this way: [EMAIL PROTECTED] root]# cd.. ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk [EMAIL PROTECTED] root]# ant and the result is: BUILD FAILED file:/root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/jk/build.xml:142: Warning: Could not find file /root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/coyote/build/lib/tomcat-coyote.jar to copy. The coyote library is not there. I have also tried to do it another way: [EMAIL PROTECTED] root]# ./buildconf.sh [EMAIL PROTECTED] root]# ./configure --with-apxs2=/opt/apache-2.0.49/bin/apxs --with-tomcat5=/opt/jakarta-tomcat-5.0.25 --with-java-home=/opt/j2sdk1.4.2_04 --with-jni [EMAIL PROTECTED] root]# make but that won't work too. If I use: [EMAIL PROTECTED] root]# ./configure --help I can see that it is only possible to use --with-tomcat33, 40, 41 My OS is Fedora Core 2. Any one that can help me with this problem? /Lars Nielsen Lind - 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: Problems building mod_jk2 with ant
These instructions for for osx but are relevant to any *nix (at least most), I've done the same on slackware and redhat (albeit different directory structures). also the libtool stuff probably wont be a problem on linux http://homepage.mac.com/melowe/iblog/B141099555/C760077128/E1326304651/ index.html Mark On 12 Jun 2004, at 12:26, Lars Nielsen Lind wrote: I am having some problems building mod_jk2 with ant. I use jakarta-tomcat-connectors-jk2-2.0.4-src. I have modified ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties.sample this way: tomcat5.home=/opt/jakarta-tomcat-5.0.25 and saved it as ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties Now I am running ant this way: [EMAIL PROTECTED] root]# cd.. ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk [EMAIL PROTECTED] root]# ant and the result is: BUILD FAILED file:/root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/jk/build.xml:142: Warning: Could not find file /root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/coyote/build/lib/tomcat-coyote.jar to copy. The coyote library is not there. I have also tried to do it another way: [EMAIL PROTECTED] root]# ./buildconf.sh [EMAIL PROTECTED] root]# ./configure --with-apxs2=/opt/apache-2.0.49/bin/apxs --with-tomcat5=/opt/jakarta-tomcat-5.0.25 --with-java-home=/opt/j2sdk1.4.2_04 --with-jni [EMAIL PROTECTED] root]# make but that won't work too. If I use: [EMAIL PROTECTED] root]# ./configure --help I can see that it is only possible to use --with-tomcat33, 40, 41 My OS is Fedora Core 2. Any one that can help me with this problem? /Lars Nielsen Lind - 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: Problems building mod_jk2 (aclocal)
I just recently successfully built mod_jk2 v2.0.4 under Fedora Core 2 Test 3. I first had to rebuild Apache - I used v2.0.49 - for apxs to work properly when compiling jk2. I then brought down the latest src for jk2 - v2.0.4. Here are the configure scripts I used for httpd and jk2. They are based off the relevant information in the Tomcat wiki links http://www.reliablepenguin.com/clients/misc/tomcat/ and http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html. myconfigure-jk.sh #! /bin/sh ./configure --with-apxs2=/usr/sbin/apxs \ --with-apr-lib=/usr/lib \ --with-tomcat-41=/usr/local/tomcat \ --with-java-home=/usr/local/java/ \ --with-jni myconfigure-httpd.sh file: #! /bin/sh ./configure -C \ --prefix=/etc \ --exec-prefix=/etc \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --mandir=/usr/share/man \ --libdir=/usr/lib \ --sysconfdir=/etc/httpd/conf \ --includedir=/usr/include/httpd \ --libexecdir=/usr/lib/httpd/modules \ --datadir=/usr/www \ --enable-suexec \ --with-suexec \ --with-suexec-caller=apache \ --with-suexec-docroot=/usr/www \ --with-suexec-logfile=/var/log/httpd/suexec.log \ --with-suexec-bin=/usr/sbin/suexec \ --with-suexec-uidmin=500 \ --with-suexec-gidmin=500 \ --with-devrandom \ --enable-cache=shared \ --enable-disk-cache=shared \ --enable-mem-cache=shared \ --enable-ssl=shared \ --with-ssl \ --enable-deflate \ --enable-access=shared \ --enable-auth=shared \ --enable-include=shared \ --enable-deflate=shared \ --enable-log-config=shared \ --enable-env=shared \ --enable-setenvif=shared \ --enable-mime=shared \ --enable-auth-anon=shared \ --enable-status=shared \ --enable-autoindex=shared \ --enable-asis=shared \ --enable-suexec=shared \ --enable-auth-dbm=shared \ --enable-cgi=shared \ --enable-negotiation=shared \ --enable-dir=shared \ --enable-auth-digest=shared \ --enable-imap=shared \ --enable-actions=shared \ --enable-userdir=shared \ --enable-mime-magic=shared \ --enable-alias=shared \ --enable-cern-meta=shared \ --enable-expires=shared \ --enable-headers=shared \ --enable-unique-id=shared \ --enable-usertrack=shared \ --enable-dav=shared \ --enable-info=shared \ --enable-dav-fs=shared \ --enable-vhost-alias=shared \ --enable-speling=shared \ --enable-rewrite=shared \ --enable-proxy=shared \ --enable-proxy-http=shared \ --enable-proxy-ftp=shared \ --enable-proxy-connect=shared At 12:38 AM 5/28/2004, Lars Nielsen Lind wrote: I have problems building mod_jk2 with Fedora Core 2. It seems to a problem with the mod_jk2 aclocal script??? Anyone that has successfully build mod_jk2 with Fedora Core 2? Here are the output: snip.. /Lars Nielsen Lind - 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: Problems with mod_jk2
Jonathan Peterson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I second this motion! Is the best idea to go back to mod_jk as mod_webapp is depreciated? mod_jk appears to work, although documentation is slim. I have not tried mod_jk2 but it's unclear to me what its advantages are... Oddly enough, the docs say that mod_jk was created as a replacement to the over-complex mod_jserv, but I can't say I ever had much difficulty with mod_jserv compared to mod_jk / tomcat, but hey ;-) Actually, the main advantage of mod_jk over mod_jserv is the persistent connection from Apache - Tomcat (well, other than the obvious that the TC 4.x line doesn't support mod_jserv :). The advantages to mod_jk2 over mod_jk are very clear to developers (the code is much much cleaner). If you are only using channelSocket, then most of the improvements don't mean much to end users at the moment (with the possible exception of RI support in mappings). You also can use UnixSockets and (an actually working) JNI channel with mod_jk2 (of course, JNI only really works with Apache-2/IIS/iPlanet, but some of the developers have reportedly tried it with Apache-1.3.x -- giving a weird load-balancing config :). -- Jonathan Peterson Technical Manager, BMJ Knowledge, +44 (0)20 7383 6092 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with mod_jk2
- Original Message - From: Mark Eggers [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 7:58 AM Subject: Re: Problems with mod_jk2 What are the ownership and permissions on the following directory? /usr/opt/Apache-2.0.46W/logs Legba:/usr/users/root# l /usr/opt/Apache-2.0.46W/logs lrwxrwxrwx 1 root system28 Jun 20 13:33 /usr/opt/Apache-2.0.46W/logs - /var/opt/Apache-2.0.46W/logs Legba:/usr/users/root# l /var/opt/Apache-2.0.46W total 24 drwxr-xr-x 2 root system 8192 Jun 24 14:22 logs drwx-- 2 apache http8192 Jun 13 11:31 proxy drwxr-xr-x 2 root system 8192 Jun 24 14:32 run So, it is basically 755 root:system. The jk2.log gets created with perm 600 root:system Nix.
Re: Problems with mod_jk2
NormW [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Good morning again. Tomcat supports having multiple ServiceEngine entries within the Server.xml, and each one would need to be identifiable when a single Apache/jk(2) setup is forwarding requests to the one Tomcat. The [channel.socket:...] identifies where/how to get from mod_jk(2) to the Tomcat machine (ie host/port), but the actual workers need to be able to identify either: - which ServiceEngine entry to aim at on a given machine OR - mod_jk(2) needs to be able to tag which worker processed a request so that the session goes back to the same worker. The 'jvmroute' is an attribute on the Engine, so setting it will always route your requests back to the same Engine in Tomcat. G'day, Ya. You are right. I think tomcatId is just something tomcat uses to internally to keep track of the workers. It could be anything such as tomcatId=worker1:8009 but you really define the host and the port in the [channel...] section as you mention. You could have multiple workers pointed at the same host on the same port. The only way to tell them appart is by the tomcatId. (I think). There is a little bit of difference between the configs if you run tomcat and apache on the same box or if they are two seperate boxes. I think that is the most confusing part/lack of docs. The major difference is that [channel.socket:..] points port= to 'localhost' (ie 'this machine') if Tomcat is on the same machine as mod_jk(2) or to an actual ip or domain name name if Tomcat is running on another machine. Some packet probing might resolve this. For now, Norm -e On Wed, 25 Jun 2003, NormW wrote: Good morning Eric. The setting format for 'config.file' at least confirms what a trowel through the source code turned up. Thanks. The 'TomcatID' parameter is also alternately named 'route' in mod_jk2, and is, I think, used mostly in load-balance situations, where, at the Tomcat end, it is called 'jvmRoute' on the Engine element. The port and address are not 'normally' needed as mod_jk2 will also use the channel.socket name elements [channel.socket:host:port] for these parameters... (which is not entirely kosher in my view). Hence the clearest method would be to include both the port= and host= parameters under the [channel.socket:.] section. I _think_ this helps. Norm - Original Message - From: Eric J. Pinnell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 9:52 AM Subject: Re: Problems with mod_jk2 Here is a simple config to get if off the ground for a TCP connection: After you have loaded mod_jk2.so in the modules directory of apache add: LoadModule jk2_module modules/mod_jk2.so JkSet config.file /path/to/apache/conf/workers2.properties to your httpd.conf file. Then in /path/to/apache/conf/workers2.properties put: [shm] file=${serverRoot}/logs/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:ip.number.goes.here:8009] port=8009 host=ip.number.goes.here # define the worker [ajp13:ip.number.goes.here:8009] channel=channel.socket:ip.number.goes.here:8009 # Uri mapping [uri:*.jsp] worker=ajp13:ip.number.goes.here:8009 You can also use tomcatId instead of calling out the host and the port. Then use the jk2.properties file that comes with tomcat. This is the one that has everything commented out. You don't need it because apache is doing the work. Use the default Connector entry in server.xml for the Coyote/JK2 connector. This creates a simple single worker, non-loadbalanced connection. You can look at the example workers2.properties that comes with the connectors source and get an idea how to do loadbalancing. But basically you create loadbalancing workers and add workers to the load balancer group. The n you map the URI to the loadbalancer group and it uses the workers you defined in that have in that group to connect to Tomcat. At least that's what I have been working with. Seems to work. -e On Tue, 24 Jun 2003, Nikola Milutinovic wrote: Hi all. mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: jk2.properties -- handler.list=request,container,channelSocket channelSocket.port=8009 channelSocket.address=192.168.61.16 -- server.xml -- [SNIP] Service name=Tomcat-Apache-JK2 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className
Re: Problems with mod_jk2
On Tue, 2003-06-24 at 14:38, Nikola Milutinovic wrote: mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: I second this motion! Is the best idea to go back to mod_jk as mod_webapp is depreciated? Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with mod_jk2
Mod_jk is in use by many people in production. You will have more chances of getting help if you use mod_jk. John On 24 Jun 2003 14:41:43 +0200, Tony Grant [EMAIL PROTECTED] wrote: On Tue, 2003-06-24 at 14:38, Nikola Milutinovic wrote: mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: I second this motion! Is the best idea to go back to mod_jk as mod_webapp is depreciated? Cheers Tony Grant -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with mod_jk2
I second this motion! Is the best idea to go back to mod_jk as mod_webapp is depreciated? mod_jk appears to work, although documentation is slim. I have not tried mod_jk2 but it's unclear to me what its advantages are... Oddly enough, the docs say that mod_jk was created as a replacement to the over-complex mod_jserv, but I can't say I ever had much difficulty with mod_jserv compared to mod_jk / tomcat, but hey ;-) -- Jonathan Peterson Technical Manager, BMJ Knowledge, +44 (0)20 7383 6092 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with mod_jk2
Good morning Nikola. What do you have in your http.conf file(s)? I assume Test.ev.co.yu is the machine you are running Tomcat on and is DNS resolvable? Norm Hi all. mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: jk2.properties -- handler.list=request,container,channelSocket channelSocket.port=8009 channelSocket.address=192.168.61.16 -- server.xml -- [SNIP] Service name=Tomcat-Apache-JK2 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=ajp13 debug=0/ Host name=Kerberos-1.ev.co.yu appBase=/usr/users/test/webapp Context docBase=/usr/local/java/jakarta-tomcat-4.1.24/webapps/tomcat-docs path=/tomcat-docs / Context docBase=evracun path=/evracun /Host /Service worker2.properties [logger] level=DEBUG [config:] file=${serverRoot}/conf/add-on/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 logger=logger.file:0 [channel.socket:Test.ev.co.yu:8009] info=Ajp13 forwarding over socket debug=0 host=Test.ev.co.yu port=8009 [ajp13:Test.ev.co.yu:8009] channel=channel.socket:Test.ev.co.yu:8009 [status:status] info=Status worker, displays runtime information [uri:Kerberos-1.ev.co.yu/jkstatus] info=Display status information and checks the config file for changes. group=status:status [uri:Kerberos-1.ev.co.yu/evracun-jk2/*] info=EVracun application on Test.ev.co.yu context=/evracun group=ajp13:Test.ev.co.yu:8009 - apache_error.log -- [Tue Jun 24 14:22:20 2003] [notice] mod_jk.post_config() first invocation [Tue Jun 24 14:22:22 2003] [notice] LDAP: Built with OpenLDAP LDAP SDK [Tue Jun 24 14:22:22 2003] [notice] LDAP: SSL support unavailable [Tue Jun 24 14:22:23 2003] [notice] Digest: generating secret for digest authentication ... [Tue Jun 24 14:22:23 2003] [notice] Digest: done [Tue Jun 24 14:22:24 2003] [notice] mod_jk.post_config() second invocation [Tue Jun 24 14:22:24 2003] [error] jk2_init() Can't find child 26827 in scoreboard [Tue Jun 24 14:22:24 2003] [error] jk2_init() Can't find child 26576 in scoreboard -- jk2.log --- [Tue Jun 24 14:22:19 2003] ( info ) [jk_logger_file.c (184)] Initializing log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:22 2003] ( info ) [jk_logger_file.c (184)] Initializing log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:24 2003] (error ) [jk_logger_file.c (172)] Can't open log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (377)] uriMap.init() Fixing Host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri null context null host * [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri /jkstatus context null host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri /evracun-jk2/* context /evracun host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] ( info ) [jk_uriMap.c (490)] uriMap: creating context Kerberos-1.ev.co.yu/evracun [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri null context null host * [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri / context / host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri / context / host * [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri /evracun context /evracun host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] ( info ) [jk_workerEnv.c (403)] workerEnv.init() ok /usr/opt/Apache-2.0.46W/config/add-on/workers2.prop erties [Tue Jun 24 14:22:24 2003] (error ) [mod_jk2.c (557)] mod_jk child init 1 -2 [Tue Jun 24 14:22:24 2003] (error ) [jk_logger_file.c (172)] Can't open log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (377)] uriMap.init() Fixing Host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri null context null host * [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix
Re: Problems with mod_jk2
Here is a simple config to get if off the ground for a TCP connection: After you have loaded mod_jk2.so in the modules directory of apache add: LoadModule jk2_module modules/mod_jk2.so JkSet config.file /path/to/apache/conf/workers2.properties to your httpd.conf file. Then in /path/to/apache/conf/workers2.properties put: [shm] file=${serverRoot}/logs/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:ip.number.goes.here:8009] port=8009 host=ip.number.goes.here # define the worker [ajp13:ip.number.goes.here:8009] channel=channel.socket:ip.number.goes.here:8009 # Uri mapping [uri:*.jsp] worker=ajp13:ip.number.goes.here:8009 You can also use tomcatId instead of calling out the host and the port. Then use the jk2.properties file that comes with tomcat. This is the one that has everything commented out. You don't need it because apache is doing the work. Use the default Connector entry in server.xml for the Coyote/JK2 connector. This creates a simple single worker, non-loadbalanced connection. You can look at the example workers2.properties that comes with the connectors source and get an idea how to do loadbalancing. But basically you create loadbalancing workers and add workers to the load balancer group. Then you map the URI to the loadbalancer group and it uses the workers you defined in that have in that group to connect to Tomcat. At least that's what I have been working with. Seems to work. -e On Tue, 24 Jun 2003, Nikola Milutinovic wrote: Hi all. mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: jk2.properties -- handler.list=request,container,channelSocket channelSocket.port=8009 channelSocket.address=192.168.61.16 -- server.xml -- [SNIP] Service name=Tomcat-Apache-JK2 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=ajp13 debug=0/ Host name=Kerberos-1.ev.co.yu appBase=/usr/users/test/webapp Context docBase=/usr/local/java/jakarta-tomcat-4.1.24/webapps/tomcat-docs path=/tomcat-docs / Context docBase=evracun path=/evracun /Host /Service worker2.properties [logger] level=DEBUG [config:] file=${serverRoot}/conf/add-on/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 logger=logger.file:0 [channel.socket:Test.ev.co.yu:8009] info=Ajp13 forwarding over socket debug=0 host=Test.ev.co.yu port=8009 [ajp13:Test.ev.co.yu:8009] channel=channel.socket:Test.ev.co.yu:8009 [status:status] info=Status worker, displays runtime information [uri:Kerberos-1.ev.co.yu/jkstatus] info=Display status information and checks the config file for changes. group=status:status [uri:Kerberos-1.ev.co.yu/evracun-jk2/*] info=EVracun application on Test.ev.co.yu context=/evracun group=ajp13:Test.ev.co.yu:8009 - apache_error.log -- [Tue Jun 24 14:22:20 2003] [notice] mod_jk.post_config() first invocation [Tue Jun 24 14:22:22 2003] [notice] LDAP: Built with OpenLDAP LDAP SDK [Tue Jun 24 14:22:22 2003] [notice] LDAP: SSL support unavailable [Tue Jun 24 14:22:23 2003] [notice] Digest: generating secret for digest authentication ... [Tue Jun 24 14:22:23 2003] [notice] Digest: done [Tue Jun 24 14:22:24 2003] [notice] mod_jk.post_config() second invocation [Tue Jun 24 14:22:24 2003] [error] jk2_init() Can't find child 26827 in scoreboard [Tue Jun 24 14:22:24 2003] [error] jk2_init() Can't find child 26576 in scoreboard -- jk2.log --- [Tue Jun 24 14:22:19 2003] ( info ) [jk_logger_file.c (184)] Initializing log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:22 2003] ( info ) [jk_logger_file.c (184)] Initializing log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:24 2003] (error ) [jk_logger_file.c (172)] Can't open log file /usr/opt/Apache-2.0.46W/logs/jk2.log [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (377)] uriMap.init() Fixing Host Kerberos-1.ev.co.yu [Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)] uriMap: fix uri null context null host * [Tue Jun 24
Re: Problems with mod_jk2
Good morning Eric. The setting format for 'config.file' at least confirms what a trowel through the source code turned up. Thanks. The 'TomcatID' parameter is also alternately named 'route' in mod_jk2, and is, I think, used mostly in load-balance situations, where, at the Tomcat end, it is called 'jvmRoute' on the Engine element. The port and address are not 'normally' needed as mod_jk2 will also use the channel.socket name elements [channel.socket:host:port] for these parameters... (which is not entirely kosher in my view). Hence the clearest method would be to include both the port= and host= parameters under the [channel.socket:.] section. I _think_ this helps. Norm - Original Message - From: Eric J. Pinnell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 9:52 AM Subject: Re: Problems with mod_jk2 Here is a simple config to get if off the ground for a TCP connection: After you have loaded mod_jk2.so in the modules directory of apache add: LoadModule jk2_module modules/mod_jk2.so JkSet config.file /path/to/apache/conf/workers2.properties to your httpd.conf file. Then in /path/to/apache/conf/workers2.properties put: [shm] file=${serverRoot}/logs/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:ip.number.goes.here:8009] port=8009 host=ip.number.goes.here # define the worker [ajp13:ip.number.goes.here:8009] channel=channel.socket:ip.number.goes.here:8009 # Uri mapping [uri:*.jsp] worker=ajp13:ip.number.goes.here:8009 You can also use tomcatId instead of calling out the host and the port. Then use the jk2.properties file that comes with tomcat. This is the one that has everything commented out. You don't need it because apache is doing the work. Use the default Connector entry in server.xml for the Coyote/JK2 connector. This creates a simple single worker, non-loadbalanced connection. You can look at the example workers2.properties that comes with the connectors source and get an idea how to do loadbalancing. But basically you create loadbalancing workers and add workers to the load balancer group. Then you map the URI to the loadbalancer group and it uses the workers you defined in that have in that group to connect to Tomcat. At least that's what I have been working with. Seems to work. -e On Tue, 24 Jun 2003, Nikola Milutinovic wrote: Hi all. mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: jk2.properties -- handler.list=request,container,channelSocket channelSocket.port=8009 channelSocket.address=192.168.61.16 -- server.xml -- [SNIP] Service name=Tomcat-Apache-JK2 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=ajp13 debug=0/ Host name=Kerberos-1.ev.co.yu appBase=/usr/users/test/webapp Context docBase=/usr/local/java/jakarta-tomcat-4.1.24/webapps/tomcat-docs path=/tomcat-docs / Context docBase=evracun path=/evracun /Host /Service worker2.properties [logger] level=DEBUG [config:] file=${serverRoot}/conf/add-on/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 logger=logger.file:0 [channel.socket:Test.ev.co.yu:8009] info=Ajp13 forwarding over socket debug=0 host=Test.ev.co.yu port=8009 [ajp13:Test.ev.co.yu:8009] channel=channel.socket:Test.ev.co.yu:8009 [status:status] info=Status worker, displays runtime information [uri:Kerberos-1.ev.co.yu/jkstatus] info=Display status information and checks the config file for changes. group=status:status [uri:Kerberos-1.ev.co.yu/evracun-jk2/*] info=EVracun application on Test.ev.co.yu context=/evracun group=ajp13:Test.ev.co.yu:8009 - apache_error.log -- [Tue Jun 24 14:22:20 2003] [notice] mod_jk.post_config() first invocation [Tue Jun 24 14:22:22 2003] [notice] LDAP: Built with OpenLDAP LDAP SDK [Tue Jun 24 14:22:22 2003] [notice] LDAP: SSL support unavailable [Tue Jun 24 14:22:23 2003
Re: Problems with mod_jk2
G'day, Ya. You are right. I think tomcatId is just something tomcat uses to internally to keep track of the workers. It could be anything such as tomcatId=worker1:8009 but you really define the host and the port in the [channel...] section as you mention. You could have multiple workers pointed at the same host on the same port. The only way to tell them appart is by the tomcatId. (I think). There is a little bit of difference between the configs if you run tomcat and apache on the same box or if they are two seperate boxes. I think that is the most confusing part/lack of docs. -e On Wed, 25 Jun 2003, NormW wrote: Good morning Eric. The setting format for 'config.file' at least confirms what a trowel through the source code turned up. Thanks. The 'TomcatID' parameter is also alternately named 'route' in mod_jk2, and is, I think, used mostly in load-balance situations, where, at the Tomcat end, it is called 'jvmRoute' on the Engine element. The port and address are not 'normally' needed as mod_jk2 will also use the channel.socket name elements [channel.socket:host:port] for these parameters... (which is not entirely kosher in my view). Hence the clearest method would be to include both the port= and host= parameters under the [channel.socket:.] section. I _think_ this helps. Norm - Original Message - From: Eric J. Pinnell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 9:52 AM Subject: Re: Problems with mod_jk2 Here is a simple config to get if off the ground for a TCP connection: After you have loaded mod_jk2.so in the modules directory of apache add: LoadModule jk2_module modules/mod_jk2.so JkSet config.file /path/to/apache/conf/workers2.properties to your httpd.conf file. Then in /path/to/apache/conf/workers2.properties put: [shm] file=${serverRoot}/logs/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:ip.number.goes.here:8009] port=8009 host=ip.number.goes.here # define the worker [ajp13:ip.number.goes.here:8009] channel=channel.socket:ip.number.goes.here:8009 # Uri mapping [uri:*.jsp] worker=ajp13:ip.number.goes.here:8009 You can also use tomcatId instead of calling out the host and the port. Then use the jk2.properties file that comes with tomcat. This is the one that has everything commented out. You don't need it because apache is doing the work. Use the default Connector entry in server.xml for the Coyote/JK2 connector. This creates a simple single worker, non-loadbalanced connection. You can look at the example workers2.properties that comes with the connectors source and get an idea how to do loadbalancing. But basically you create loadbalancing workers and add workers to the load balancer group. Then you map the URI to the loadbalancer group and it uses the workers you defined in that have in that group to connect to Tomcat. At least that's what I have been working with. Seems to work. -e On Tue, 24 Jun 2003, Nikola Milutinovic wrote: Hi all. mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: jk2.properties -- handler.list=request,container,channelSocket channelSocket.port=8009 channelSocket.address=192.168.61.16 -- server.xml -- [SNIP] Service name=Tomcat-Apache-JK2 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=ajp13 debug=0/ Host name=Kerberos-1.ev.co.yu appBase=/usr/users/test/webapp Context docBase=/usr/local/java/jakarta-tomcat-4.1.24/webapps/tomcat-docs path=/tomcat-docs / Context docBase=evracun path=/evracun /Host /Service worker2.properties [logger] level=DEBUG [config:] file=${serverRoot}/conf/add-on/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=${serverRoot}/logs/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=${serverRoot}/logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 logger=logger.file:0 [channel.socket:Test.ev.co.yu:8009] info=Ajp13 forwarding over socket
Re: Problems with mod_jk2
Good morning again. Tomcat supports having multiple ServiceEngine entries within the Server.xml, and each one would need to be identifiable when a single Apache/jk(2) setup is forwarding requests to the one Tomcat. The [channel.socket:...] identifies where/how to get from mod_jk(2) to the Tomcat machine (ie host/port), but the actual workers need to be able to identify either: - which ServiceEngine entry to aim at on a given machine OR - mod_jk(2) needs to be able to tag which worker processed a request so that the session goes back to the same worker. G'day, Ya. You are right. I think tomcatId is just something tomcat uses to internally to keep track of the workers. It could be anything such as tomcatId=worker1:8009 but you really define the host and the port in the [channel...] section as you mention. You could have multiple workers pointed at the same host on the same port. The only way to tell them appart is by the tomcatId. (I think). There is a little bit of difference between the configs if you run tomcat and apache on the same box or if they are two seperate boxes. I think that is the most confusing part/lack of docs. The major difference is that [channel.socket:..] points port= to 'localhost' (ie 'this machine') if Tomcat is on the same machine as mod_jk(2) or to an actual ip or domain name name if Tomcat is running on another machine. Some packet probing might resolve this. For now, Norm -e On Wed, 25 Jun 2003, NormW wrote: Good morning Eric. The setting format for 'config.file' at least confirms what a trowel through the source code turned up. Thanks. The 'TomcatID' parameter is also alternately named 'route' in mod_jk2, and is, I think, used mostly in load-balance situations, where, at the Tomcat end, it is called 'jvmRoute' on the Engine element. The port and address are not 'normally' needed as mod_jk2 will also use the channel.socket name elements [channel.socket:host:port] for these parameters... (which is not entirely kosher in my view). Hence the clearest method would be to include both the port= and host= parameters under the [channel.socket:.] section. I _think_ this helps. Norm - Original Message - From: Eric J. Pinnell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 9:52 AM Subject: Re: Problems with mod_jk2 Here is a simple config to get if off the ground for a TCP connection: After you have loaded mod_jk2.so in the modules directory of apache add: LoadModule jk2_module modules/mod_jk2.so JkSet config.file /path/to/apache/conf/workers2.properties to your httpd.conf file. Then in /path/to/apache/conf/workers2.properties put: [shm] file=${serverRoot}/logs/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:ip.number.goes.here:8009] port=8009 host=ip.number.goes.here # define the worker [ajp13:ip.number.goes.here:8009] channel=channel.socket:ip.number.goes.here:8009 # Uri mapping [uri:*.jsp] worker=ajp13:ip.number.goes.here:8009 You can also use tomcatId instead of calling out the host and the port. Then use the jk2.properties file that comes with tomcat. This is the one that has everything commented out. You don't need it because apache is doing the work. Use the default Connector entry in server.xml for the Coyote/JK2 connector. This creates a simple single worker, non-loadbalanced connection. You can look at the example workers2.properties that comes with the connectors source and get an idea how to do loadbalancing. But basically you create loadbalancing workers and add workers to the load balancer group. The n you map the URI to the loadbalancer group and it uses the workers you defined in that have in that group to connect to Tomcat. At least that's what I have been working with. Seems to work. -e On Tue, 24 Jun 2003, Nikola Milutinovic wrote: Hi all. mod_jk2 is bugging me properly. It is not working right now and it never did. I could have made a number of mistakes, so if someone could point at them, I'd be grateful. This are the relevant files: jk2.properties -- handler.list=request,container,channelSocket channelSocket.port=8009 channelSocket.address=192.168.61.16 -- server.xml -- [SNIP] Service name=Tomcat-Apache-JK2 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=0 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ Engine name=ajp13 debug=0/ Host name=Kerberos
Re: Problems with mod_jk2
Good morning Nikola. What do you have in your http.conf file(s)? I assume Test.ev.co.yu is the machine you are running Tomcat on and is DNS resolvable? Here it is. # # Global JK2 settings IfModule mod_jk2.c JkSet config.file /usr/opt/Apache-2.0.46W/config/add-on/workers2.properties /ifModule VirtualHost 192.168.61.18:80 ServerName Kerberos-1.ev.co.yu:80 DocumentRoot/usr/users/test/public_html ServerAdmin [EMAIL PROTECTED] ErrorLog/usr/users/test/logs/error.log CustomLog /usr/users/test/logs/access.log common /VirtualHost
Re: Problems with mod_jk2
What are the ownership and permissions on the following directory? /usr/opt/Apache-2.0.46W/logs [Tue Jun 24 14:22:24 2003] (error ) [jk_logger_file.c (172)] Can't open log file /usr/opt/Apache-2.0.46W/logs/jk2.log /mde/ __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]