RE: What's the right way to handle a long process without occupying a tomcat processor/thread?
Tim, Do you have a code example of this solution? I would be very interested in setting something like this up. Thanks. Michael -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 10:22 AM To: Tomcat Users List Subject: Re: What's the right way to handle a long process without occupying a tomcat processor/thread? Use a backgorund thread to do the processing. Then spit a page back to the user which uses a meta refresh to check the status of the background thread. Place an animated gif on the meta refresh page and the user will be none the wiser. -Tim Xiao F Chen wrote: Hello all, I have a scenario related to long process in handling a servlet request. I am using tomcat 4.1 with apache 1.3.9. In one of our applications, when a user logs in, we will determine if the account's email address has been verified or not. If not, the application will ask the user submit an email address for verification using JavaMail. The process to verify the address is to send an email message to the email address immediately. Most of times, the process is quick and we can get the real time info about whether or not the user account on the mail server is valid or not. But sometimes when the user's email server is down or slow, the process could take pretty long time to finish. In the later case, Tomcat's max processors could be used up and 'no processor available' error is thrown. I guess I can increase the maxProcessor number in server.xml (currently it is set to 75), but it seems not the ideal way. I am wondering whether or not I can spawn a new thread in the servlet and hand the email verification to the new thread for processing, then the main thread will return and be available for new request to reduce the 'no processor error'? One problem I can see is that even I can do what I stated above, some document suggest that after the main thread returns (for example, exit from the doGet method of a servlet), the HttpServletResponse's outputstream is closed and I can't send response to the user anymore. Is this right? Any suggestions for my situation. Thanks for your help. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please introduce a good Tomcat debug tool
I use eclipse with the 'myeclipse' plug-in. see www.eclipse.org and www.myeclipseide.com -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 12:13 PM To: Tomcat Users List Subject: Please introduce a good Tomcat debug tool I currently run Tomcat 4.1.9 (without apache) to run JSP and ervlet. How to debug JSP and Servelt in TOMCAT? Thanks. - 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]
Tomcat 5 clustering
For the sake of this question, let me assume that I have an application running on one instance of Tomcat that takes 10 seconds to complete a client request. If I cluster 10 machines together does it help with the through-put, i.e. meaning it might take 1 second to complete the request now, or does it just make the session redundant in case of failure. Just wondering about which setup would serve me the best and be the fastest for our clients. Thanks for any input on this.
RE: Warning of session timeout.
Do you know of any Java Applets out there that I could look at for examples? Thanks. Michael -Original Message- From: Altankov Peter [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 6:23 AM To: Tomcat Users List Subject: RE: Warning of session timeout. And ofcourse, if you dont like the simple solutions and/or want to add more complex behaviour, you can always go for a Java Applet that connects to the server -Original Message- From: Michael Cardon [mailto:[EMAIL PROTECTED] Sent: 06 2004 . 20:04 To: Tomcat Users List Subject: Warning of session timeout. Hello, When I'm doing online banking over the internet, I get a popup notice telling me my session is about to expire and asking me if I want to stay logged in or not. How do they do this? I would like to offer the same kind of message on our web site to our users when the session is about to expire. Anyone know how this is done? Thanks. Michael - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Warning of session timeout.
Hello, When I'm doing online banking over the internet, I get a popup notice telling me my session is about to expire and asking me if I want to stay logged in or not. How do they do this? I would like to offer the same kind of message on our web site to our users when the session is about to expire. Anyone know how this is done? Thanks. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mapping different JKMounts to same Tomcat context
You can look at my HOW-TO file at http://www.cardon.biz/docs/tomcat/ and see if this helps you... -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 8:35 AM To: 'Tomcat Users List' Subject: mapping different JKMounts to same Tomcat context Hello all, I am not able to find a solution in the archives to my issue. I would like to mount different requests to the same context in Tomcat e.g: Lets say I have a context called /test in Tomcat (v4.1.27) I would like to map requests starting with www.abc.net/foo to /test www.abc.net/bar to /test Has anyone done this before? Thanks, Vijay - 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: Two Tomcats and One Apache Web Server
You can try my How-To file at http://www.cardon.biz/docs/tomcat/ Michael -Original Message- From: Galbayar [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 3:38 AM To: Tomcat Users List; Walter do Valle Subject: RE: Two Tomcats and One Apache Web Server try google Apache tomcat load balancing -Original Message- From: Walter do Valle [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 8:14 PM To: [EMAIL PROTECTED] Subject: Two Tomcats and One Apache Web Server Hello all Is it possible to install two Tomcats in the same linux server, put some web applications in one tomcat, put some web applications in other tomcat and both tomcats answer to the same Apache Web Server? Anyone has made this? Is there any tips and tricks about this matter? What is the best way to do this (if possible)? Thansks for any help - 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: Apache 2.0.43 + mod_jk2 + Tomcat 4.1.24 on LINUX RH8 : (
I have written a HOWTO for RH Linux 8, Apache2, and tomcat. You can get to it at http://www.cardon.biz/docs/tomcat -Original Message- From: Bentzy Sagiv [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 9:47 AM To: Tomcat Users List Subject: RE: Apache 2.0.43 + mod_jk2 + Tomcat 4.1.24 on LINUX RH8 : ( Nothing helps . The difference is that now I see the [notice] lines from the error_log file at command line. bentzy. -Original Message- From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 5:30 PM To: Tomcat Users List Subject: Re: Apache 2.0.43 + mod_jk2 + Tomcat 4.1.24 on LINUX RH8 : ( Hi, I think we did this last week... with RH8. The solution was to put JkSet config.file /full/system/path/to/workers2.properties in the httpd.conf file. Many times JK2 doesn't see your properties file and takes some wierd kind of self initiated defaults. -e On Thu, 10 Jul 2003, Bentzy Sagiv wrote: My goal is to setup Apache 2.0.43 + mod_jk2 + Tomcat 4.1.24 on LINUX RH8 I'm following the HOWTO at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html I download mod jk_2 from http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0. 1/bin/linux/i386/mod_jk2-2.0.43.so I add to the original httpd.conf file: ServerName 127.0.0.1:80 and LoadModule jk2_module modules/mod_jk2.so I copy the workers2.properties from the HOWTO as is(just changed ../apache/.. to ../apache2/.. ) I start Tomcat,it works and catalina.out looks OK. I start Apache,it works and error_log looks BAD: caught SIGTERM, shutting down :( [Thu Jul 10 16:41:02 2003] [notice] caught SIGTERM, shutting down [Thu Jul 10 16:41:08 2003] [notice] uriEnv.setAttribute() the worker directive is depriciated [Thu Jul 10 16:41:08 2003] [notice] uriEnv.setAttribute() the worker directive is depriciated [Thu Jul 10 16:41:08 2003] [notice] uriEnv.setAttribute() the worker directive is depriciated [Thu Jul 10 16:41:08 2003] [notice] uriEnv.setAttribute() the worker directive is depriciated [Thu Jul 10 16:41:08 2003] [notice] Apache/2.0.43 (Unix) mod_jk2/2.0.0 configured -- resuming normal operations [Thu Jul 10 16:41:08 2003] [notice] workerEnv.init() ok /usr/local/apache2/conf/workers2.properties [Thu Jul 10 16:41:08 2003] [notice] mod_jk child init 1 -1 [Thu Jul 10 16:41:08 2003] [notice] workerEnv.init() ok /usr/local/apache2/conf/workers2.properties [Thu Jul 10 16:41:08 2003] [notice] mod_jk child init 1 -1 [Thu Jul 10 16:41:08 2003] [notice] workerEnv.init() ok /usr/local/apache2/conf/workers2.properties [Thu Jul 10 16:41:08 2003] [notice] mod_jk child init 1 -1 [Thu Jul 10 16:41:08 2003] [notice] workerEnv.init() ok /usr/local/apache2/conf/workers2.properties [Thu Jul 10 16:41:08 2003] [notice] mod_jk child init 1 -1 [Thu Jul 10 16:41:08 2003] [notice] workerEnv.init() ok /usr/local/apache2/conf/workers2.properties [Thu Jul 10 16:41:08 2003] [notice] mod_jk child init 1 -1 [Thu Jul 10 16:41:26 2003] [notice] workerEnv.init() ok /usr/local/apache2/conf/workers2.properties [Thu Jul 10 16:41:26 2003] [notice] mod_jk child init 1 -1 What the hell is the problem? Please your help!! bentzy - 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] - 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]
Tomcat on Linux HOWTO
Hope this helps someone out there. I sure appreciated all the help I received from people when I was going through this and trying to get things setup right and working. I have written a student assessment program using the Struts framework. This program will be used by over 70 school districts in the State of Oregon. I have a database backend and want to run several instances of Tomcat using Apache2 as a load balancer between them. I didn't need apache to server any pages, I just wanted it to do load balancing between my tomcat servers. I have 2 machines, M1 and M2. On M1 I run apache and 2 instances of the tomcat server. On M2 I run my 3rd instance of tomcat. I am running Linux 8.0, Apache2, Tomcat 1.24, j2sdk1.4.1_03, and mod_jk2 using channelSockets. I could never get jni or channelUnix to work on Linux. HOWTO: http://www.cardon.biz/docs/tomcat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and Linux
Are you sure rc5.d is your startup level? Mine starts in rc3.d, but I am running RH Linux 8.0. Just a thought. -Original Message- From: thors_hammer123 [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 12:50 PM To: [EMAIL PROTECTED] Subject: Tomcat and Linux I have installed Tomcat 5.0 (as part of the Java Web Services Pack) on a Redhat 7.1 system kernel 2.4.20. I am trying to get Tomcat to boot up at startup, and been failing. Following some instructions, I wrote the following script: --- #!/bin/bash # # apache # # chkconfig: # description: Start up the Tomcat servlet engine. # Source function library. . /etc/init.d/functions RETVAL=$? TOMCATHOME=/usr1/jwsdp-1.2 case $1 in 'start') if [ -f $TOMCATHOME/bin/startup.sh ]; then echo $Starting Tomcat $TOMCATHOME/bin/startup.sh fi ;; 'stop') if [ -f $TOMCATHOME/bin/shutdown.sh ]; then echo $Stopping Tomcat $TOMCATHOME/bin/shutdown.sh fi ;; *) echo $Usage: $0 {start|stop} exit 1 ;; esac exit $RETVAL --- and placed it in the rc5.d directory under the name S71tomcat, and made a link in the init.d directory to this file under the name tomcat. This does not work and I don't understand why not. If I type at a terminal tomcat start, Tomcat starts with no problems. What could be going on? TIA __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Linux HOWTO
Our network went down Friday night... Hopefully it will be back up Monday morning. I would appreciate any feed back and suggestion you might have. I liked the way you did your HOWTO and patterned mine after yours. Thanks. -Original Message- From: Chong Yu Meng [mailto:[EMAIL PROTECTED] Sent: Saturday, June 28, 2003 9:23 AM To: Tomcat Users List Subject: Re: Tomcat on Linux HOWTO Michael Cardon wrote: I have compiled a HOWTO using Linux 8.0, Tomcat 4.1.24, and mod_jk2. I hope this will help some people. I would also like to hear from anyone with any suggestion on how I could improve the setup I've done. I'm always learning Thanks. http://www.cardon.biz/docs/tomcat/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Michael ! I can't seem to get to your site. I'm always getting a time-out. Regards, pascal chong - 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]
Tomcat on Linux HOWTO
I have compiled a HOWTO using Linux 8.0, Tomcat 4.1.24, and mod_jk2. I hope this will help some people. I would also like to hear from anyone with any suggestion on how I could improve the setup I've done. I'm always learning Thanks. http://www.cardon.biz/docs/tomcat/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk only loadbalancing to one machine
I had the same problem with load balancing using mod_jk2. I found that changing the lb_factor made a difference. If I set the lb_factor in each of my connector descriptors, all requests went to the last linux box that was defined. I have 3 instances to load balance, this is what I did for now: Connector port -- 8009 on machine1 -- lb_factor=2 Connector port -- 8019 on machine1 -- lb_factor=2 Connector port -- 8009 on machine2 -- lb_factor=1 It doesn't give me the straight 'round robin', but it does mix it up at least. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rick Carter Sent: Friday, June 20, 2003 11:09 AM To: [EMAIL PROTECTED] Cc: Jeff Cousineau Subject: mod_jk only loadbalancing to one machine Hi, My problem in brief: one RedHat Linux box running apache with mod_jk trying to do load balancing to four boxes behind it. All requests only get sent to one of the boxes. The logs look good; if I remove that box from the config., it will pick one of the other three and send all requests there. It sticks with whatever box it picks even after a service stop and start. I've looked all over the web and my load balancing configuration looks just like everyone else's from all I can see. Boxes are all running RedHat Linux Enterprise ES 2.1. The four background boxes are running tomcat4-4.1.24-full.2jpp . Load-balancing box is running apache 1.3.27 (built with OpenSSL 0.9.7b and CFLAGS=-DHARD_SERVER_LIMIT=1024), and mod_jk 4.1.24. I have watched /usr/local/www/mod_jl.log, and all looks normal. I have it running debug so it gets very long very rapidly. I'll include it right after startup at the bottom though. At the moment, everything is going to server-c (worker3). That has persisted across several service stop and service start's, and a reboot. OBTW, after poking around websites and list archives, I've tried the worker.list being just loadbalancer and also having loadbalancer,worker1,worker2,worker3,worker4 -- either way, same result (although the first way produces a shorter mod_jk.log by far). CONFIGURATION FILES: --- /usr/local/www/conf/workers.properties: # In Unix, we use forward slashes: ps=/ worker.list=loadbalancer # worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=worker1,worker2,worker3,worker4 worker.loadbalancer.sticky_session=1 worker.loadbalancer.local_worker_only=0 # worker.worker1.type=ajp13 worker.worker1.host=server-a.our.domain worker.worker1.port=8009 worker.worker1.lbfactor=5 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 worker.worker1.local_worker=0 # worker.worker2.type=ajp13 worker.worker2.host=server-b.our.domain worker.worker2.port=8009 worker.worker2.lbfactor=5 worker.worker2.cachesize=10 worker.worker2.cache_timeout=600 worker.worker2.socket_keepalive=1 worker.worker2.socket_timeout=300 worker.worker2.local_worker=0 # worker.worker3.type=ajp13 worker.worker3.host=server-c.our.domain worker.worker3.port=8009 worker.worker3.lbfactor=5 worker.worker3.cachesize=10 worker.worker3.cache_timeout=600 worker.worker3.socket_keepalive=1 worker.worker3.socket_timeout=300 worker.worker3.local_worker=0 # worker.worker4.type=ajp13 worker.worker4.host=server-d.our.domain worker.worker4.port=8009 worker.worker4.lbfactor=5 worker.worker4.cachesize=10 worker.worker4.cache_timeout=600 worker.worker4.socket_keepalive=1 worker.worker4.socket_timeout=300 worker.worker4.local_worker=0 --- And the decommented version of /usr/local/www/conf/httpd.conf: ServerType standalone ServerRoot /usr/local/www PidFile /usr/local/www/logs/httpd.pid ScoreBoardFile /usr/local/www/logs/httpd.scoreboard Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 20 MaxSpareServers 50 StartServers 20 MaxClients 1024 MaxRequestsPerChild 0 LoadModule cosign_module libexec/mod_cosign.so LoadModule jk_module libexec/mod_jk.so Port 80 Listen 80 Listen 443 User nobody Group nobody ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/www/htdocs JkWorkersFile /usr/local/www/conf/workers.properties JkLogFile /usr/local/www/logs/mod_jk.log JkLogLeveldebug Directory / Options FollowSymLinks AllowOverride None /Directory Directory /usr/local/www/htdocs Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all /Directory IfModule mod_userdir.c UserDir public_html /IfModule IfModule mod_dir.c DirectoryIndex index.html /IfModule AccessFileName .htaccess Files ~ ^\.ht Order allow,deny Deny from all Satisfy All /Files UseCanonicalName On IfModule mod_mime.c TypesConfig /usr/local/www/conf/mime.types /IfModule DefaultType text/plain IfModule mod_mime_magic.c MIMEMagicFile /usr/local/www/conf/magic /IfModule HostnameLookups Off ErrorLog /usr/local/www/logs/error_log LogLevel
Load Balancing Question?
I would like to setup a 'session' type of load balancing using apache2 and two or three instances of tomcat41. This setup routes each request to a different tomcat instance. In mywebapp, once a person has logged in, I need each additional request in that users session to stay with the same tomcat instance. When another person's request comes in then it would then route to the second instance of tomcat and they would remain with that instance as long as their session is valid. Does this make sense to anyone??? I'm not quit sure if I need to setup, or how to setup, any virtual servers in apache2. Just for a little background, this is what I'm working with: RH Linux 8.0 apache2-2.0.45-1.7.2.i386.rpm apache2-devel-2.0.45-1.7.2.i386.rpm apache2-manual-2.0.45-1.7.2.i386.rpm mod_jk2-ap20-2.0.1-1jpp.i386.rpm j2sdk-1_4_1_03-linux-i586-rpm.bin tomcat-4.1.24-LE-jdk14.tar.gz I have installed two instances of tomcat on the same machine with apache2. The third tomcat instace with be on a different machine. (I'm just dealing with the first two right now) /usr/local/sites/tom1/tomcat -- using CoyoteConnector on port 8009 /usr/local/sites/tom2/tomcat -- using CoyoteConnector on port 8019 In the workers2.properties file I have set the following: [logger] level=DEBUG [config:] file=/etc/httpd2/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=/var/log/httpd2/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=/var/run/jk2.shm size=100 debug=0 disabled=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 [lb:lb] info=Default load balancer. debug=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 lb_factor=1 group=lb disabled=0 [channel.socket:localhost:8019] info=A second tomcat instance. debug=0 tomcatId=localhost:8019 lb_factor=1 group=lb disabled=0 [status:] info=Status worker, displays runtime informations [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [uri:/mywebapp] info=Example webapp in the default context. context=/legacy debug=0 [uri:/mywebapp/servlet/*] info=Prefix mapping [uri:/mywebapp/*.jsp] info=Extension mapping [uri:/mywebapp/*] info=Map the whole webapp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load Balancing Question?
Solved: I added the following to each of my tomcat server.xml files in the Engine tag: Engine jvmRoute=localhost:8009 . to tomcat1 Engine jvmRoute=localhost:8019 . to tomcat 2 -Original Message- From: Michael Cardon [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 11:41 AM To: [EMAIL PROTECTED] Subject: Load Balancing Question? I would like to setup a 'session' type of load balancing using apache2 and two or three instances of tomcat41. This setup routes each request to a different tomcat instance. In mywebapp, once a person has logged in, I need each additional request in that users session to stay with the same tomcat instance. When another person's request comes in then it would then route to the second instance of tomcat and they would remain with that instance as long as their session is valid. Does this make sense to anyone??? I'm not quit sure if I need to setup, or how to setup, any virtual servers in apache2. Just for a little background, this is what I'm working with: RH Linux 8.0 apache2-2.0.45-1.7.2.i386.rpm apache2-devel-2.0.45-1.7.2.i386.rpm apache2-manual-2.0.45-1.7.2.i386.rpm mod_jk2-ap20-2.0.1-1jpp.i386.rpm j2sdk-1_4_1_03-linux-i586-rpm.bin tomcat-4.1.24-LE-jdk14.tar.gz I have installed two instances of tomcat on the same machine with apache2. The third tomcat instace with be on a different machine. (I'm just dealing with the first two right now) /usr/local/sites/tom1/tomcat -- using CoyoteConnector on port 8009 /usr/local/sites/tom2/tomcat -- using CoyoteConnector on port 8019 In the workers2.properties file I have set the following: [logger] level=DEBUG [config:] file=/etc/httpd2/conf/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=0 # Alternate file logger [logger.file:0] level=DEBUG file=/var/log/httpd2/jk2.log [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=/var/run/jk2.shm size=100 debug=0 disabled=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 [lb:lb] info=Default load balancer. debug=0 [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 lb_factor=1 group=lb disabled=0 [channel.socket:localhost:8019] info=A second tomcat instance. debug=0 tomcatId=localhost:8019 lb_factor=1 group=lb disabled=0 [status:] info=Status worker, displays runtime informations [uri:/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [uri:/mywebapp] info=Example webapp in the default context. context=/legacy debug=0 [uri:/mywebapp/servlet/*] info=Prefix mapping [uri:/mywebapp/*.jsp] info=Extension mapping [uri:/mywebapp/*] info=Map the whole webapp - 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: Help Please: Starting Tomcat using channelUnix with mod_jk2
Thanks Chong, Yes, I did make the symbolic link as you mentioned. Now I have a question for you. In your server.xml file, in the connector definition, you are still using port 8009. When using channelUnix shouldn't the port be set to 0 (zero)? Michael -Original Message- From: Chong Yu Meng [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 10:22 PM To: Tomcat Users List Subject: Re: Help Please: Starting Tomcat using channelUnix with mod_jk2 Michael Cardon wrote: Thanks Chong, I did have the apache2-devel package installed, but I started a fresh install of Linux 8.0 and all the rpm's following your instructions again anyway. I'm ready to pull my hair out I get the same error about the undefined symbol: apr_md5_final Something occurred to me last night -- I forgot to remind you about a certain symbolic link you need to make. You see, RH8 names the APR file differently. Not sure if you did this : *# ln -s /usr/lib/libapr-0.so.0.9.3 /usr/lib/libapr.so.0 *Regards, pascal chong - 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: Help Please: Starting Tomcat using channelUnix with mod_jk2
Thanks Mark, I tried it on RH Linux 9.0 with the same result myself. I bet your thought on the recent change on the apr_md5_final is probably correct... no what can we do about it??? Michael -Original Message- From: Mark Eggers [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 10:56 PM To: Tomcat Users List Subject: Re: Help Please: Starting Tomcat using channelUnix with mod_jk2 Pascal, I've been trying the same thing with Redhat 9, and getting a similar problem. I even put /home/apache/lib in /etc/ld.so.conf and ran /sbin/ldconfig -v. I verified that that shared libraries are indeed loaded. I also tried modifying /home/tomcat/bin/catalina.sh to include a -Djava.library.path=[various things], but that failed to work as well. I'll think about it some more tomorrow. One thing to note: In the source code, there has been a recent change from apr_MD5FINAL to apr_md5_final. I'm wondering if the propagation has made it all the way through. /mde/ just my two cents . . . . __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.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: Help Please: Starting Tomcat using channelUnix with mod_jk2
Thank you Bill, I'll give that a try -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker Sent: Friday, June 06, 2003 9:04 PM To: [EMAIL PROTECTED] Subject: Re: Help Please: Starting Tomcat using channelUnix with mod_jk2 You need to have libapr on your LD_LIBRARY_PATH when you start Tomcat. Michael Cardon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Where I am missing this?: undefined symbol: apr_md5_final When I start my instance of tomcat it writes the following to catalina.out: Jun 6, 2003 9:49:55 AM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Jun 6, 2003 9:49:55 AM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Jun 6, 2003 9:49:56 AM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Starting service Tomcat-Standalone Apache Tomcat/4.1.24 Jun 6, 2003 9:50:00 AM org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/lib/apache2/jkjni.so: /usr/lib/apache2/jkjni.so: undefined symbol: apr_md5_final Jun 6, 2003 9:50:00 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 disabling channelSocket Jun 6, 2003 9:50:00 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=1/50 config=/home/jakarta1/tomcat/conf/jk2.properties My jk2.properties file looks like this: handler.list=apr,channelUnix,request channelUnix.file=${tomcatHome}/work/jk2.socket apr.NativeSo=/usr/lib/apache2/jkjni.so My platform: RH Linux 8.0 j2sdk-1_4_2-beta-linux-i586.rpm apache2-2.0.45-1.7.2.i386.rpm tomcat-4.1.24.tar.gz tomcat-connectors-4.1.24-src.tar.gz or mod_jk2-ap20-2.0.1-1jpp.i386.rpm, I got the same results both ways. Any help or ideas would be greatly appreciated. Thanks - 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: Help Please: Starting Tomcat using channelUnix with mod_jk2
Thanks Chong, I did have the apache2-devel package installed, but I started a fresh install of Linux 8.0 and all the rpm's following your instructions again anyway. I'm ready to pull my hair out I get the same error about the undefined symbol: apr_md5_final I am using sun's j2sdk instead of IBM's, other than that, I think everything is the same setup as your system. I've done symbolic links, set environment variables, and everything else I can think of, but I get the same error. This seems so simple, I can't believe it's causing me this much grief hehehe Anyway, I'm looking for some more guidance if you can Thanks. -Original Message- From: Chong Yu Meng [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 7:19 AM To: Tomcat Users List Subject: Re: Help Please: Starting Tomcat using channelUnix with mod_jk2 Michael Cardon wrote: Where I am missing this?: undefined symbol: apr_md5_final My platform: RH Linux 8.0 You're missing the Apache Portable Runtime (APR). This is found in the apache2-devel rpm package, which I see you do not seem to have. Download it from Falsehope as well. j2sdk-1_4_2-beta-linux-i586.rpm apache2-2.0.45-1.7.2.i386.rpm tomcat-4.1.24.tar.gz tomcat-connectors-4.1.24-src.tar.gz or mod_jk2-ap20-2.0.1-1jpp.i386.rpm, I got the same results both ways. Any help or ideas would be greatly appreciated. Thanks Regards, pascal chong - 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]
Help Please: Starting Tomcat using channelUnix with mod_jk2
Where I am missing this?: undefined symbol: apr_md5_final When I start my instance of tomcat it writes the following to catalina.out: Jun 6, 2003 9:49:55 AM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Jun 6, 2003 9:49:55 AM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Jun 6, 2003 9:49:56 AM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Starting service Tomcat-Standalone Apache Tomcat/4.1.24 Jun 6, 2003 9:50:00 AM org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/lib/apache2/jkjni.so: /usr/lib/apache2/jkjni.so: undefined symbol: apr_md5_final Jun 6, 2003 9:50:00 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 disabling channelSocket Jun 6, 2003 9:50:00 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=1/50 config=/home/jakarta1/tomcat/conf/jk2.properties My jk2.properties file looks like this: handler.list=apr,channelUnix,request channelUnix.file=${tomcatHome}/work/jk2.socket apr.NativeSo=/usr/lib/apache2/jkjni.so My platform: RH Linux 8.0 j2sdk-1_4_2-beta-linux-i586.rpm apache2-2.0.45-1.7.2.i386.rpm tomcat-4.1.24.tar.gz tomcat-connectors-4.1.24-src.tar.gz or mod_jk2-ap20-2.0.1-1jpp.i386.rpm, I got the same results both ways. Any help or ideas would be greatly appreciated. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat on different server?
Here's a question: Using mod_jk2 with channel communication between apache2 and tomcat, can I map the [uri:] in workers2.properties to an instance of tomcat on a completly different server box??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 - missing library
I'm trying to make the mod_jk2 connector under the following environment: RH Linux 9 Apache= httpd-2.0.46 Java= j2sdk1.4.2 Tomcat= jakarta-tomcat-4.1.24 Connector= jakarta-tomcat-connectors-4.1.24-src I run sh ./buildconf.sh ... OK I run ./configure \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-tomcat41=/usr/local/tomcat \ --with-java-home=${JAVA_HOME} \ --with-java-platform=2 \ --with-jni \ --with-pcre ... OK I then run make and get one error: cannot find -lpcre Do I need to modify the Makefile somehow to get this to run? Any help is very much appreciated. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2 connector
Has anyone gotten the mod_jk2 connector to work on a Linux machine using the jni channel to communicate between apache2 and tomcat41? If so, I would sure like to know how you did it Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JK2 apache2 log errors
Thanks for the info on the scoreboard Allen. Do you know if there is anyway to clear the scoreboard? -Original Message- From: Allen Williams [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 8:01 AM To: Tomcat Users List Subject: RE: JK2 apache2 log errors In the process of digging through the mod_jk2 source code to solve my own problem (which still hasn't happened), I came across extensive references to the scoreboard. It is a place in a workerEnv data structure that holds the process ID of a child process. I'm not sure about who spawns what where, but at least it appears Apache spawns off the jk2 stuff, which then goes off and spawns worker threads. It appears the scoreboard is a place in the worker environment to keep track of some of the housekeeping that goes on with these threads. I've only looked at it for about an hour, so this could be all wrong, but that's what it looks like. TIA, -- Allen -Original Message- From: Chong Yu Meng [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 1:09 AM To: Tomcat Users List Subject: Re: JK2 apache2 log errors Geralyn M Hollerman wrote: Michael Cardon wrote: What does it mean when it says, Can't find child 2954 in scoreboard? Is the 'scoreboard' have something to do with the shm.file? As far as I know, no, the two aren't related. My sysadmin had commented the stuff about a Scoreboard directive in httpd.conf out, and I'm not sure if I understand what it's intended to be used for. Perhaps there is someone out there more familiar with it? Sorry! Scoreboard refers to the jkstatus context which, if you are using the default worker2.properties that came with the rpm package for mod_jk2, you will see a section on. If you have jkstatus enabled, you will be able to see the status of your mod_jk2 connector by going to the URL : http://domain.com/jkstatus Regards, pascal chong - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JK2 apache2 log errors
Thanks for your reply. What does it mean when it says, Can't find child 2954 in scoreboard? Is the 'scoreboard' have something to do with the shm.file? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 12:49 PM To: Tomcat Users List Subject: Re: JK2 apache2 log errors Michael Cardon wrote: Can anyone explain the following errors to me? This is from the error_log file of the httpd (apache2) server. ... [Fri May 30 12:24:12 2003] [error] jk2_init() Can't find child 2954 in scoreboard [Fri May 30 12:24:12 2003] [notice] workerEnv.init() ok /etc/httpd/conf/workers2.properties [Fri May 30 12:24:12 2003] [error] mod_jk child init 1 -2 [Fri May 30 12:24:12 2003] [error] jk2_init() Can't find child 2956 in scoreboard I'm not 100% sure about this, but I saw the same thing on my Solaris box using jk2; I *think* you can safely disregard that mod_jk child init 1 -2. As far as that jk2_init goes, I would get that if I started up Apache before Tomcat had completed starting - I just got used to doing something else in between the start of one and the start of the other to avoid that error... -- Lynn Hollerman. - 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: Can't find TomcatStarter
Jason, I would love to see your workers2.properties file and your jk2.properties file. I was never able to get the jni working and that was my first choice. Thanks. My environment is: Red Hat Linux 9 Red Hat httpd (apache2) 2.0.40-21 Sun JDK j2sdk1.4.2 (beta) Tomcat jakarta-tomcat-4.1.24 JK2 Connector made with jakarta-tomcat-connectors-4.1.24-src -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 12:57 PM To: Tomcat Users List Subject: Re: Can't find TomcatStarter Try losing the double quotes around the path names and also use forward slashes instead of backslashes, that is how my working OPT's are set. That isn't your whole workers2.properties is it? Are you setting it up to run in process via JNI (that's the recommended way)? If so you should have a worker.jni:onStartup section along with a worker.jni:onShutdown, if you don't have these let us know and I will post what needs to go there. Regards, -- Jason Bainbridge KDE Web Team - http://kde.org [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: My Apache/Tomcat in process configuration
Thanks Jason, but the links won't open darn -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:32 PM To: Tomcat Users List Subject: Re: My Apache/Tomcat in process configuration Grrr damn attachments, try this instead: http://jblinux.org/tomcat/jk2.properties http://jblinux.org/tomcat/workers2.properties I should write a howto I guess... Maybe over the weekend... On Sat, 31 May 2003 05:26, Jason Bainbridge wrote: Okay properties files attached. Windows 2000 Professional Apache 2.0.44.0 Tomcat 4.1.24 JDK 1.4.0 Running Tomcat as in process through JNI from Apache. -- Jason Bainbridge KDE Web Team - http://kde.org [EMAIL PROTECTED] - 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: My Apache/Tomcat in process configuration
Thanks, that worked... -Original Message- From: Allen Williams [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:54 PM To: Tomcat Users List Subject: RE: My Apache/Tomcat in process configuration Go to the URL, then click on the file name (i. e., navigate to http://jblinux.org/tomcat). From there you should be able to click on the files. Allen -Original Message- From: Michael Cardon [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 5:39 PM To: Tomcat Users List Subject: RE: My Apache/Tomcat in process configuration Thanks Jason, but the links won't open darn -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 2:32 PM To: Tomcat Users List Subject: Re: My Apache/Tomcat in process configuration Grrr damn attachments, try this instead: http://jblinux.org/tomcat/jk2.properties http://jblinux.org/tomcat/workers2.properties I should write a howto I guess... Maybe over the weekend... On Sat, 31 May 2003 05:26, Jason Bainbridge wrote: Okay properties files attached. Windows 2000 Professional Apache 2.0.44.0 Tomcat 4.1.24 JDK 1.4.0 Running Tomcat as in process through JNI from Apache. -- Jason Bainbridge KDE Web Team - http://kde.org [EMAIL PROTECTED] - 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] - 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]