Re: Running Tomcat from jsvc

2004-10-27 Thread [EMAIL PROTECTED]
Kevin Offet wrote:
Hi,
to help cut through the apparent confusion, all you need to do is:
1) change ownership (recursively) of your tomcat install dir to ( if 
your user account that will run tomcat is called for example tomrunner 
) tomrunner.tomrunner.

2) change to that user and decompress and build jsvc (in the 
${tomcat.installdir}/bin dir) according to the straightforward 
instructions included.

3) change ownership of the resulting jsvc binary to root.root (root 
initially runs jsvc which then changes the user to your tomrunner)

4) build yourself a decent startup/shutdown script appropriate to your 
distro and your preferences.

Read The Fine Manual at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html

for all that you'll need to know. jsvc -help will also spit out it's 
allowed parameters that you can play with.

5) go have fun building web-apps. ;-)
Kevin
Thanks so much, Kevin for clarification. Before, it had not been evident 
to me that making jsvc required to do it as the user to which jsvc will 
change. Also, I had all files in $CATALINA_HOME owned by root:root.

Now, as I changed $CATALINA_HOME/conf to ownership tomcat:tomcat and 
after making $CATALINA_HOME/work readable/writable by that user, 
everything works fine.

Thanks for your help again
--
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Running Tomcat from jsvc

2004-10-26 Thread [EMAIL PROTECTED]
Hi Folks,
I'm having problems starting Tomcat 5.0.28 using jsvc.
My system is SuSE Linux 9.1 with j2sdk1.4.2_05.
When I start Tomcat using $CATALINA_HOME/bin/startup.sh everything works 
fine. But now I want to run Tomcat as a daemon under a non-root user.

I followed the instructions on[1] for Unix daemon and built jsvc that I 
succeeded to start using the Tomcat5.sh script[2]. But actually, Tomcat 
didn't really start. So I added the options -verbose and -debug to 
the script[2] and saved the catalina.out log[3].

According to the log (line 1367), the daemon startet successfully, but 
when my browsers request http://localhost:8080/ , then there is no 
connection.

The log (line 626)[3] is telling me that server.xml couldn't be 
loaded, but it didn't tell why.

Could please somebody give me a hint what might be wrong and what I have 
to change to get it running?

[1]http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html#Unix%20daemon
[2]http://home.arcor.de/plsdontreply/tomcat/Tomcat5.sh.txt
[3]http://home.arcor.de/plsdontreply/tomcat/catalina.out.txt
--
Thanks in advance
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Running Tomcat from jsvc

2004-10-26 Thread Shapira, Yoav

Hi,
You have to start the jsvc as root, then it changes the effective user
ID to non-root.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 11:07 AM
To: [EMAIL PROTECTED]
Subject: Running Tomcat from jsvc

Hi Folks,
I'm having problems starting Tomcat 5.0.28 using jsvc.

My system is SuSE Linux 9.1 with j2sdk1.4.2_05.

When I start Tomcat using $CATALINA_HOME/bin/startup.sh everything
works
fine. But now I want to run Tomcat as a daemon under a non-root user.

I followed the instructions on[1] for Unix daemon and built jsvc that I
succeeded to start using the Tomcat5.sh script[2]. But actually, Tomcat
didn't really start. So I added the options -verbose and -debug to
the script[2] and saved the catalina.out log[3].

According to the log (line 1367), the daemon startet successfully, but
when my browsers request http://localhost:8080/ , then there is no
connection.

The log (line 626)[3] is telling me that server.xml couldn't be
loaded, but it didn't tell why.

Could please somebody give me a hint what might be wrong and what I
have
to change to get it running?

[1]http://jakarta.apache.org/tomcat/tomcat-5.0-
doc/setup.html#Unix%20daemon
[2]http://home.arcor.de/plsdontreply/tomcat/Tomcat5.sh.txt
[3]http://home.arcor.de/plsdontreply/tomcat/catalina.out.txt
--
Thanks in advance
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running Tomcat from jsvc

2004-10-26 Thread [EMAIL PROTECTED]
Shapira, Yoav wrote:
Hi,
You have to start the jsvc as root, then it changes the effective user
ID to non-root.
Hi,
That's exactly what I did, and according to the log (line 1, line 685), 
the user has been changed. Did I misunderstand something?

Of course, before that, I had tried to start that script as non-root and 
ran into a lot more of errors. But that's a different story.
--
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Running Tomcat from jsvc

2004-10-26 Thread Wolfgang Hackl
[EMAIL PROTECTED] wrote:
When I start Tomcat using $CATALINA_HOME/bin/startup.sh everything works 
fine. But now I want to run Tomcat as a daemon under a non-root user.
[...]
The log (line 626)[3] is telling me that server.xml couldn't be 
loaded, but it didn't tell why.
Hi Volkmar,
did you check the file system permissions of your $CATALINA_HOME 
directory? As I can see from my installations, server.xml has read and 
write permissions exclusively for its owner. My conclusion is that the 
directory must belong to the user, will run the service (wwwrun says 
your Tomcat5.sh).

Kind regards,
Wolfgang
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Running Tomcat from jsvc

2004-10-26 Thread [EMAIL PROTECTED]
Wolfgang Hackl wrote:
Hi Volkmar,
did you check the file system permissions of your $CATALINA_HOME 
directory? As I can see from my installations, server.xml has read and 
write permissions exclusively for its owner. My conclusion is that the 
directory must belong to the user, will run the service (wwwrun says 
your Tomcat5.sh).
Hi Wolfgang,
I got everything in /opt/jakarta-tomcat-5.0.28 owned by root:root.
So you mean, I should change all files in the conf subdirectory to be 
owned by wwwrun? Or is it better/safer to just make those files world 
readable/writeable and leaving them owned by root:root?

When, during installation of Tomcat should I have changed the ownership 
or permissions of which files? I've installed Tomcat using
  cd /opt
  sudo tar xzf /tmp/jakarta-tomcat-5.0.28.tar.gz
so that I got everything owned by root:root.

--
Volkmar W. Pogatzki
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Running Tomcat from jsvc

2004-10-26 Thread Kevin Offet
Hi,
to help cut through the apparent confusion, all you need to do is:
1) change ownership (recursively) of your tomcat install dir to ( if 
your user account that will run tomcat is called for example tomrunner 
) tomrunner.tomrunner.

2) change to that user and decompress and build jsvc (in the 
${tomcat.installdir}/bin dir) according to the straightforward 
instructions included.

3) change ownership of the resulting jsvc binary to root.root (root 
initially runs jsvc which then changes the user to your tomrunner)

4) build yourself a decent startup/shutdown script appropriate to your 
distro and your preferences.

Read The Fine Manual at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html

for all that you'll need to know. jsvc -help will also spit out it's 
allowed parameters that you can play with.

5) go have fun building web-apps. ;-)
Kevin
[EMAIL PROTECTED] wrote:
Wolfgang Hackl wrote:
Hi Volkmar,
did you check the file system permissions of your $CATALINA_HOME 
directory? As I can see from my installations, server.xml has read and 
write permissions exclusively for its owner. My conclusion is that the 
directory must belong to the user, will run the service (wwwrun says 
your Tomcat5.sh).

Hi Wolfgang,
I got everything in /opt/jakarta-tomcat-5.0.28 owned by root:root.
So you mean, I should change all files in the conf subdirectory to be 
owned by wwwrun? Or is it better/safer to just make those files world 
readable/writeable and leaving them owned by root:root?

When, during installation of Tomcat should I have changed the ownership 
or permissions of which files? I've installed Tomcat using
  cd /opt
  sudo tar xzf /tmp/jakarta-tomcat-5.0.28.tar.gz
so that I got everything owned by root:root.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-26 Thread Bob White
I have still not succeeded in getting jsvc daemon to run under Linux as user
tomcat.  All files under CATALINA_HOME are owned by the user tomcat.  All files
have been tried with 750 and 777 permissions.  This does not solve the problem.

I have noticed that jsvc looks up a JRE JVM rather than the development JVM
when it initializes.  The only thing I seem to be able to control (through
jvm.cfg and JVM name) is whether it loads the server version or the client
version.  But it's still looking up a JRE -- even though tools.jar (a part of
the JDK) is the first file listed in the classpath.

All processes show that they are owned by user tomcat.

The error I am seeing is FileNotFoundException.  Last line of tomcat code to
be called is:
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)

The problem must have nothing to do with permissions for file ownership.  

Nothing to do with file permissions or ownership.  

The problem persists no matter what the file permissions are or who owns them. 


There is no solution to this from merely changing the permissions (or
ownership) of tomcat files.

And yet, everything works fine when I use startup.sh, even when I run as user
tomcat.  In fact, everything works fine under jsvc so long as all of the class
files for the JSPs have been pre-built before starting tomcat.

I should note that I am using 5.0.19 under SuSE United Linux 1.0.

I have followed all of the instructions shown here:
 http://marc.theaimsgroup.com/?l=tomcat-userm=108373546715111w=2
And carefully repeated the process several times.

..Bob.

..Bob.

=
--Bob White-- home:727-490-7363, cell:727-463-6061
New (popup free!) photos of Polina: http://polina.70kg.com/

Everything that irritates us about others can lead us to an understanding of 
ourselves. - Carl Jung

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-21 Thread Bob White
: | Install service: No
jsvc.exec debug: | Remove service:  No
jsvc.exec debug: | JVM Name:server
jsvc.exec debug: | Java Home:   /usr/lib/java
jsvc.exec debug: | PID File:/usr/local/tomcat5/logs/catalina.pid
jsvc.exec debug: | User Name:   tomcat
jsvc.exec debug: | Extra Options:   8
jsvc.exec debug: |   -verbose
jsvc.exec debug: |   -Dcatalina.home=/usr/local/tomcat5
jsvc.exec debug: |   -Djava.io.tmpdir=/usr/local/tomcat5/temp
jsvc.exec debug: |   -Djava.endorsed.dirs=/usr/local/tomcat5/common/endorsed
jsvc.exec debug: |   -Dcatalina.base=/usr/local/tomcat5
jsvc.exec debug: |  
-Djava.class.path=/usr/lib/java/lib/tools.jar:/usr/local/tomcat5/bin/commons-daemon.jar:/usr/local/tomcat5/bin/commons-logging-api.jar:/usr/local/tomcat5/bin/bootstrap.jar
jsvc.exec debug: |   -Xms256m
jsvc.exec debug: |   -Xmx384m
jsvc.exec debug: | Class Invoked:   org.apache.catalina.startup.Bootstrap
jsvc.exec debug: | Class Arguments: 0
jsvc.exec debug: +---
jsvc.exec debug: user changed to 'tomcat'
jsvc.exec debug: User 'tomcat' validated
jsvc.exec debug: Attempting to locate Java Home in /usr/lib/java
jsvc.exec debug: Attempting to locate VM configuration file
/usr/lib/java/jre/lib/jvm.cfg
jsvc.exec debug: Found VM configuration file at /usr/lib/java/jre/lib/jvm.cfg
jsvc.exec debug: Found VM client definition in configuration
jsvc.exec debug: Checking library /usr/lib/java/jre/lib/i386/client/libjvm.so
jsvc.exec debug: Found VM server definition in configuration
jsvc.exec debug: Checking library /usr/lib/java/jre/lib/i386/server/libjvm.so
jsvc.exec debug: Found VM hotspot definition in configuration
jsvc.exec debug: Checking library /usr/lib/java/jre/lib/i386/hotspot/libjvm.so
jsvc.exec debug: Checking library /usr/lib/java/lib/i386/hotspot/libjvm.so
jsvc.exec debug: Cannot locate library for VM hotspot (skipping)
jsvc.exec debug: Found VM classic definition in configuration
jsvc.exec debug: Checking library /usr/lib/java/jre/lib/i386/classic/libjvm.so
jsvc.exec debug: Checking library /usr/lib/java/lib/i386/classic/libjvm.so
jsvc.exec debug: Cannot locate library for VM classic (skipping)
jsvc.exec debug: Found VM native definition in configuration
jsvc.exec debug: Checking library /usr/lib/java/jre/lib/i386/native/libjvm.so
jsvc.exec debug: Checking library /usr/lib/java/lib/i386/native/libjvm.so
jsvc.exec debug: Cannot locate library for VM native (skipping)
jsvc.exec debug: Found VM green definition in configuration
jsvc.exec debug: Checking library /usr/lib/java/jre/lib/i386/green/libjvm.so
jsvc.exec debug: Checking library /usr/lib/java/lib/i386/green/libjvm.so
jsvc.exec debug: Cannot locate library for VM green (skipping)
jsvc.exec debug: Java Home located in /usr/lib/java
jsvc.exec debug: +-- DUMPING JAVA HOME STRUCTURE 
jsvc.exec debug: | Java Home:   /usr/lib/java
jsvc.exec debug: | Java VM Config.: /usr/lib/java/jre/lib/jvm.cfg
jsvc.exec debug: | Found JVMs:  2
jsvc.exec debug: | JVM Name:client
jsvc.exec debug: | 
/usr/lib/java/jre/lib/i386/client/libjvm.so
jsvc.exec debug: | JVM Name:server
jsvc.exec debug: | 
/usr/lib/java/jre/lib/i386/server/libjvm.so
jsvc.exec debug: +---
jsvc.exec debug: Running w/
LD_LIBRARY_PATH=/usr/lib/java/jre/lib/i386/server:/usr/lib/java/jre/lib/i386
jsvc.exec debug: redirecting stdout to /usr/local/tomcat5/logs/catalina.out and
stderr to /usr/local/tomcat5/logs/catalina.err


--- Parsons Technical Services [EMAIL PROTECTED] wrote:
 Bob,
 
 It sounds like a permissions problem. Check the settings in the context for
 workdir=...
 If you have set this, then you must ensure that your tomcat user has rights
 to that directory also.
 
 Read through the following to see if you missed anything in your setup:
 http://marc.theaimsgroup.com/?l=tomcat-userm=108373546715111w=2
 
 If all else fails, run TC as root, search for the temp directory and check
 the permissions on the parent directory. Set it and the temp directory to
 tomcat owner.
 
 Doug
 www.parsonstechnical.com
 
 
 - Original Message - 
 From: Bob White [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 20, 2004 2:08 AM
 Subject: running Tomcat from jsvc daemon under Linux as user tomcat
 
 
  I am running Tomcat (under Linux) from jsvc daemon as user tomcat. When
 I do
  this, Tomcat fails to run JSPs because Tomcat cannot create java files in
 the
  work directories and subsequently cannot compile them (cuz they're not
 there).
 
  When I run Tomcat using startup.sh as user root I have no problems.
 
  When I run Tomcat using startup.sh as user tomcat, I can compile at
 least
  some of the java files, but there's another problem with one particular
 app
  which uses css stylesheets and the stylesheets don't get made properly.
 I'll
  worry about that later.
 
  Of course, the quick solution is to simply

Re: running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-21 Thread Parsons Technical Services
Bob,

Check one more thing. What are the permission set for on the directories?
Also did you find the work directory? And if so who was the owner and what
were the permissions set to?

Even if you own the directory, if you have set the permissions to not allow
writes you will get errors or access denied.

Just thinking of all possibilities.

I think I did a chmod -R 750 tomcat5  on my main tomcat directory.

Doug

- Original Message - 
From: Bob White [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, May 21, 2004 5:45 AM
Subject: Re: running Tomcat from jsvc daemon under Linux as user tomcat


 I have set everything in the entire $CATALINA_HOME directory tree to be
owned
 by user tomcat, group tomcat.  I even tried setting them to user.root and
put
 tomcat in the root group.  Still, Tomcat cannot write to the work dir.

 When I try to run jsvc as user root, I get a
 java.lang.reflect.InvocationTargetException.

 But when I run as root using startup.sh, everything's fine.  And once I've
 compiled the jsps in the work directory and the class files exist, then I
can
 run them under the daemon.  So there's definitely something fishy with the
jsvc
 daemon that is preventing me from compiling.

 I carefully set up the init.d tomcat script so that it mimics startup.sh
as
 much as possible.  Still no dice.

 I've turned on debugging and I see that when the daemon kicks off, it
lists its
 parsed command line arguments (I've posted the output below).  There are
 options such as run as service, install service, etc.  Should I be trying
to
 run as service?

 ..Bob.


 catalina_home is /usr/local/tomcat5

 setting classpath
 classpath is

@/usr/lib/java/lib/tools.jar:/usr/local/tomcat5/bin/commons-daemon.jar:/usr/
local/tomcat5/bin/commons-logging-api.jar:/usr/local/tomcat5/bin/bootstrap.j
ar@

 jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS --
 jsvc debug: | Detach:  True
 jsvc debug: | Show Version:No
 jsvc debug: | Show Help:   No
 jsvc debug: | Check Only:  Disabled
 jsvc debug: | Run as service:  No
 jsvc debug: | Install service: No
 jsvc debug: | Remove service:  No
 jsvc debug: | JVM Name:server
 jsvc debug: | Java Home:   /usr/lib/java
 jsvc debug: | PID File:/usr/local/tomcat5/logs/catalina.pid
 jsvc debug: | User Name:   tomcat
 jsvc debug: | Extra Options:   8
 jsvc debug: |   -verbose
 jsvc debug: |   -Dcatalina.home=/usr/local/tomcat5
 jsvc debug: |   -Djava.io.tmpdir=/usr/local/tomcat5/temp
 jsvc debug: |   -Djava.endorsed.dirs=/usr/local/tomcat5/common/endorsed
 jsvc debug: |   -Dcatalina.base=/usr/local/tomcat5
 jsvc debug: |

-Djava.class.path=/usr/lib/java/lib/tools.jar:/usr/local/tomcat5/bin/common
s-daemon.jar:/usr/local/tomcat5/bin/commons-logging-api.jar:/usr/local/tomca
t5/bin/bootstrap.jar
 jsvc debug: |   -Xms256m
 jsvc debug: |   -Xmx384m
 jsvc debug: | Class Invoked:   org.apache.catalina.startup.Bootstrap
 jsvc debug: | Class Arguments: 0
 jsvc debug: +---
 jsvc debug: user changed to 'tomcat'
 jsvc debug: User 'tomcat' validated
 jsvc debug: Attempting to locate Java Home in /usr/lib/java
 jsvc debug: Attempting to locate VM configuration file
 /usr/lib/java/jre/lib/jvm.cfg
 jsvc debug: Found VM configuration file at /usr/lib/java/jre/lib/jvm.cfg
 jsvc debug: Found VM client definition in configuration
 jsvc debug: Checking library /usr/lib/java/jre/lib/i386/client/libjvm.so
 jsvc debug: Found VM server definition in configuration
 jsvc debug: Checking library /usr/lib/java/jre/lib/i386/server/libjvm.so
 jsvc debug: Found VM hotspot definition in configuration
 jsvc debug: Checking library /usr/lib/java/jre/lib/i386/hotspot/libjvm.so
 jsvc debug: Checking library /usr/lib/java/lib/i386/hotspot/libjvm.so
 jsvc debug: Cannot locate library for VM hotspot (skipping)
 jsvc debug: Found VM classic definition in configuration
 jsvc debug: Checking library /usr/lib/java/jre/lib/i386/classic/libjvm.so
 jsvc debug: Checking library /usr/lib/java/lib/i386/classic/libjvm.so
 jsvc debug: Cannot locate library for VM classic (skipping)
 jsvc debug: Found VM native definition in configuration
 jsvc debug: Checking library /usr/lib/java/jre/lib/i386/native/libjvm.so
 jsvc debug: Checking library /usr/lib/java/lib/i386/native/libjvm.so
 jsvc debug: Cannot locate library for VM native (skipping)
 jsvc debug: Found VM green definition in configuration
 jsvc debug: Checking library /usr/lib/java/jre/lib/i386/green/libjvm.so
 jsvc debug: Checking library /usr/lib/java/lib/i386/green/libjvm.so
 jsvc debug: Cannot locate library for VM green (skipping)
 jsvc debug: Java Home located in /usr/lib/java
 jsvc debug: +-- DUMPING JAVA HOME STRUCTURE 
 jsvc debug: | Java Home:   /usr/lib/java
 jsvc debug: | Java VM Config.: /usr/lib/java/jre/lib/jvm.cfg
 jsvc debug: | Found JVMs:  2
 jsvc debug: | JVM Name:client
 jsvc debug: |
/usr

running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-20 Thread Bob White
I am running Tomcat (under Linux) from jsvc daemon as user tomcat. When I do
this, Tomcat fails to run JSPs because Tomcat cannot create java files in the
work directories and subsequently cannot compile them (cuz they're not there).
 
When I run Tomcat using startup.sh as user root I have no problems.
 
When I run Tomcat using startup.sh as user tomcat, I can compile at least
some of the java files, but there's another problem with one particular app
which uses css stylesheets and the stylesheets don't get made properly.  I'll
worry about that later.
 
Of course, the quick solution is to simply invoke startup.sh as root from my
/etc/init.d/tomcat script. But according to instructions
on the Apache site, I'm supposed to be able to run Tomcat as daemon using jsvc.
 
But something's amiss. I installed Tomcat as user tomcat and user tomcat
owns the entire directory tree (ie. /usr/local/tomcat5/...).  I put user
tomcat into group tomcat and group root and tried putting the entire
directory tree into both the tomcat group and the root group.  No
difference.
 
Any ideas?
 
BTW, the exact error message I am getting is:
 
java.io.FileNotFoundException:
/usr/local/tomcat5/work/Catalina/localhost/AHEMSS/org/apache/jsp/ahess/ess0_jsp.java
 at java.io.FileOutputStream.open(Native Method)
 at java.io.FileOutputStream.(FileOutputStream.java:179)
 at java.io.FileOutputStream.(FileOutputStream.java:70)
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)
 ... etc
 
..Bob. 

=
--Bob White-- home:727-490-7363, cell:727-463-6061
New (popup free!) photos of Polina: http://polina.70kg.com/

Everything that irritates us about others can lead us to an understanding of 
ourselves. - Carl Jung

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-20 Thread Parsons Technical Services
Bob,

It sounds like a permissions problem. Check the settings in the context for
workdir=...
If you have set this, then you must ensure that your tomcat user has rights
to that directory also.

Read through the following to see if you missed anything in your setup:
http://marc.theaimsgroup.com/?l=tomcat-userm=108373546715111w=2

If all else fails, run TC as root, search for the temp directory and check
the permissions on the parent directory. Set it and the temp directory to
tomcat owner.

Doug
www.parsonstechnical.com


- Original Message - 
From: Bob White [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 2:08 AM
Subject: running Tomcat from jsvc daemon under Linux as user tomcat


 I am running Tomcat (under Linux) from jsvc daemon as user tomcat. When
I do
 this, Tomcat fails to run JSPs because Tomcat cannot create java files in
the
 work directories and subsequently cannot compile them (cuz they're not
there).

 When I run Tomcat using startup.sh as user root I have no problems.

 When I run Tomcat using startup.sh as user tomcat, I can compile at
least
 some of the java files, but there's another problem with one particular
app
 which uses css stylesheets and the stylesheets don't get made properly.
I'll
 worry about that later.

 Of course, the quick solution is to simply invoke startup.sh as root from
my
 /etc/init.d/tomcat script. But according to instructions
 on the Apache site, I'm supposed to be able to run Tomcat as daemon using
jsvc.

 But something's amiss. I installed Tomcat as user tomcat and user
tomcat
 owns the entire directory tree (ie. /usr/local/tomcat5/...).  I put user
 tomcat into group tomcat and group root and tried putting the entire
 directory tree into both the tomcat group and the root group.  No
 difference.

 Any ideas?

 BTW, the exact error message I am getting is:

 java.io.FileNotFoundException:

/usr/local/tomcat5/work/Catalina/localhost/AHEMSS/org/apache/jsp/ahess/ess0_
jsp.java
  at java.io.FileOutputStream.open(Native Method)
  at java.io.FileOutputStream.(FileOutputStream.java:179)
  at java.io.FileOutputStream.(FileOutputStream.java:70)
  at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)
  ... etc

 ..Bob.

 =
 --Bob White-- home:727-490-7363, cell:727-463-6061
 New (popup free!) photos of Polina: http://polina.70kg.com/

 Everything that irritates us about others can lead us to an understanding
of ourselves. - Carl Jung

 -
 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]