Erro ao iniciar o tomcat7.service no arch linux

1

O sistema operacional está em execução no Arch Linux x86-64. Estou tentando iniciar tomcat7.service via systemctl start tomcat7.service , mas é exibida uma mensagem de erro:

Job for tomcat7.service failed because the control process exited with error code.
See "systemctl status tomcat7.service" and "journalctl -xe" for details.

Quando executo systemctl status tomcat7.service , mostra esta mensagem:

● tomcat7.service - Tomcat 7 servlet container
   Loaded: loaded (/usr/lib/systemd/system/tomcat7.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2018-04-02 04:28:40 CEST; 2min 40s ago
  Process: 2979 ExecStop=/usr/bin/jsvc -pidfile /var/run/tomcat7.pid -stop org.apache.catalina.startup.Bootstrap (code=exited, status=255)
   Process: 2972 ExecStart=/usr/bin/jsvc -Dcatalina.home=${CATALINA_HOME} -Dcatalina.base=${CATALINA_BASE} -Djava.io.tmpdir=/var/tmp/tomcat7/temp -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.>
 Main PID: 2977

abr 02 04:28:40 carlos-pc systemd[1]: Starting Tomcat 7 servlet container...
abr 02 04:28:40 carlos-pc jsvc[2972]: Cannot find any VM in Java Home /usr/lib/jvm/default-runtime
abr 02 04:28:40 carlos-pc systemd[1]: tomcat7.service: Can't open PID file /var/run/tomcat7.pid (yet?) after start: No such file or directory
abr 02 04:28:40 carlos-pc systemd[1]: tomcat7.service: Supervising process 2977 which is not our child. We'll most likely not notice when it exits.
abr 02 04:28:40 carlos-pc jsvc.exec[2976]: 2018-04-02 04:28:40 2977 jsvc.exec error: Cannot find any VM in Java Home /usr/lib/jvm/default-runtime
                                       2018-04-02 04:28:40 2977 jsvc.exec error: Cannot locate JVM library file
abr 02 04:28:40 carlos-pc systemd[1]: tomcat7.service: Control process exited, code=exited status=255
abr 02 04:28:40 carlos-pc systemd[1]: tomcat7.service: Killing process 2977 (n/a) with signal SIGKILL.
abr 02 04:28:40 carlos-pc systemd[1]: tomcat7.service: Killing process 2977 (n/a) with signal SIGKILL.
abr 02 04:28:40 carlos-pc systemd[1]: tomcat7.service: Failed with result 'exit-code'.
abr 02 04:28:40 carlos-pc systemd[1]: Failed to start Tomcat 7 servlet container.

Se eu fizer o ls /usr/lib/jvm/default-runtime para verificar se tenho um ambiente Java, ele mostrará:

bin  conf  demo  include  jmods  legal  lib  man  release

Portanto, o diretório existe.

O que poderia estar acontecendo? Obrigado

    
por class_OpenGL 02.04.2018 / 04:37

1 resposta

0

Você precisa definir o java-8 ou anterior como sua versão do java padrão para trabalhar com o tomcat no archlinux. Siga o guia do wiki do Arch para obter a versão correta instalada. link

Para isso, execute:

sudo archlinux-java set java-8-openjdk
    
por 06.07.2018 / 21:22