Re: Tomcat 5.5 / Windows / procrun ?

2008-09-21 Thread Johnny Kewl


- Original Message - 
From: André Warnier [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, September 21, 2008 1:41 AM
Subject: Tomcat 5.5 / Windows / procrun ?



Hi.

I have Tomcat 5.5 running on a variety of platforms, among them Windows XP 
(my laptop) and Windows 2003 server.
For the Windows installation, until now I have been using the Windows 
Service Installer from the Tomcat 5.5 download page, and it works fine.


But could someone shed some light on the following puzzle ?

A recent discussion on this list triggered my curiosity, and as a result I 
bumped into several things :


- the installer for Windows installs a version of Tomcat 5.5 devoid of the 
usual startup.sh/bat, catalina.sh/bat etc.. and instead just installs 
a couple of files in Tomcat_home\bin, of which a tomcat5.exe (which seems 
to be the Tomcat executable), and a tomcat5w.exe which is the Windows GUI 
allowing to configure the Tomcat service..


- the ImagePath Registry entry for the Tomcat 5.5 Service shows this :
 C:\Tomcat5.5\bin\tomcat5.exe //RS//Tomcat5

- On the Tomcat 5.5 download page, in addition to the installer, there 
also exists a Tomcat 5.5 zip file. That one seems to contain the full 
complement of usual files of Tomcat, including Tomcat_home\bin, plus the 
tomcat5.exe and tomcat5w.exe which are also in the installer package.
It also contains a file service.bat which is described nowhere, but 
seesm to be related to the procrun item of which question below.


The Tomcat 5.5 and Tomcat 6 on-line documentation, setup page, section for 
Windows, only seem to mention the Installer package.  There is a link on 
both the 5.5 and 6.0 Windows setup sections, pointing to a Windows 
Service HowTo, which leads to a page mentioning procrun 1.0, but in the 
same breath indicating that it is now obsolete.


Digging further, I found a link to the Apache Commons project Daemon, 
which seems to include this procrun for Windows, and also a jsvc for 
Unix.


The page there relative to procrun,
(http://commons.apache.org/daemon/procrun.html)
 apart from being relatively difficult to read, seems interesting and 
seems to match the way my Windows Tomcat 5.5 instances are really 
installed and running.

(See registry line above).
But I found nowhere a link to download this procrun in binary form.
I also did not find any link there pointing to any other version of 
procrun...


On the other side of things, this same Apache Commons Daemon project also 
covers a jsvc, which seems to be a wrapper allowing to run Tomcat as a 
daemon under Unix/Linux.


I believe I have seen mentions of this jsvc in some Tomcat documents (or 
in this forum ?), but at any rate my Tomcat Debian Linux systems seem to 
run Tomcat 5.5 as daemon perfectly fine, without seeming to use this jsvc 
module.

So I wonder what it is used for.


What I kind of piece together of all this is as follows :

- the packagers of Tomcat 5.5 and Tomcat 6 for Windows use this procrun 
program (in whatever version, but probably not 1.0), to take the java JVM 
executable and make it into a Windows service which runs Tomcat.
This Windows Service executable is named tomcat5.exe in the msi 
distribution. (Or else this tomcat5.exe is not really java packaged as a 
service, but just a stub pointing to an installed Java jvm dll).
Anyway the result is packaged, together with the other Tomcat components, 
into a Windows Service Installer package which is the one on the Tomcat 
download page.


- the documentation of this procrun (or whatever is related to it for 
Tomcat), on the Tomcat site, is out-of-date and does not match the version 
of procrun that is being used above.


- the procrun program is a general utility that allows to take any Java 
program (or any program ?) and turn it into a Windows service.  It thus 
seems to be something like the old srvany workhorse, but a bit more 
sophisticated.  But this procrun program does not seem to be available for 
download in binary form.


- and I don't have a clue as to what jsvc may be for.




Thanks
André

---
Thats about right from when I looked at it a while back...

Java can be controlled from C... thats what the libs do... there is a linux 
and windows version...
If you look at the tomcat bootstrap class, you will see it has the 
(interface) methods that Procrun calls into.


So its just a windows service that starts the java engine, and calls into a 
java class to get it running...


If you want the binary for procrun... its just the tomcatX.exe file... 
rename it... ha ha


The TomcatW file is just a human interface... probably talking directly to 
the windows registry (params).


service bat... lets a user get it installed...

So if you have the TC zip version and want to install it as a service...
service install
will do it.

The real problem with installing TC from a zip is just that the APR is not 
there... and its a mission to guess the right one...
Stupid window users

RE: Tomcat 5.5 / Windows / procrun ?

2008-09-21 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5 / Windows / procrun ?

 - the installer for Windows installs a version of Tomcat 5.5 devoid of
 the usual startup.sh/bat, catalina.sh/bat etc.. and instead just
 installs a couple of files in Tomcat_home\bin, of which a tomcat5.exe
 (which seems to be the Tomcat executable), and a tomcat5w.exe which is
 the Windows GUI allowing to configure the Tomcat service..

I also find it extremely annoying that the scripts are not provided in the .exe 
version, and that the .exe installs Tomcat in a different location than the 
.zip download.

 It also contains a file service.bat which is described nowhere

It's described here:
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
which is reachable from the Setup section of the doc.

 which leads to a page mentioning procrun 1.0, but in
 the same breath indicating that it is now obsolete.

Not sure why it says obsolete (current version is 1.0.1), since I think 
everything in there is still accurate, although the tomcat5w.exe program 
provides a much easier mechanism to change the parameters.

 But I found nowhere a link to download this procrun in binary form.

That's an unfortunate issue.  You can find binaries for various Windows flavors 
here:
https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/
(Change the name of the executables to tomcat5*.exe for the older level.)

Other than stumbling across that link in this mailing list, I don't know any 
way of finding that location.

 (Or else this tomcat5.exe is not really java  packaged as a
 service, but just a stub pointing to an installed Java jvm dll).

That is correct.  The tomcat5.exe program is just another Java launcher that 
uses JNI to access the JVM, which is installed as several DLLs (not just 
jvm.dll).  It's very similar to the plain java.exe launcher, except it handles 
additional, service-specific parameters.

 - the documentation of this procrun (or whatever is related to it for
 Tomcat), on the Tomcat site, is out-of-date and does not match the
 version of procrun that is being used above.

Actually, I think it's pretty close.

 - the procrun program is a general utility that allows to
 take any Java program (or any program ?) and turn it into
 a Windows service.

Just Java programs.

 - and I don't have a clue as to what jsvc may be for.

jsvc is just a Linux/UNIX program that starts with superuser privileges so it 
can bind to low ports, then switches to the desired userid to run the 
designated Java program.  Without it, you'll need to play games with iptables 
or run Tomcat as root (highly undesirable) in order to use ports 80 and 443.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 / Windows / procrun ?

2008-09-21 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Tomcat 5.5 / Windows / procrun ?




It also contains a file service.bat which is described nowhere


It's described here:
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
which is reachable from the Setup section of the doc.


which leads to a page mentioning procrun 1.0, but in
the same breath indicating that it is now obsolete.


Not sure why it says obsolete (current version is 1.0.1), since I think 
everything in there is still accurate, although the tomcat5w.exe program 
provides a much easier mechanism to change the parameters.

Since the windows-service-howto is marked obsolete, I did not count it 
as a valid source for the procrun parameters.



But I found nowhere a link to download this procrun in binary form.


That's an unfortunate issue.  You can find binaries for various Windows flavors 
here:
https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/
(Change the name of the executables to tomcat5*.exe for the older level.)


Do you want to elaborate on the unfortunate issue of why the binaries 
are not available in the Commons, but are available on the Tomcat SVN ?


A related question : on the Tomcat SVN site, there are indeed various 
flavors, but on my laptop after installing Tomcat with the installer, I 
have only one flavor.  Does the installer pick the right one for the 
platform ?
And also, in the zip release of Tomcat, it seems that there is only one 
of each exe.  So which flavor is that ?





- the documentation of this procrun (or whatever is related to it for
Tomcat), on the Tomcat site, is out-of-date and does not match the
version of procrun that is being used above.


Actually, I think it's pretty close.

I have not actually compared with the one in the Commons, nor tested any 
of this.  I was writing is out-of-date because that's what's written 
in the how-to pages on the Tomcat site.
Maybe someone should just remove that out-of-date comment, it makes the 
whole thing all the more confusing.

Do you know where/how someone should suggest this ?

Thanks for the clarification on jsvc. That's at least one item that can 
be removed from the list.


Actually, I still have a question, or rather some assertions in need to 
be confirmed or denied :


1) One can download the zip version of Tomcat 5.5 (and 6 ?), and use the 
startup scripts to start a command-window instance of Tomcat. In that 
case, the executable shown running will be java.exe.
2) But starting Tomcat via these scripts will not allow to run Tomcat as 
a Windows Service.

3) To run Tomcat as a Service, you have to use the Tomcat(x).exe.
4) But you can use the tomcat(x).exe from the zip distribution, it is 
the same as the one installed by the Windows Installer.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 / Windows / procrun ?

2008-09-21 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 5.5 / Windows / procrun ?

 Do you want to elaborate on the unfortunate issue of why the
 binaries are not available in the Commons, but are available
 on the Tomcat SVN ?

Actually, I think most non-Java code from commons is source-only, with the 
expectation that the user will compile it for the target platform.  Due to the 
wide variety of Windows and Linux C environments available, it seems reasonable 
that the committers not try to cover all the bases.

 Does the installer pick the right one for the platform ?

No - only the 32-bit x86 version comes with either the .exe or .zip downloads.  
If you have an IA64 (perish the thought) or AMD64 platform, you need to 
recompile the source for that environment or go to the location specified in 
the previous message and download the appropriate .exe files.

 Maybe someone should just remove that out-of-date comment,
 it  makes the whole thing all the more confusing.
 Do you know where/how someone should suggest this ?

The normal procedure is to submit a bugzilla entry, preferably with a patch.

 1) One can download the zip version of Tomcat 5.5 (and 6 ?),
 and use the startup scripts to start a command-window instance
 of Tomcat. In that case, the executable shown running will be
 java.exe.

Correct; that's the standard launcher that comes with the JRE and is used by 
the scripts.

 2) But starting Tomcat via these scripts will not allow to
 run Tomcat as a Windows Service.

True, but the service.bat script will install the service, just as if you had 
used the .exe download.  If you're on Vista or Server 2008, you'll need to run 
the service.bat script as an administrator (not just be logged on as one).

 3) To run Tomcat as a Service, you have to use the Tomcat(x).exe.

The tomcatn.exe program *is* the service, at least as far as Windows is 
concerned.  The service.bat script installs the service, targeting the 
tomcatn.exe program.

Just running the tomcatn.exe program without the proper options does not 
create the service nor run as one; use the service.bat script to install and 
the tomcatnw.exe program to change settings.

 4) But you can use the tomcat(x).exe from the zip distribution, it is
 the same as the one installed by the Windows Installer.

Yes, they are identical.  Also, the tomcat5.exe and tomcat6.exe programs are 
identical (other than the names), as are the tomcat5w.exe and tomcat6w.exe 
programs.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 / Windows / procrun ?

2008-09-20 Thread André Warnier

Hi.

I have Tomcat 5.5 running on a variety of platforms, among them Windows 
XP (my laptop) and Windows 2003 server.
For the Windows installation, until now I have been using the Windows 
Service Installer from the Tomcat 5.5 download page, and it works fine.


But could someone shed some light on the following puzzle ?

A recent discussion on this list triggered my curiosity, and as a result 
I bumped into several things :


- the installer for Windows installs a version of Tomcat 5.5 devoid of 
the usual startup.sh/bat, catalina.sh/bat etc.. and instead just 
installs a couple of files in Tomcat_home\bin, of which a tomcat5.exe 
(which seems to be the Tomcat executable), and a tomcat5w.exe which is 
the Windows GUI allowing to configure the Tomcat service..


- the ImagePath Registry entry for the Tomcat 5.5 Service shows this :
 C:\Tomcat5.5\bin\tomcat5.exe //RS//Tomcat5

- On the Tomcat 5.5 download page, in addition to the installer, there 
also exists a Tomcat 5.5 zip file. That one seems to contain the full 
complement of usual files of Tomcat, including Tomcat_home\bin, plus the 
tomcat5.exe and tomcat5w.exe which are also in the installer package.
It also contains a file service.bat which is described nowhere, but 
seesm to be related to the procrun item of which question below.


The Tomcat 5.5 and Tomcat 6 on-line documentation, setup page, section 
for Windows, only seem to mention the Installer package.  There is a 
link on both the 5.5 and 6.0 Windows setup sections, pointing to a 
Windows Service HowTo, which leads to a page mentioning procrun 1.0, 
but in the same breath indicating that it is now obsolete.


Digging further, I found a link to the Apache Commons project Daemon, 
which seems to include this procrun for Windows, and also a jsvc for 
Unix.


The page there relative to procrun,
(http://commons.apache.org/daemon/procrun.html)
 apart from being relatively difficult to read, seems interesting and 
seems to match the way my Windows Tomcat 5.5 instances are really 
installed and running.

(See registry line above).
But I found nowhere a link to download this procrun in binary form.
I also did not find any link there pointing to any other version of 
procrun...


On the other side of things, this same Apache Commons Daemon project 
also covers a jsvc, which seems to be a wrapper allowing to run 
Tomcat as a daemon under Unix/Linux.


I believe I have seen mentions of this jsvc in some Tomcat documents (or 
in this forum ?), but at any rate my Tomcat Debian Linux systems seem to 
run Tomcat 5.5 as daemon perfectly fine, without seeming to use this 
jsvc module.

So I wonder what it is used for.


What I kind of piece together of all this is as follows :

- the packagers of Tomcat 5.5 and Tomcat 6 for Windows use this procrun 
program (in whatever version, but probably not 1.0), to take the java 
JVM executable and make it into a Windows service which runs Tomcat.
This Windows Service executable is named tomcat5.exe in the msi 
distribution. (Or else this tomcat5.exe is not really java packaged as a 
service, but just a stub pointing to an installed Java jvm dll).
Anyway the result is packaged, together with the other Tomcat 
components, into a Windows Service Installer package which is the one on 
the Tomcat download page.


- the documentation of this procrun (or whatever is related to it for 
Tomcat), on the Tomcat site, is out-of-date and does not match the 
version of procrun that is being used above.


- the procrun program is a general utility that allows to take any Java 
program (or any program ?) and turn it into a Windows service.  It thus 
seems to be something like the old srvany workhorse, but a bit more 
sophisticated.  But this procrun program does not seem to be available 
for download in binary form.


- and I don't have a clue as to what jsvc may be for.




Thanks
André

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]