2

I'm running a VirtualBox of a 32-bit version of Ubuntu 14.04. When attempting to run sudo service tomcat7 start I get the following message.

start-stop-daemon: unable to stat /usr/lib/jvm/java-t-openjdk-amd64/jre/bin/java

It then returns saying the server has started.

After running service tomcat7 status I get the following:

Tomcat servlet engine is running with pid

Notice that there is no pid shown, which doesn't make any sense to me.

Regardless, this all ends up in the servlet not actually running when I attempt to navigate to localhost/.

I have no idea why it is looking for 64 bit java on a 32 bit install. I have everything else (to my knowledge) installed properly. I've uninstalled/reinstalled tomcat and java to no avail.

Any help is appreciated.

ZaredH
  • 491
  • 1
  • 7
  • 23
  • maybe there's a lock file somewhere that you need to delete? – ZhongYu May 29 '15 at 16:07
  • Do you get the same problem if you run `startup.sh` from within `tomcat/bin`? – Will May 29 '15 at 16:09
  • Wherever you've installed tomcat. I'm guessing now you've installed from apt? If so run: dpkg -L tomcat-package-name and it will list where it's installed tomcat – Will May 29 '15 at 16:24
  • This is what I get `root@user-VirtualBox:/usr/share/tomcat7/bin# ./startup.sh Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar touch: cannot touch ‘/usr/share/tomcat7/logs/catalina.out’: No such file or directory ./catalina.sh: 385: ./catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent` – ZaredH May 29 '15 at 16:25

1 Answers1

0

check the version of java using java -version. you will get the architecture of java. Make sure that you have installed the 32 bit jre properly. (My recommendation is to use oracle jre instead open jre). Try to download the tomcat from their site as .tar.gz. Extract it somewhere in your system. Locate the startup.sh script ,by default it will be present in bin folder of tomcat, and execute the script.

Hope it helps!!

Shriram
  • 4,343
  • 8
  • 37
  • 64
  • hard to catch for a newbie – Surajeet Bharati May 29 '15 at 16:33
  • I have installed the jre by hand already. What's intriguing to me is that the tomcat script is looking for a 64 bit version. I opened up the script and it seems to be able to handle both 64 and 32 bit versions of java, but obviously something is amiss somewhere. – ZaredH May 29 '15 at 16:33
  • did you set the JRE_HOME variable properly. Check by executing echo $JRE_HOME. Check the version of jre. Because by default linux distributions contain openjre – Shriram May 29 '15 at 16:37
  • JRE_HOME is set correctly, but the error still occurs – ZaredH May 29 '15 at 16:51
  • check the links just i've come across. http://stackoverflow.com/questions/24451047/service-tomcat7-start-fails-but-the-process-exists-and-tomcat-is-running?rq=1 http://stackoverflow.com/questions/25718980/solved-tomcat7-wont-start-up-on-ubuntu-clean-install-permission-denied?rq=1 – Shriram May 29 '15 at 16:55
  • Also check your tomcat logs what is the error while trying to start – Shriram May 29 '15 at 17:01
  • @Shriram The first link is a different scenario from mine. He can get a response from Tomcat using wget, where as I cannot. Also if I run `tomcat7 status` mine returns that it is running, but does not return its pid. However, I can see the process and I know what its pid is. I've also tried installing tomcat manually, to no avail. – ZaredH May 29 '15 at 17:08
  • Interestingly, catalina.out has not updated since install. So I couldn't tell you what it's logging – ZaredH May 29 '15 at 17:13