LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Firefox can't establish a connection to the server at localhost:8080 (https://www.linuxquestions.org/questions/linux-newbie-8/firefox-cant-establish-a-connection-to-the-server-at-localhost-8080-a-709858/)

Ashhere 03-07-2009 12:13 PM

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?

mesiol 03-07-2009 01:16 PM

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.

Ashhere 03-07-2009 10:25 PM

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?

mesiol 03-07-2009 11:19 PM

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.

Ashhere 03-14-2009 01:17 AM

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??:(

mullachv 08-03-2010 07:03 PM

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


All times are GMT -5. The time now is 07:02 PM.