Tomcat 7 on Ubuntu 12.04 with JRE 7 not starting

Posted by Andreas Krueger on Server Fault See other posts from Server Fault or by Andreas Krueger
Published on 2012-11-17T18:12:14Z Indexed on 2012/11/18 17:04 UTC
Read the original article Hit count: 278

Filed under:
|
|

I am running a virtual server in the web on Ubuntu 12.04 LTS / 32 Bit.

After a clean install of JRE 7 and Tomcat 7, following the instructions on http://www.sysadminslife.com, I don't get Tomcat 7 up and running.

> java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode)
> /etc/init.d/tomcat start
Starting Tomcat
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-7-oracle
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
> telnet localhost 8080
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

netstat sometimes shows a Java process, most of the times not. If it does, nothing works either.

Does anyone have a solution or encountered similar situations?

Here are the contents of catalina.out:

16.11.2012 18:36:39 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-oracle/lib/i386/client:/usr/lib/jvm/java-6-oracle/lib/i386:/usr/lib/jvm/java-6-oracle/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
16.11.2012 18:36:40 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
16.11.2012 18:36:40 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
16.11.2012 18:36:40 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1509 ms
16.11.2012 18:36:40 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
16.11.2012 18:36:40 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
16.11.2012 18:36:40 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/tomcat/webapps/manager

Here come the results of ps -ef, iptables --list and netstat -plut:

> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Nov16 ?        00:00:00 init
root         2     1  0 Nov16 ?        00:00:00 [kthreadd/206616]
root         3     2  0 Nov16 ?        00:00:00 [khelper/2066167]
root         4     2  0 Nov16 ?        00:00:00 [rpciod/2066167/]
root         5     2  0 Nov16 ?        00:00:00 [rpciod/2066167/]
root         6     2  0 Nov16 ?        00:00:00 [rpciod/2066167/]
root         7     2  0 Nov16 ?        00:00:00 [rpciod/2066167/]
root         8     2  0 Nov16 ?        00:00:00 [nfsiod/2066167]
root       119     1  0 Nov16 ?        00:00:00 upstart-udev-bridge --daemon
root       125     1  0 Nov16 ?        00:00:00 /sbin/udevd --daemon
root       157   125  0 Nov16 ?        00:00:00 /sbin/udevd --daemon
root       158   125  0 Nov16 ?        00:00:00 /sbin/udevd --daemon
root       205     1  0 Nov16 ?        00:00:00 upstart-socket-bridge --daemon
root       276     1  0 Nov16 ?        00:00:00 /usr/sbin/sshd -D
root       335     1  0 Nov16 ?        00:00:00 /usr/sbin/xinetd -dontfork -pidfile /var/run/xinetd.pid -stayalive -inetd
root       348     1  0 Nov16 ?        00:00:00 cron
syslog     368     1  0 Nov16 ?        00:00:00 /sbin/syslogd -u syslog
root       472     1  0 Nov16 ?        00:00:00 /usr/lib/postfix/master
postfix    482   472  0 Nov16 ?        00:00:00 qmgr -l -t fifo -u
root       520     1  0 Nov16 ?        00:00:04 /usr/sbin/apache2 -k start
www-data   523   520  0 Nov16 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   525   520  0 Nov16 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   526   520  0 Nov16 ?        00:00:00 /usr/sbin/apache2 -k start
tomcat    1074     1  0 Nov16 ?        00:01:08 /usr/lib/jvm/java-6-oracle/bin/java -Djava.util.logging.config.file=/usr/
postfix   1351   472  0 Nov16 ?        00:00:00 tlsmgr -l -t unix -u -c
postfix   3413   472  0 17:00 ?        00:00:00 pickup -l -t fifo -u -c
root      3457   276  0 17:31 ?        00:00:00 sshd: root@pts/0
root      3459  3457  0 17:31 pts/0    00:00:00 -bash
root      3470  3459  0 17:31 pts/0    00:00:00 ps -ef

> iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http-alt
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8005
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http-alt

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

> netstat -plut
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:smtp                  *:*                     LISTEN      472/master
tcp        0      0 *:3213                  *:*                     LISTEN      276/sshd
tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      472/master
tcp6       0      0 [::]:8009               [::]:*                  LISTEN      1074/java
tcp6       0      0 [::]:3213               [::]:*                  LISTEN      276/sshd
tcp6       0      0 [::]:http-alt           [::]:*                  LISTEN      1074/java
tcp6       0      0 [::]:http               [::]:*                  LISTEN      520/apache2

© Server Fault or respective owner

Related posts about linux

Related posts about tomcat