Tomcat 8 doen´t start on ubuntu 15.04 -- status=127
I always get this message that I can't follow:
sudo systemctl status -l tomcat8.service
● tomcat8.service - LSB: Start Tomcat.
Loaded: loaded (/etc/init.d/tomcat8)
Active: failed (Result: exit-code) since sáb 2015-05-09 00:48:07 CEST; 2h 31min ago
Docs: man:systemd-sysv-generator(8)
Process: 1295 ExecStart=/etc/init.d/tomcat8 start (code=exited, status=127)
may 09 00:48:07 vaio systemd[1]: Starting LSB: Start Tomcat....
may 09 00:48:07 vaio tomcat8[1295]: [58B blob data]
may 09 00:48:07 vaio systemd[1]: tomcat8.service: control process exited, code=exited status=127
may 09 00:48:07 vaio systemd[1]: Failed to start LSB: Start Tomcat..
may 09 00:48:07 vaio systemd[1]: Unit tomcat8.service entered failed state.
may 09 00:48:07 vaio systemd[1]: tomcat8.service failed.
Any idea?
Thank you in advance!!
I had the same error when I upgraded Ubuntu and also Java (8->11). The problem was a wrong JAVA_HOME path inside the systemd module. The JAVA_HOME path had "jre/" at the end which is wrong for newer Java versions. Solution:
- Edit
/etc/systemd/system/tomcat.service
and remove the trailing "jre/" of the JAVA_HOME path. systemctl daemon-reload
systemctl restart tomcat
Value 127 is returned by /bin/sh
when the given command is not found within your PATH
system variable and it is not a built-in shell command. In other words, the system doesn't understand your command, because it doesn't know where to find the binary you're trying to call.
for more info LINK