RE: mod_jk2 JNI question for the brave :)
From: Nikola Milutinovic Sent: 9. sijeanj 2004 7:31 To: Tomcat Users List Subject: Re: mod_jk2 JNI question for the brave :) Mladen Turk wrote: From: Yiannis Mavroukakis Sent: 8. sijeanj 2004 16:34 Would it not be possible to bind JNI under a single worker and then isolate that worker from the rest of the pool (possibly provide the ability for workers to carry some sort of identification bit with regards to who can access them)? That was the thing that I considered, but again if you have multiple workers, what would be the benefit of having that much Tomcat instances running. What is the real benefit of running TC from within Apache via JNI? It should be a faster, cause there is no socket channel involved, and all the communication goes through internall buffers, that share the same process. What would I gain with JNI? MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 JNI question for the brave :)
Mladen Turk wrote: That was the thing that I considered, but again if you have multiple workers, what would be the benefit of having that much Tomcat instances running. What is the real benefit of running TC from within Apache via JNI? It should be a faster, cause there is no socket channel involved, and all the communication goes through internall buffers, that share the same process. Aha. So, what's the story on binding TC to one worker? As you pointed out, Apache has it's own MPM models and very few of them have just one worker. Would it be a good way to go for Apache module TC daemon, like CGI Daemon? To have one dedicated Apache process run Tomcat within it and share access with other workers? Or is it how things are, already? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
From: Nikola Milutinovic Sent: 9. sijeanj 2004 10:18 To: Tomcat Users List Subject: Re: mod_jk2 JNI question for the brave :) What is the real benefit of running TC from within Apache via JNI? It should be a faster, cause there is no socket channel involved, and all the communication goes through internall buffers, that share the same process. Aha. So, what's the story on binding TC to one worker? As you pointed out, Apache has it's own MPM models and very few of them have just one worker. Look at the thread. Unfortunately the JNI isn't of much use on Linux, or to be more specific, on any multi child mpm. If you manage to maintain the single worker process (like winnt-mpm does), then you can use the JNI. The reason for that is quite simple; You cannot have two TC instances running having the same conf. MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
Yep I see what you mean know (fog of stupidity lifts). Ok so to iterate, the problem is that since linux has multiple workers, these workers will want to attach themselves to their own tomcat instance. How about this then..instead of launching several tomcat instances (which you cant), why not create a virtual tomcat construct? This would be a proxy to a single instance of Tomcat so you'd have something like this: worker worker worker | | | | | | virtualTC virtualTC virtualTC \| / \ | / \ | / Single TC instance Feel free to stop me when I start annoying you too much ;) Yiannis. PS. I'll start gathering info for the documentation. -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: 08 January 2004 17:54 To: 'Tomcat Users List' Subject: RE: mod_jk2 JNI question for the brave :) From: Yiannis Mavroukakis I thought I had a rough understanding but it turns out that I dont %-) Do you mean that JNI will work only under one worker containing a single child process? Are you using the Tomcat as in or out of the process? In process tomcat (invoked from webserver) can be used only with the single worker mpm's. If you have multiple worker processes each of them would need to load it's own Tomcat instance, but try to start the two TC instances from startup.sh. The second will die immediately. Think that under linux there is no mpm that will allow you to have a single child process. Even the threaded, launches a few childs and shares the connection threads among them. MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk
Re: mod_jk2 JNI question for the brave :)
Mladen Turk wrote: Look at the thread. Unfortunately the JNI isn't of much use on Linux, or to be more specific, on any multi child mpm. If you manage to maintain the single worker process (like winnt-mpm does), then you can use the JNI. The reason for that is quite simple; You cannot have two TC instances running having the same conf. I understand that. So, how about my second idea - Apache module (mod_jk2) that would turn one worker into TC-dedicated worker, while other workers would be just pure Apache? This would be something like mod_cgid. Such a setup would make JNI more acceptable in UNIX environment. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
-Original Message- From: Yiannis Mavroukakis Yep I see what you mean know (fog of stupidity lifts). Ok so to iterate, the problem is that since linux has multiple workers, these workers will want to attach themselves to their own tomcat instance. How about this then..instead of launching several tomcat instances (which you cant), why not create a virtual tomcat construct? This would be a proxy to a single instance of Tomcat so you'd have something like this: worker worker worker | | | | | | virtualTC virtualTC virtualTC \| / \ | / \ | / Single TC instance That would be a general idea. The single point of problem is this virtualTC, or some other concept, that will allow such a scheme. Eventually it will be implemented, but can't put my money on the exact date :-). MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 JNI question for the brave :)
Yiannis Mavroukakis wrote: Yep I see what you mean know (fog of stupidity lifts). Ok so to iterate, the problem is that since linux has multiple workers, these workers will want to attach themselves to their own tomcat instance. How about this then..instead of launching several tomcat instances (which you cant), why not create a virtual tomcat construct? This would be a proxy to a single instance of Tomcat so you'd have something like this: worker worker worker | | | | | | virtualTC virtualTC virtualTC \| / \ | / \ | / Single TC instance Or better yet: worker worker worker--TC | | | | | | JK2:proxy JK2:proxy JK2:instance \| / \ |/ \ | / Master Apache process Something like a mod_cgid, one Apache worker gets dedicated to serving TC, the others are talking to it via Apache's internal mechanisms. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
From: Yiannis Mavroukakis Subject: mod_jk2 JNI question for the brave :) Hi everyone, Bringing the woes of jk2+JNI again here with the dreaded Can't find child xx in scoreboard, since I haven't found a satisfactory answer by anyone. Using TC5 with Apache 2.0.x under Linux, I can get jk2 to work using sockets. However the fun begins when I try to use JNI. Looking at the source from mod_jk2, I have the following snippet: Since I wrote the code, It would be me to blame :-). The problem with JNI and Linux is that you may have few different mpm's to run. JNI presumes that you have a _single_ worker process with multiple threads. If your mpm behave differently then the JNI isn't the appropriate channel to use. The documentation on jk2 at the mo is a pile of poo (sorry guys). I agree with you. Do you volunteer? MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
Hi Mladen, thank you for the reply that helps me gain some understanding in the issue. Would it not be possible to bind JNI under a single worker and then isolate that worker from the rest of the pool (possibly provide the ability for workers to carry some sort of identification bit with regards to who can access them)? I'll be more than happy to volunteer for the documentation, just point at the right direction :) Thank you, Yiannis -Original Message- From: Mladen Turk [mailto:[EMAIL PROTECTED] Sent: 08 January 2004 14:48 To: 'Tomcat Users List' Subject: RE: mod_jk2 JNI question for the brave :) From: Yiannis Mavroukakis Subject: mod_jk2 JNI question for the brave :) Hi everyone, Bringing the woes of jk2+JNI again here with the dreaded Can't find child xx in scoreboard, since I haven't found a satisfactory answer by anyone. Using TC5 with Apache 2.0.x under Linux, I can get jk2 to work using sockets. However the fun begins when I try to use JNI. Looking at the source from mod_jk2, I have the following snippet: Since I wrote the code, It would be me to blame :-). The problem with JNI and Linux is that you may have few different mpm's to run. JNI presumes that you have a _single_ worker process with multiple threads. If your mpm behave differently then the JNI isn't the appropriate channel to use. The documentation on jk2 at the mo is a pile of poo (sorry guys). I agree with you. Do you volunteer? MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk
RE: mod_jk2 JNI question for the brave :)
From: Yiannis Mavroukakis Sent: 8. sijeanj 2004 16:34 Would it not be possible to bind JNI under a single worker and then isolate that worker from the rest of the pool (possibly provide the ability for workers to carry some sort of identification bit with regards to who can access them)? That was the thing that I considered, but again if you have multiple workers, what would be the benefit of having that much Tomcat instances running. So either you have a single worker with the single TC instance launched or none. Having single worker running TC, keeping the rest 30 without would make the entire thing unusable, cause you cannot bind a client to the specific worker process. Even if you could there is no way that will assure you that the new request will get served by that particular jvm enabled worker. The JK2 code (from CVS) will in that case refuse to load the inprocess jvm, and the code snippet in you exhibit is meant to be used for that. At least the code was designed to do that (on more then one child process, kill the jvm channel). I'll be more than happy to volunteer for the documentation, just point at the right direction :) Have no idea. If I would, I'd probably wrote something already. What do you think is the right place to start? MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
I've tried compiling the jk2 code in jakarta-tomcat-connectors from CVS and get the following error for this file: common/jk_channel_socket.c common/jk_channel_socket.c:74:2: #error jk_channel_socket is deprecated Any thoughts? I've gotten both IP and UNIX sockets to work on Fedora Core 1 using the 2.0.2 source, but I do get the dreaded child not found loop when trying in-process communication. /mde/ --- Mladen Turk [EMAIL PROTECTED] wrote: The JK2 code (from CVS) will in that case refuse to load the inprocess jvm, and the code snippet in you exhibit is meant to be used for that. At least the code was designed to do that (on more then one child process, kill the jvm channel). __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
From: Mark Eggers Sent: 8. sijeanj 2004 18:09 To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: mod_jk2 JNI question for the brave :) I've tried compiling the jk2 code in jakarta-tomcat-connectors from CVS and get the following error for this file: common/jk_channel_socket.c common/jk_channel_socket.c:74:2: #error jk_channel_socket is deprecated Any thoughts? Yes. Few months ago we decided to use the APR as mandatory for JK2. As such the apr_socket is used instead. It's probably the makefile bug. Feel free to submit the patches :-) MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
OK . . . when I take a break from job searching I'll look at that and the missing -laprutil-0 in server/apache2/Makefile It's probably missing in the appropriate mod_jk Makefile as well. /mde/ just my two cents . . . . Yes. Few months ago we decided to use the APR as mandatory for JK2. As such the apr_socket is used instead. It's probably the makefile bug. Feel free to submit the patches :-) MT. __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk2 JNI question for the brave :)
That was the thing that I considered, but again if you have multiple workers, what would be the benefit of having that much Tomcat instances running. So either you have a single worker with the single TC instance launched or none. Having single worker running TC, keeping the rest 30 without would make the entire thing unusable, cause you cannot bind a client to the specific worker process. Even if you could there is no way that will assure you that the new request will get served by that particular jvm enabled worker. I thought I had a rough understanding but it turns out that I dont %-) Do you mean that JNI will work only under one worker containing a single child process? The JK2 code (from CVS) will in that case refuse to load the inprocess jvm, and the code snippet in you exhibit is meant to be used for that. At least the code was designed to do that (on more then one child process, kill the jvm channel). I'll be more than happy to volunteer for the documentation, just point at the right direction :) Have no idea. If I would, I'd probably wrote something already. What do you think is the right place to start? I would start by providing a clear and concise list of all configuration options and their parameters that can be present in workers2.properties and jk2.properties and split them up as Required and Optional. Then give a few working examples of each, probably a little diagram showing the flow between apache,jk2 and tomcat. For a start :) MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk Note:__ This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Jaguar Freight Services and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk
RE: mod_jk2 JNI question for the brave :)
From: Yiannis Mavroukakis I thought I had a rough understanding but it turns out that I dont %-) Do you mean that JNI will work only under one worker containing a single child process? Are you using the Tomcat as in or out of the process? In process tomcat (invoked from webserver) can be used only with the single worker mpm's. If you have multiple worker processes each of them would need to load it's own Tomcat instance, but try to start the two TC instances from startup.sh. The second will die immediately. Think that under linux there is no mpm that will allow you to have a single child process. Even the threaded, launches a few childs and shares the connection threads among them. MT. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk2 JNI question for the brave :)
Mladen Turk wrote: From: Yiannis Mavroukakis Sent: 8. sijeanj 2004 16:34 Would it not be possible to bind JNI under a single worker and then isolate that worker from the rest of the pool (possibly provide the ability for workers to carry some sort of identification bit with regards to who can access them)? That was the thing that I considered, but again if you have multiple workers, what would be the benefit of having that much Tomcat instances running. What is the real benefit of running TC from within Apache via JNI? So far, I've seen settups of TCP+Apache via network socket (good for both one and N host deployment) and via UNIX socket (one UNIX host deployment). At the moment I'm running the later setup on my Linux. What would I gain with JNI? Except automatic startup of TC through Apache. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]