LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2014, 12:36 AM   #1
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Rep: Reputation: Disabled
Cannot start Apache Tomcat as a non-root user.


I manually started Apache Tomcat 6 via the command $CATALINA_HOME/bin/startup.sh and this is the result -

Code:
    Using CATALINA_BASE: /home/getx/Desktop/apache-tomcat-6.0.37
    Using CATALINA_HOME: /home/getx/Desktop/apache-tomcat-6.0.37
    Using CATALINA_TMPDIR: /home/getx/Desktop/apache-tomcat-6.0.37/temp
    Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
    Using CLASSPATH: /home/getx/Desktop/apache-tomcat-6.0.37/bin/bootstrap.jar
However, when I enter localhost:8080 in Firefox, nothing shows up.

It works when I run the command via sudo .

So I guessed it must be due to a permissions problem.

These are my permissions for my current user -

Code:
drwxr-xr-x 2 getx getx 4096 Jan 18 12:50 bin 
drwxr-xr-x 3 getx getx 4096 Jan 21 21:08 conf 
drwxr-xr-x 2 getx getx 4096 Jan 18 12:50 lib 
-rw-r--r-- 1 getx getx 37951 Apr 29 2013 LICENSE 
drwxr-xr-x 2 getx getx 4096 Jan 21 21:08 logs 
-rw-r--r-- 1 getx getx 558 Apr 29 2013 NOTICE 
-rw-r--r-- 1 getx getx 9188 Apr 29 2013 RELEASE-NOTES 
-rw-r--r-- 1 getx getx 16287 Apr 29 2013 RUNNING.txt 
drwxr-xr-x 2 getx getx 4096 Jan 18 12:50 temp 
drwxr-xr-x 7 getx getx 4096 Apr 29 2013 webapps 
drwxr-xr-x 3 getx getx 4096 Jan 21 21:08 work
Any help is appreciated
 
Old 01-22-2014, 01:42 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,526

Rep: Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503Reputation: 1503
Hi,

From a terminal try to start tomcat as the user getx and from another terminal watch the logs using tail, to see what's happening:
Code:
tail -f home/getx/Desktop/apache-tomcat-6.0.37/logs/catalina.out
Regards
 
1 members found this post helpful.
Old 01-22-2014, 02:41 AM   #3
Grtyop
Member
 
Registered: May 2013
Location: Over the Rainbow..
Distribution: LinuxMint , RedHat
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

From a terminal try to start tomcat as the user getx and from another terminal watch the logs using tail, to see what's happening:
Code:
tail -f home/getx/Desktop/apache-tomcat-6.0.37/logs/catalina.out
Regards
This is the new line that got written to the logs.

Code:
/home/getx/Desktop/apache-tomcat-6.0.37/bin/catalina.sh: 373: /home/getx/Desktop/apache-tomcat-6.0.37/bin/catalina.sh: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin//bin/java: not found
Gahh I know the reason now.. Mysteriously OpenJDK adds its own /bin/java ... I removed my own /bin/java and it works.

Thanks for the idea of reading live tail logs
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I run Apache and Tomcat as root? riahc3 Linux - Server 1 09-24-2012 04:28 AM
How to automaticall start apache-tomcat-6.0.20 ytd Linux - General 2 04-27-2010 01:11 AM
Start Tomcat before Apache on boot Swakoo Linux - Server 3 04-10-2007 03:25 AM
How to start Apache and Tomcat with Linux boot montejr Linux - Newbie 2 04-23-2004 03:03 PM
normal user can't start tomcat? help!!!! dutao Linux - Software 0 07-24-2003 09:42 PM


All times are GMT -5. The time now is 11:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration