Quantcast

Tomcat 6.0.16 on Linux installation and setup

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tomcat 6.0.16 on Linux installation and setup

kjwchu
Tomcat 6.0.16 on Linux installation and setup

My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 Fri Apr 20 16:25:34 EDT 2007
The tomcat that I downloaded is 6.0.16

I've installed Tomcat6 on a Linux system per the Tomcat6 documentation, as follows:
    cd $CATALINA_HOME/bin
    tar xvfz jsvc.tar.gz
    cd jsvc-src
    autoconf
    ./configure
    make
    cp jsvc ..
    cd ..

I then started Tomcat, per the documentation, as follows:
    cd $CATALINA_HOME
    ./bin/jsvc -cp ./bin/bootstrap.jar \
        -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
        org.apache.catalina.startup.Bootstrap

The startup fails with the following errors in  the catalina.err

30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file /var/run/jsvc.pid, PID is 21791
30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return value of 255

Can anyone tell me how to work around these errors? Thanks for any thoughts.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

Agile Aspect
If you're working as root, then you don't permission to write
into /var/run.

Add a flag for pid file to write somewhere where you have
permission to write, e.g., /tmp

       -pidfile /tmp/jsvc.pid


kjwchu wrote:

> Tomcat 6.0.16 on Linux installation and setup
>
> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 Fri
> Apr 20 16:25:34 EDT 2007
> The tomcat that I downloaded is 6.0.16
>
> I've installed Tomcat6 on a Linux system per the Tomcat6 documentation, as
> follows:
>     cd $CATALINA_HOME/bin
>     tar xvfz jsvc.tar.gz
>     cd jsvc-src
>     autoconf
>     ./configure
>     make
>     cp jsvc ..
>     cd ..
>
> I then started Tomcat, per the documentation, as follows:
>     cd $CATALINA_HOME
>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>         org.apache.catalina.startup.Bootstrap
>
> The startup fails with the following errors in  the catalina.err
>
> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
> /var/run/jsvc.pid, PID is 21791
> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return value
> of 255
>
> Can anyone tell me how to work around these errors? Thanks for any thoughts.
>
>  


--
Article. VI. Clause 3 of the constitution of the United States states:

"The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial Officers,
both of the United States and of the several States, shall be bound by
Oath or Affirmation, to support this Constitution; but no religious Test
shall ever be required as a Qualification to any Office or public Trust
under the United States."



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

bgiles
You definitely don't want to run tomcat as root!  Ideally create a new
user and group, e.g., 'tomcat6', and run tomcat as that user.  You'll
want to change ownership of $CATALINA_HOME and everything it contains to
tomcat6.

I think debian puts the pid in $CATALINA_HOME/temp/tomcat6.pid.  I don't
know if that breaks the rules for what goes into 'temp' though.

You'll also need to make some ownership changes to your system, as
appropriate.  E.g., my $CATALINA_HOME/logs
directory is actually a symlink to the more standard /var/log/tomcat6,
with the latter owned by my tomcat user instead of root.

Agile Aspect wrote:

> If you're working as root, then you don't permission to write
> into /var/run.
>
> Add a flag for pid file to write somewhere where you have
> permission to write, e.g., /tmp
>
>       -pidfile /tmp/jsvc.pid
>
>
> kjwchu wrote:
>> Tomcat 6.0.16 on Linux installation and setup
>>
>> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1
>> Fri
>> Apr 20 16:25:34 EDT 2007
>> The tomcat that I downloaded is 6.0.16
>>
>> I've installed Tomcat6 on a Linux system per the Tomcat6
>> documentation, as
>> follows:
>>     cd $CATALINA_HOME/bin
>>     tar xvfz jsvc.tar.gz
>>     cd jsvc-src
>>     autoconf
>>     ./configure
>>     make
>>     cp jsvc ..
>>     cd ..
>>
>> I then started Tomcat, per the documentation, as follows:
>>     cd $CATALINA_HOME
>>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>>         org.apache.catalina.startup.Bootstrap
>>
>> The startup fails with the following errors in  the catalina.err
>> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
>> /var/run/jsvc.pid, PID is 21791
>> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return
>> value
>> of 255
>>
>> Can anyone tell me how to work around these errors? Thanks for any
>> thoughts.
>>
>>  
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

kjwchu
In reply to this post by Agile Aspect
My account is not root. Now I am getting the syscall failed in set_caps.


$ ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -pidfile /tmp/jsvc.pid org.apache.catalina.startup.Bootstrap
[nreg@lin-vmenfalcon apache-tomcat-6.0.16]$ more ./logs/catalina.err
01/07/2008 09:09:12 27550 jsvc.exec error: syscall failed in set_caps
01/07/2008 09:09:12 27550 jsvc.exec error: set_caps(CAPS) failed
01/07/2008 09:09:12 27549 jsvc.exec error: Service exit with a return value of 4



Agile Aspect wrote
If you're working as root, then you don't permission to write
into /var/run.

Add a flag for pid file to write somewhere where you have
permission to write, e.g., /tmp

       -pidfile /tmp/jsvc.pid


kjwchu wrote:
> Tomcat 6.0.16 on Linux installation and setup
>
> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 Fri
> Apr 20 16:25:34 EDT 2007
> The tomcat that I downloaded is 6.0.16
>
> I've installed Tomcat6 on a Linux system per the Tomcat6 documentation, as
> follows:
>     cd $CATALINA_HOME/bin
>     tar xvfz jsvc.tar.gz
>     cd jsvc-src
>     autoconf
>     ./configure
>     make
>     cp jsvc ..
>     cd ..
>
> I then started Tomcat, per the documentation, as follows:
>     cd $CATALINA_HOME
>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>         org.apache.catalina.startup.Bootstrap
>
> The startup fails with the following errors in  the catalina.err
>
> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
> /var/run/jsvc.pid, PID is 21791
> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return value
> of 255
>
> Can anyone tell me how to work around these errors? Thanks for any thoughts.
>
>  


--
Article. VI. Clause 3 of the constitution of the United States states:

"The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial Officers,
both of the United States and of the several States, shall be bound by
Oath or Affirmation, to support this Constitution; but no religious Test
shall ever be required as a Qualification to any Office or public Trust
under the United States."



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

kjwchu
In reply to this post by bgiles
Thanks for the reply.
My account is not root account.
Now I placed " -pidfile $CATALINA_HOME/temp/jsvc.pid "; but still the same error.

[apache-tomcat-6.0.16]$ ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err -pidfile $CATALINA_HOME/temp/jsvc.pid org.apache.catalina.startup.Bootstrap
[apache-tomcat-6.0.16]$ more ./logs/catalina.err
01/07/2008 09:15:18 27597 jsvc.exec error: syscall failed in set_caps
01/07/2008 09:15:18 27597 jsvc.exec error: set_caps(CAPS) failed
01/07/2008 09:15:18 27596 jsvc.exec error: Service exit with a return value of 4
[apache-tomcat-6.0.16]$




bgiles wrote
You definitely don't want to run tomcat as root!  Ideally create a new
user and group, e.g., 'tomcat6', and run tomcat as that user.  You'll
want to change ownership of $CATALINA_HOME and everything it contains to
tomcat6.

I think debian puts the pid in $CATALINA_HOME/temp/tomcat6.pid.  I don't
know if that breaks the rules for what goes into 'temp' though.

You'll also need to make some ownership changes to your system, as
appropriate.  E.g., my $CATALINA_HOME/logs
directory is actually a symlink to the more standard /var/log/tomcat6,
with the latter owned by my tomcat user instead of root.

Agile Aspect wrote:
> If you're working as root, then you don't permission to write
> into /var/run.
>
> Add a flag for pid file to write somewhere where you have
> permission to write, e.g., /tmp
>
>       -pidfile /tmp/jsvc.pid
>
>
> kjwchu wrote:
>> Tomcat 6.0.16 on Linux installation and setup
>>
>> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1
>> Fri
>> Apr 20 16:25:34 EDT 2007
>> The tomcat that I downloaded is 6.0.16
>>
>> I've installed Tomcat6 on a Linux system per the Tomcat6
>> documentation, as
>> follows:
>>     cd $CATALINA_HOME/bin
>>     tar xvfz jsvc.tar.gz
>>     cd jsvc-src
>>     autoconf
>>     ./configure
>>     make
>>     cp jsvc ..
>>     cd ..
>>
>> I then started Tomcat, per the documentation, as follows:
>>     cd $CATALINA_HOME
>>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>>         org.apache.catalina.startup.Bootstrap
>>
>> The startup fails with the following errors in  the catalina.err
>> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
>> /var/run/jsvc.pid, PID is 21791
>> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return
>> value
>> of 255
>>
>> Can anyone tell me how to work around these errors? Thanks for any
>> thoughts.
>>
>>  
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

ole ersoy
I would try running as root to make sure it's a directory ownership/permission issue.  If it runs fine as root, I would download and untar a fresh instance of tomcat (To make sure that Tomcat can read all files it created during the first boot - I think only log files and the pid).

Rebuild jsvc, and then try it again with changed pid directory:
-pidfile $CATALINA_HOME/temp/jsvc.pid

Ole

kjwchu wrote:

> Thanks for the reply.
> My account is not root account.
> Now I placed " -pidfile $CATALINA_HOME/temp/jsvc.pid "; but still the same
> error.
>
> [apache-tomcat-6.0.16]$ ./bin/jsvc -cp ./bin/bootstrap.jar -outfile
> ./logs/catalina.out -errfile ./logs/catalina.err -pidfile
> $CATALINA_HOME/temp/jsvc.pid org.apache.catalina.startup.Bootstrap
> [apache-tomcat-6.0.16]$ more ./logs/catalina.err
> 01/07/2008 09:15:18 27597 jsvc.exec error: syscall failed in set_caps
> 01/07/2008 09:15:18 27597 jsvc.exec error: set_caps(CAPS) failed
> 01/07/2008 09:15:18 27596 jsvc.exec error: Service exit with a return value
> of 4
> [apache-tomcat-6.0.16]$
>
>
>
>
>
> bgiles wrote:
>> You definitely don't want to run tomcat as root!  Ideally create a new
>> user and group, e.g., 'tomcat6', and run tomcat as that user.  You'll
>> want to change ownership of $CATALINA_HOME and everything it contains to
>> tomcat6.
>>
>> I think debian puts the pid in $CATALINA_HOME/temp/tomcat6.pid.  I don't
>> know if that breaks the rules for what goes into 'temp' though.
>>
>> You'll also need to make some ownership changes to your system, as
>> appropriate.  E.g., my $CATALINA_HOME/logs
>> directory is actually a symlink to the more standard /var/log/tomcat6,
>> with the latter owned by my tomcat user instead of root.
>>
>> Agile Aspect wrote:
>>> If you're working as root, then you don't permission to write
>>> into /var/run.
>>>
>>> Add a flag for pid file to write somewhere where you have
>>> permission to write, e.g., /tmp
>>>
>>>       -pidfile /tmp/jsvc.pid
>>>
>>>
>>> kjwchu wrote:
>>>> Tomcat 6.0.16 on Linux installation and setup
>>>>
>>>> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1
>>>> Fri
>>>> Apr 20 16:25:34 EDT 2007
>>>> The tomcat that I downloaded is 6.0.16
>>>>
>>>> I've installed Tomcat6 on a Linux system per the Tomcat6
>>>> documentation, as
>>>> follows:
>>>>     cd $CATALINA_HOME/bin
>>>>     tar xvfz jsvc.tar.gz
>>>>     cd jsvc-src
>>>>     autoconf
>>>>     ./configure
>>>>     make
>>>>     cp jsvc ..
>>>>     cd ..
>>>>
>>>> I then started Tomcat, per the documentation, as follows:
>>>>     cd $CATALINA_HOME
>>>>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>>>>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>>>>         org.apache.catalina.startup.Bootstrap
>>>>
>>>> The startup fails with the following errors in  the catalina.err
>>>> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
>>>> /var/run/jsvc.pid, PID is 21791
>>>> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return
>>>> value
>>>> of 255
>>>>
>>>> Can anyone tell me how to work around these errors? Thanks for any
>>>> thoughts.
>>>>
>>>>  
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

kjwchu
In reply to this post by Agile Aspect
I found the link below. It says we should modify jsvc_unix.c and recompile; but I don't have jsvc_unix.c under my CATALINA_HOME.

https://issues.apache.org/jira/browse/DAEMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466233





Agile Aspect wrote
If you're working as root, then you don't permission to write
into /var/run.

Add a flag for pid file to write somewhere where you have
permission to write, e.g., /tmp

       -pidfile /tmp/jsvc.pid


kjwchu wrote:
> Tomcat 6.0.16 on Linux installation and setup
>
> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 Fri
> Apr 20 16:25:34 EDT 2007
> The tomcat that I downloaded is 6.0.16
>
> I've installed Tomcat6 on a Linux system per the Tomcat6 documentation, as
> follows:
>     cd $CATALINA_HOME/bin
>     tar xvfz jsvc.tar.gz
>     cd jsvc-src
>     autoconf
>     ./configure
>     make
>     cp jsvc ..
>     cd ..
>
> I then started Tomcat, per the documentation, as follows:
>     cd $CATALINA_HOME
>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>         org.apache.catalina.startup.Bootstrap
>
> The startup fails with the following errors in  the catalina.err
>
> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
> /var/run/jsvc.pid, PID is 21791
> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return value
> of 255
>
> Can anyone tell me how to work around these errors? Thanks for any thoughts.
>
>  


--
Article. VI. Clause 3 of the constitution of the United States states:

"The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial Officers,
both of the United States and of the several States, shall be bound by
Oath or Affirmation, to support this Constitution; but no religious Test
shall ever be required as a Qualification to any Office or public Trust
under the United States."



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

Agile Aspect
In reply to this post by kjwchu
Sorry, I meant if you're NOT working as root you'll have trouble
since writing to system directories requires root privileges.

kjwchu wrote:

> Thanks for the reply.
> My account is not root account.
> Now I placed " -pidfile $CATALINA_HOME/temp/jsvc.pid "; but still the same
> error.
>
> [apache-tomcat-6.0.16]$ ./bin/jsvc -cp ./bin/bootstrap.jar -outfile
> ./logs/catalina.out -errfile ./logs/catalina.err -pidfile
> $CATALINA_HOME/temp/jsvc.pid org.apache.catalina.startup.Bootstrap
> [apache-tomcat-6.0.16]$ more ./logs/catalina.err
> 01/07/2008 09:15:18 27597 jsvc.exec error: syscall failed in set_caps
> 01/07/2008 09:15:18 27597 jsvc.exec error: set_caps(CAPS) failed
> 01/07/2008 09:15:18 27596 jsvc.exec error: Service exit with a return value
> of 4
> [apache-tomcat-6.0.16]$
>
>
>
>
>
> bgiles wrote:
>  
>> You definitely don't want to run tomcat as root!  Ideally create a new
>> user and group, e.g., 'tomcat6', and run tomcat as that user.  You'll
>> want to change ownership of $CATALINA_HOME and everything it contains to
>> tomcat6.
>>
>> I think debian puts the pid in $CATALINA_HOME/temp/tomcat6.pid.  I don't
>> know if that breaks the rules for what goes into 'temp' though.
>>
>> You'll also need to make some ownership changes to your system, as
>> appropriate.  E.g., my $CATALINA_HOME/logs
>> directory is actually a symlink to the more standard /var/log/tomcat6,
>> with the latter owned by my tomcat user instead of root.
>>
>> Agile Aspect wrote:
>>    
>>> If you're working as root, then you don't permission to write
>>> into /var/run.
>>>
>>> Add a flag for pid file to write somewhere where you have
>>> permission to write, e.g., /tmp
>>>
>>>       -pidfile /tmp/jsvc.pid
>>>
>>>
>>> kjwchu wrote:
>>>      
>>>> Tomcat 6.0.16 on Linux installation and setup
>>>>
>>>> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1
>>>> Fri
>>>> Apr 20 16:25:34 EDT 2007
>>>> The tomcat that I downloaded is 6.0.16
>>>>
>>>> I've installed Tomcat6 on a Linux system per the Tomcat6
>>>> documentation, as
>>>> follows:
>>>>     cd $CATALINA_HOME/bin
>>>>     tar xvfz jsvc.tar.gz
>>>>     cd jsvc-src
>>>>     autoconf
>>>>     ./configure
>>>>     make
>>>>     cp jsvc ..
>>>>     cd ..
>>>>
>>>> I then started Tomcat, per the documentation, as follows:
>>>>     cd $CATALINA_HOME
>>>>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>>>>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>>>>         org.apache.catalina.startup.Bootstrap
>>>>
>>>> The startup fails with the following errors in  the catalina.err
>>>> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
>>>> /var/run/jsvc.pid, PID is 21791
>>>> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return
>>>> value
>>>> of 255
>>>>
>>>> Can anyone tell me how to work around these errors? Thanks for any
>>>> thoughts.
>>>>
>>>>  
>>>>        
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>>    
>
>  


--
Article. VI. Clause 3 of the constitution of the United States states:

"The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial Officers,
both of the United States and of the several States, shall be bound by
Oath or Affirmation, to support this Constitution; but no religious Test
shall ever be required as a Qualification to any Office or public Trust
under the United States."



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

Agile Aspect
In reply to this post by kjwchu
It should be in the file jsvc.tar.gz which should be in the
./bin directory of Tomcat.

If not, then download it again from Apache.

Also, there's a switch for jsvc

    -user

to run as another user.

Type

    jsvc --help

for other options.

Also, read the documentation at

    http://tomcat.apache.org/tomcat-6.0-doc/setup.html

kjwchu wrote:

> I found the link below. It says we should modify jsvc_unix.c and recompile;
> but I don't have jsvc_unix.c under my CATALINA_HOME.
>
> https://issues.apache.org/jira/browse/DAEMON-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466233
>
>
>
>
>
>
> Agile Aspect wrote:
>  
>> If you're working as root, then you don't permission to write
>> into /var/run.
>>
>> Add a flag for pid file to write somewhere where you have
>> permission to write, e.g., /tmp
>>
>>        -pidfile /tmp/jsvc.pid
>>
>>
>> kjwchu wrote:
>>    
>>> Tomcat 6.0.16 on Linux installation and setup
>>>
>>> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 Fri
>>> Apr 20 16:25:34 EDT 2007
>>> The tomcat that I downloaded is 6.0.16
>>>
>>> I've installed Tomcat6 on a Linux system per the Tomcat6 documentation,
>>> as
>>> follows:
>>>     cd $CATALINA_HOME/bin
>>>     tar xvfz jsvc.tar.gz
>>>     cd jsvc-src
>>>     autoconf
>>>     ./configure
>>>     make
>>>     cp jsvc ..
>>>     cd ..
>>>
>>> I then started Tomcat, per the documentation, as follows:
>>>     cd $CATALINA_HOME
>>>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>>>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>>>         org.apache.catalina.startup.Bootstrap
>>>
>>> The startup fails with the following errors in  the catalina.err
>>>
>>> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
>>> /var/run/jsvc.pid, PID is 21791
>>> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return
>>> value
>>> of 255
>>>
>>> Can anyone tell me how to work around these errors? Thanks for any
>>> thoughts.
>>>
>>>  
>>>      
>> --
>> Article. VI. Clause 3 of the constitution of the United States states:
>>
>> "The Senators and Representatives before mentioned, and the Members of
>> the several State Legislatures, and all executive and judicial Officers,
>> both of the United States and of the several States, shall be bound by
>> Oath or Affirmation, to support this Constitution; but no religious Test
>> shall ever be required as a Qualification to any Office or public Trust
>> under the United States."
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>
>>    
>
>  


--
Article. VI. Clause 3 of the constitution of the United States states:

"The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial Officers,
both of the United States and of the several States, shall be bound by
Oath or Affirmation, to support this Constitution; but no religious Test
shall ever be required as a Qualification to any Office or public Trust
under the United States."



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 6.0.16 on Linux installation and setup

kjwchu
In reply to this post by Agile Aspect
Thanks, it works now after I get sudo privilege.

The catalina log shows below, but any one tell me if this line
"INFO: JK: ajp13 listening on /0.0.0.0:8009" metters? Why does it not show my IP address?

Thanks!

Jul 1, 2008 11:30:15 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 1, 2008 11:30:15 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1428 ms
Jul 1, 2008 11:30:15 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 1, 2008 11:30:15 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Jul 1, 2008 11:30:17 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
Jul 1, 2008 11:30:17 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.
Jul 1, 2008 11:30:17 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 1, 2008 11:30:18 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 1, 2008 11:30:18 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/38  config=null
Jul 1, 2008 11:30:18 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2918 ms
[nreg@lin-vmenfalcon logs]$ pwd
/nreg/apache-tomcat-6.0.16/logs
[nreg@lin-vmenfalcon logs]$





Agile Aspect wrote
Sorry, I meant if you're NOT working as root you'll have trouble
since writing to system directories requires root privileges.

kjwchu wrote:
> Thanks for the reply.
> My account is not root account.
> Now I placed " -pidfile $CATALINA_HOME/temp/jsvc.pid "; but still the same
> error.
>
> [apache-tomcat-6.0.16]$ ./bin/jsvc -cp ./bin/bootstrap.jar -outfile
> ./logs/catalina.out -errfile ./logs/catalina.err -pidfile
> $CATALINA_HOME/temp/jsvc.pid org.apache.catalina.startup.Bootstrap
> [apache-tomcat-6.0.16]$ more ./logs/catalina.err
> 01/07/2008 09:15:18 27597 jsvc.exec error: syscall failed in set_caps
> 01/07/2008 09:15:18 27597 jsvc.exec error: set_caps(CAPS) failed
> 01/07/2008 09:15:18 27596 jsvc.exec error: Service exit with a return value
> of 4
> [apache-tomcat-6.0.16]$
>
>
>
>
>
> bgiles wrote:
>  
>> You definitely don't want to run tomcat as root!  Ideally create a new
>> user and group, e.g., 'tomcat6', and run tomcat as that user.  You'll
>> want to change ownership of $CATALINA_HOME and everything it contains to
>> tomcat6.
>>
>> I think debian puts the pid in $CATALINA_HOME/temp/tomcat6.pid.  I don't
>> know if that breaks the rules for what goes into 'temp' though.
>>
>> You'll also need to make some ownership changes to your system, as
>> appropriate.  E.g., my $CATALINA_HOME/logs
>> directory is actually a symlink to the more standard /var/log/tomcat6,
>> with the latter owned by my tomcat user instead of root.
>>
>> Agile Aspect wrote:
>>    
>>> If you're working as root, then you don't permission to write
>>> into /var/run.
>>>
>>> Add a flag for pid file to write somewhere where you have
>>> permission to write, e.g., /tmp
>>>
>>>       -pidfile /tmp/jsvc.pid
>>>
>>>
>>> kjwchu wrote:
>>>      
>>>> Tomcat 6.0.16 on Linux installation and setup
>>>>
>>>> My Linux version is:(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1
>>>> Fri
>>>> Apr 20 16:25:34 EDT 2007
>>>> The tomcat that I downloaded is 6.0.16
>>>>
>>>> I've installed Tomcat6 on a Linux system per the Tomcat6
>>>> documentation, as
>>>> follows:
>>>>     cd $CATALINA_HOME/bin
>>>>     tar xvfz jsvc.tar.gz
>>>>     cd jsvc-src
>>>>     autoconf
>>>>     ./configure
>>>>     make
>>>>     cp jsvc ..
>>>>     cd ..
>>>>
>>>> I then started Tomcat, per the documentation, as follows:
>>>>     cd $CATALINA_HOME
>>>>     ./bin/jsvc -cp ./bin/bootstrap.jar \
>>>>         -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
>>>>         org.apache.catalina.startup.Bootstrap
>>>>
>>>> The startup fails with the following errors in  the catalina.err
>>>> 30/06/2008 15:19:09 21791 jsvc.exec error: Cannot open PID file
>>>> /var/run/jsvc.pid, PID is 21791
>>>> 30/06/2008 15:19:09 21790 jsvc.exec error: Service exit with a return
>>>> value
>>>> of 255
>>>>
>>>> Can anyone tell me how to work around these errors? Thanks for any
>>>> thoughts.
>>>>
>>>>  
>>>>        
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>>    
>
>  


--
Article. VI. Clause 3 of the constitution of the United States states:

"The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial Officers,
both of the United States and of the several States, shall be bound by
Oath or Affirmation, to support this Constitution; but no religious Test
shall ever be required as a Qualification to any Office or public Trust
under the United States."



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Loading...