0

I am new to linux. I have set up my VPS with Ubuntu 12.04 LTS 32 bit. I have successfully installed Tomcat and successfully started it with /usr/share/apache-tomcat-7.0.34/bin/catalina.sh run.

But when I try to access the default tomcat page with [MyServerIP]:8080, It is unable to connect. Am I doing something wrong?

UPDATE

I did a restart and this is all I have in the log.

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 739 ms
Jan 02, 2013 8:59:53 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 02, 2013 8:59:53 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/ROOT
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/docs
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-     7.0.34/webapps/examples
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/host- manager
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.34/webapps/manager
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 02, 2013 8:59:53 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 02, 2013 8:59:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 870 ms 

Looks like it never connects

8
  • Yes, you are doing something wrong, otherwise it would work. :) But please tell us about the error you got, any logfile entries you might see and anything else that could help.
    – Sven
    Jan 2, 2013 at 15:00
  • @Shazinltc: I think its your firewall. Stop the firewall on the ubuntu machine and try again. Or provide some more details along with what error on webpage you are getting.
    – Pratap
    Jan 2, 2013 at 15:02
  • This might not be related to your problem, but I think it is better to start tomcat using /etc/init.d/tomcat7 start or service tomcat7 start.
    – Khaled
    Jan 2, 2013 at 15:11
  • @SvenW: Nothing other than 'could not connect to the page'. Is there any other logs that I can check apart from the Tomcat logs?
    – shazinltc
    Jan 2, 2013 at 15:35
  • @PratapSingh: I have tried by disabling the firewall, but still doesn't work. (I guess sudo ufw disable is the right command)
    – shazinltc
    Jan 2, 2013 at 15:40

1 Answer 1

1

Thanks PratapSingh and Eric DANNIELOU. You guys were right. It was a firewall problem. Port 8080 was blocked. Added this line : -A INPUT -p tcp --dport 8080 -j ACCEPT. Now its working fine. Thank you again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .