LinuxQuestions.org
Visit Jeremy's Blog.
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 03-07-2009, 01:13 PM   #1
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Rep: Reputation: 15
Question Firefox can't establish a connection to the server at localhost:8080


Hi,


I installed j2sdk1.4.2_03 and xampp-linux-1.6.8a on RHEL5. Since I could'nt run a jsp script on the server, I suppose xampp does not support jsp. So I installed apache-tomcat-6.0.18.

In terminal,

[root@localhost ~]# /etc/apache-tomcat-6.0.18-src/bin/startup.sh
Using CATALINA_BASE: /etc/apache-tomcat-6.0.18-src
Using CATALINA_HOME: /etc/apache-tomcat-6.0.18-src
Using CATALINA_TMPDIR: /etc/apache-tomcat-6.0.18-src/temp
Using JRE_HOME: /usr/java/jdk1.6.0_11

makes me think tomcat has been installed correctly.

But when I try accessing http://localhost:8080/



Unable to connect

Firefox can't establish a connection to the server at localhost:8080.
* The site could be temporarily unavailable or too busy. Try again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.




Can anyone tell me how to solve this problem?

Last edited by Ashhere; 03-07-2009 at 01:16 PM.
 
Old 03-07-2009, 02:16 PM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

first you should check if there is something running on Port 8080
Code:
netstat -an | grep 8080
Does the tomcat logfile show errors? It can be found in tomcat installation directory, sub directory log and is called catalina.out.
 
Old 03-07-2009, 11:25 PM   #3
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks for the reply.

netstat -an | grep 8080 returned no results.


and following is the contents of catalina.out

/etc/apache-tomcat-6.0.18-src/bin/catalina.sh: line 292: /usr/java/jdk1.6.0_11/bin/java: No such file or directory

I suppose this is the problem.
my JAVA_HOME is usr/java/j2sdk1.4.2_03/bin/java

What should I do now?
 
Old 03-08-2009, 12:19 AM   #4
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

i agree. Your tomcat is looking for JDK 1.6.0.11 which seems not to exist. Check the startup script and install correct jdk.
 
Old 03-14-2009, 02:17 AM   #5
Ashhere
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Original Poster
Rep: Reputation: 15
I installed jdk1.6.0_11 and now the problem is

Quote:
root@ash-laptop:~# /var/lib/apache-tomcat-6.0.18-src/bin/version.sh
Using CATALINA_BASE: /var/lib/apache-tomcat-6.0.18-src
Using CATALINA_HOME: /var/lib/apache-tomcat-6.0.18-src
Using CATALINA_TMPDIR: /var/lib/apache-tomcat-6.0.18-src/temp
Using JRE_HOME: /usr/java/jdk1.6.0_11
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/util/ServerInfo
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.util.ServerInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: org.apache.catalina.util.ServerInfo. Program will exit.
root@ash-laptop:~#

and when

Quote:
root@ash-laptop:~# /var/lib/apache-tomcat-6.0.18-src/bin/startup.sh
Using CATALINA_BASE: /var/lib/apache-tomcat-6.0.18-src
Using CATALINA_HOME: /var/lib/apache-tomcat-6.0.18-src
Using CATALINA_TMPDIR: /var/lib/apache-tomcat-6.0.18-src/temp
Using JRE_HOME: /usr/java/jdk1.6.0_11
root@ash-laptop:~#
But when I try http://localhost:8080/

Though the site seems valid, the browser was unable to establish a connection.
  • Could the site be temporarily unavailable? Try again later.
  • Are you unable to browse other sites? Check the computer's network connection.
  • Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.


What now??

Last edited by Ashhere; 03-14-2009 at 02:45 AM.
 
Old 08-03-2010, 08:03 PM   #6
mullachv
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Rep: Reputation: 0
Tomcat not running

Your issue is that tomcat does not even startup or run, since you do not see any listeners when you searched for port 8080:

#netstat -an | grep 8080

The reason your tomcat is not running is that you are attempting the startup script from the source folder as opposed to the *built* folder.

Set the CATALINA_HOME and _BASE to
/var/lib/apache-tomcat-6.0.18-src/output/build/
And run the file ./bin/startup.sh

You should be fine then
 
  


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
access 8080 web server port through squid running on 8080 sunethj Linux - Networking 11 05-18-2007 03:38 AM
Client / Server program cannot establish socket connection tliggins Linux - Networking 2 06-19-2006 11:51 AM
Can't connect to localhost:8080 mkalalms Linux - Newbie 10 05-24-2006 10:40 AM
connection refused when attempting localhost:8080 mkalalms Linux - Newbie 3 05-22-2006 04:50 AM
Tomcat: Refused localhost:8080 manudath Linux - Software 1 03-31-2005 04:32 AM


All times are GMT -5. The time now is 08:09 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