LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 12-19-2010, 08:47 AM   #1
linuxwhacko
Member
 
Registered: Dec 2010
Posts: 61

Rep: Reputation: 0
cannot run tomcat apache 5.5 on fedora 14


i have changed the permissions of tomcat folder
stiill
firstly,i did this

[whacko@localhost local]$ /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.6.0_23/bin/java
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
[whacko@localhost local]$


i put the address localhost in the browser, and got the following error

Forbidden

You don't have permission to access / on this server.
Apache/2.2.17 (Fedora) Server at localhost Port 80



then,i tried to shutdown the service and this is what happened
-----------------------------------------------------------------
[whacko@localhost local]$ /usr/local/tomcat/bin/shutdown.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.6.0_23/bin/java
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
/usr/local/tomcat/bin/catalina.sh: line 330: /usr/java/jdk1.6.0_23/bin/java/bin/java: Not a directory


-------------------------------------------------------------
i think the service didn't started ..

please help
 
Old 12-19-2010, 09:06 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi and welcome to LQ,
Quote:
i put the address localhost in the browser, and got the following error

Forbidden

You don't have permission to access / on this server.
Apache/2.2.17 (Fedora) Server at localhost Port 80
The above means that you used the default port 80 in the address, that is the port where apache is listening. To check if tomcat works you should use http://localhost:8080

Regards
 
Old 12-19-2010, 11:09 AM   #3
linuxwhacko
Member
 
Registered: Dec 2010
Posts: 61

Original Poster
Rep: Reputation: 0
i tried http://localhost:8080
and got
Unable to connect

i even disables the firewall
 
Old 12-19-2010, 11:22 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
To check if tomcat is running and the port it's listening on, you can run:
Code:
ps -ef|grep tomcat
netstat -tanpl|grep java
If it doesn't work, take a look at /usr/local/tomcat/logs/catalina.out to find the reason

Regards
 
Old 12-20-2010, 12:21 AM   #5
linuxwhacko
Member
 
Registered: Dec 2010
Posts: 61

Original Poster
Rep: Reputation: 0
ps shows the following
[root@localhost whacko]# ps -ef|grep tomcat
root 2395 2239 0 23:38 pts/0 00:00:00 grep --color=auto tomcat

while
netstat -tanpl|grep java

didn't show anything in the terminal

catalina.out contained the follwing:
/usr/local/tomcat/bin/catalina.sh: line 308: /usr/java/jdk1.6.0_23/bin/java/bin/java: Not a directory


i opened the file catalina.sh and at line number 308,there was

$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \

now what to do ?
help

Last edited by linuxwhacko; 12-20-2010 at 12:23 AM. Reason: update query
 
Old 12-20-2010, 03:01 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

How did you installed java? Because the path to the java binary is not correct.
You can use:
Code:
export JAVA_HOME=/usr/java/jdk1.6.0_23
before running the tomcat startup script

Regards
 
Old 12-20-2010, 03:23 AM   #7
linuxwhacko
Member
 
Registered: Dec 2010
Posts: 61

Original Poster
Rep: Reputation: 0
tomcat started properly after using

export JAVA_HOME=/usr/java/jdk1.6.0_23

but i have to export it everytime i log in to start tomcat


what shall i do ?

Last edited by linuxwhacko; 12-20-2010 at 03:45 AM. Reason: update
 
Old 12-20-2010, 03:28 AM   #8
linuxwhacko
Member
 
Registered: Dec 2010
Posts: 61

Original Poster
Rep: Reputation: 0
Apache2 not running on Fedora 14

a).when i log in as whacko,

[whacko@localhost ~]$ /etc/init.d/httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]


b).when i log in as root

[root@localhost whacko]# /etc/init.d/httpd start
Starting httpd:
[root@localhost ]#

then, i opened the broswer,typed localhost in the address bar and got :


Forbidden

You don't have permission to access / on this server.
Apache/2.2.17 (Fedora) Server at localhost Port 80

Last edited by linuxwhacko; 12-20-2010 at 03:29 AM. Reason: update
 
Old 12-20-2010, 03:43 AM   #9
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, PCLinuxOS
Posts: 132

Rep: Reputation: 5
I think some other services is using Port 80 on your F14. Try to find and stop service that Open the port.
 
Old 12-20-2010, 03:49 AM   #10
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,183

Rep: Reputation: 113Reputation: 113
Makesure whether the httpd running or not
Quote:
ps -ax | grep http
Quote:
netstat -pnl | grep http
If not running, check httpd_error.log or message log for any suspected entries
 
Old 12-20-2010, 04:12 AM   #11
linuxwhacko
Member
 
Registered: Dec 2010
Posts: 61

Original Poster
Rep: Reputation: 0
thanks for reply kaushalpatel1982
i am newbie to linux
so,please refer me a link where can i learn
on HOW to find and stop service that Open the port

-----------------------------------------------------

thanks kirukan for the reply

ps -ax | grep http

showed

Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
2311 pts/0 S+ 0:00 grep --color=auto http
 
Old 12-20-2010, 04:46 AM   #12
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
Normal users can't start or stop httpd.
The browser error is because you don't have an index page in the document root.
 
Old 12-20-2010, 07:06 AM   #13
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,183

Rep: Reputation: 113Reputation: 113
Quote:
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
2311 pts/0 S+ 0:00 grep --color=auto http
It's refer Apache still not start and running, there are no apache process( bad syntax because of "-")

Last edited by kirukan; 12-20-2010 at 07:08 AM.
 
Old 12-20-2010, 08:31 AM   #14
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,165
Blog Entries: 4

Rep: Reputation: 426Reputation: 426Reputation: 426Reputation: 426Reputation: 426
As your two threads deal with the same questions, I have merged them.
 
Old 12-20-2010, 08:49 AM   #15
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,774

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by linuxwhacko View Post
tomcat started properly after using

export JAVA_HOME=/usr/java/jdk1.6.0_23

but i have to export it everytime i log in to start tomcat


what shall i do ?
You can edit /usr/local/tomcat/bin/catalina.sh and add
Code:
JAVA_HOME=/usr/java/jdk1.6.0_23
Regarding the problem with the httpd service, you must be root in order to start/stop this service
About the "Forbidden" error, could be that you don't have an index page as others have pointed out, or the DocumentRoot directory (default is /var/www/html) permissions are wrong. What gives:
Code:
ls -ld /var/www/html
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting Tomcat to run on boot in Fedora 4 bascule Linux - Newbie 2 02-07-2006 11:57 AM
Unable to run Tomcat 5.5.9 on Fedora core 4 tech_j Linux - Software 2 09-04-2005 09:17 AM
Run tomcat on a local machine through apache indika Linux - Software 0 01-11-2005 02:48 AM
user under which apache tomcat run?? Sridhar Guntur Linux - Security 2 08-28-2003 01:06 PM
how can i run my helloworld servlet in apache-tomcat-mod_jk? doublefailure Linux - Software 1 04-28-2003 08:33 AM


All times are GMT -5. The time now is 02:49 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration