LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tomcat6 is inaccessible after the install ? (http://www.linuxquestions.org/questions/linux-newbie-8/tomcat6-is-inaccessible-after-the-install-843832/)

albertwt 11-12-2010 03:01 AM

Tomcat6 is inaccessible after the install ?
 
Hi Everyone,

Any idea why i can't access the Tomcat6 default website after i do the install ?

Code:

ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://10.2.3.189/

The following error was encountered:
Connection to 10.2.3.189 Failed
The system returned:
    (111) Connection refused

Code:

Setting up authbind (1.2.0build3) ...

root@SSV:~# /etc/init.d/tomcat6 restart
 * Stopping Tomcat servlet engine tomcat6                          [ OK ]
 * Starting Tomcat servlet engine tomcat6      Using CATALINA_BASE:  /var/lib/tomcat6
Using CATALINA_HOME:  /usr/share/tomcat6
Using CATALINA_TMPDIR: /tmp/tomcat6-tmp
Using JRE_HOME:        /usr/lib/jvm/java-6-sun
Using CLASSPATH:      /usr/share/tomcat6/bin/bootstrap.jar
                                                                    [ OK ]
root@SSV:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:89:1b:30
          inet addr:10.2.3.189  Bcast:10.2.3.255  Mask:255.255.254.0
          inet6 addr: fe80::250:56ff:fe89:1b30/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9034478 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137770 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:262700983 (262.7 MB)  TX bytes:11947055 (11.9 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1344 (1.3 KB)  TX bytes:1344 (1.3 KB)

root@SSV:~# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*              LISTEN      966/sshd
tcp6      0      0 :::8080                :::*                    LISTEN      8231/java
tcp6      0      0 :::22                  :::*                    LISTEN      966/sshd
tcp6      0      0 127.0.0.1:8005          :::*                    LISTEN      8231/java
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          7210/avahi-daemon:
udp        0      0 0.0.0.0:59756          0.0.0.0:*                          7210/avahi-daemon:
udp        0      0 0.0.0.0:68              0.0.0.0:*                          949/dhclient3

root@SSV:~#

any kind of help would be greatly appreciated.

Thanks,

Albert

bathory 11-12-2010 03:15 AM

Quote:

While trying to retrieve the URL: http://10.2.3.189/
Are you sure tomcat is listening on port 80 and not on the default 8080?
Try: http://10.2.3.189:8080 and see if it works

Regards

albertwt 11-12-2010 03:16 AM

thanks man, port 8080 is fine i can see the It works! message.
but how to make it run on port 80 ?

bathory 11-12-2010 03:27 AM

You should open server.xml, after making a backup first, look for "Connector port="8080" protocol="HTTP/1.1" and change it to be
Code:

Connector port="80" protocol="HTTP/1.1"
Then restart tomcat.

Are you sure you're running tomcat? Because the "It Works" message is the default page for apache, while the tomcat default shows much more info.

albertwt 11-12-2010 03:42 AM

thanks man that is just what i need it :-)

here's what I can see:

Quote:

It works !

If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!

This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html

Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6, following the rules from /usr/share/doc/tomcat6-common/RUNNING.txt.gz.

You might consider installing the following packages, if you haven't already done so:

tomcat6-docs: This package installs a web application that allows to browse the Tomcat 6 documentation locally. Once installed, you can access it by clicking here.

tomcat6-examples: This package installs a web application that allows to access the Tomcat 6 Servlet and JSP examples. Once installed, you can access it by clicking here.

tomcat6-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

NOTE: For security reasons, using the manager webapp is restricted to users with role "manager". The host-manager webapp is restricted to users with role "admin". Users are defined in /etc/tomcat6/tomcat-users.xml.

bathory 11-12-2010 03:45 AM

Cool!!

You can mark the thread "Solved" using the "Thread Tools" on top of the page.

Regards


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