Запустите Tomcat 9 при ошибке Ubuntu 18

Я пытаюсь установить apache-tomcat-9.0.33 на 64-битный компьютер с Ubuntu 18.04.4 LTS. Я следовал сценарию, приведенному на https://linuxize.com/post/how-to-install-tomcat-9-on-ubuntu-18-04/ . Все шло хорошо до конца шага 4. Когда я попытался запустить tomcat, я получил следующее:

~$ sudo systemctl start tomcat
Job for tomcat.service failed because the control process exited with error code.
See "systemctl status tomcat.service" and "journalctl -xe" for details.

Вывод этих команд подсказал мне, что проблема была вызвана неправильными разрешениями.

Я выполнил все следующие предложения:

Невозможно запустить Apache Tomcat 8.5.4 в Ubuntu 16.04

Теперь разрешения для каждого файла .sh в / opt / tomcat / bin / установлены на " -rwxr-xr-x ", и каждый файл в этом каталоге имеет" tomcat "как владелец и как группу. Кроме того, каждый каталог в пути / opt / tomcat / bin / имеет разрешения «drwxr-xr-x» и «tomcat» как владелец и как группа.

Я проверил, что значение для JAVA_HOME, указанное в /etc/systemd/system/tomcat.service, такое же, как указанное в printenv JAVA_HOME.

Пуск по-прежнему не удался.

Я перезагрузил компьютер, проверил, нет ли устаревшего pid, попытался снова, и запуск не удался:

~$ ps ax | grep tomcat
 4795 tty2     Sl+    0:16 gedit /home/coffeepot/Desktop/tomcat fail 1.txt
 5379 pts/0    S+     0:00 grep --color=auto tomcat

~$ sudo systemctl start tomcat
Job for tomcat.service failed because the control process exited with error code.
See "systemctl status tomcat.service" and "journalctl -xe" for details.

sudo systemctl status tomcat
● tomcat.service - Apache Tomcat Web Application Container
   Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-04-21 09:58:12 EDT; 15s ago
  Process: 5233 ExecStart=/opt/tomcat/latest/bin/startup.sh (code=exited, status=0/SUCCESS)
 Main PID: 5243 (code=exited, status=2)

Apr 21 09:58:12 m11 systemd[1]: Starting Apache Tomcat Web Application Container...
Apr 21 09:58:12 m11 startup.sh[5233]: Existing PID file found during start.
Apr 21 09:58:12 m11 startup.sh[5233]: Removing/clearing stale PID file.
Apr 21 09:58:12 m11 startup.sh[5233]: Tomcat started.
Apr 21 09:58:12 m11 systemd[1]: Started Apache Tomcat Web Application Container.
Apr 21 09:58:12 m11 systemd[1]: tomcat.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 21 09:58:12 m11 systemd[1]: tomcat.service: Failed with result 'exit-code'.

journalctl -xe
-- 
-- The result is RESULT.
Apr 21 09:58:11 m11 systemd[1]: Dependency failed for /mnt/28db1409-5a51-40d2-84ad-3b4496c805ec.
-- Subject: Unit mnt-28db1409\x2d5a51\x2d40d2\x2d84ad\x2d3b4496c805ec.mount has failed
-- Defined-By: systemd
-- Support: 
-- 
-- Unit mnt-28db1409\x2d5a51\x2d40d2\x2d84ad\x2d3b4496c805ec.mount has failed.
-- 
-- The result is RESULT.
Apr 21 09:58:11 m11 systemd[1]: mnt-28db1409\x2d5a51\x2d40d2\x2d84ad\x2d3b4496c805ec.mount: Job mnt-28db1409\x2d5a51\x2d40d2\x2d84ad\x2d3b4496c805ec.mount/start failed with result 'dependency'.
Apr 21 09:58:11 m11 systemd[1]: dev-disk-by\x2duuid-28db1409\x2d5a51\x2d40d2\x2d84ad\x2d3b4496c805ec.device: Job dev-disk-by\x2duuid-28db1409\x2d5a51\x2d40d2\x2d84ad\x2d3b4496c805ec.device/start failed with
Apr 21 09:58:12 m11 sudo[5230]: coffeepot : TTY=pts/0 ; PWD=/home/coffeepot ; USER=root ; COMMAND=/bin/systemctl start tomcat
Apr 21 09:58:12 m11 sudo[5230]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 21 09:58:12 m11 systemd[1]: Starting Apache Tomcat Web Application Container...
-- Subject: Unit tomcat.service has begun start-up
-- Defined-By: systemd
-- Support: 
-- 
-- Unit tomcat.service has begun starting up.
Apr 21 09:58:12 m11 startup.sh[5233]: Existing PID file found during start.
Apr 21 09:58:12 m11 startup.sh[5233]: Removing/clearing stale PID file.
Apr 21 09:58:12 m11 startup.sh[5233]: Tomcat started.
Apr 21 09:58:12 m11 systemd[1]: Started Apache Tomcat Web Application Container.
-- Subject: Unit tomcat.service has finished start-up
-- Defined-By: systemd
-- Support: 
-- 
-- Unit tomcat.service has finished starting up.
-- 
-- The start-up result is RESULT.
Apr 21 09:58:12 m11 systemd[1]: tomcat.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 21 09:58:12 m11 systemd[1]: tomcat.service: Failed with result 'exit-code'.
Apr 21 09:58:12 m11 sudo[5230]: pam_unix(sudo:session): session closed for user root
Apr 21 09:58:17 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:17 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:17 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:17 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:18 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:18 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:19 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:19 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:19 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:19 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:19 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:19 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:28 m11 sudo[5245]: coffeepot : TTY=pts/0 ; PWD=/home/coffeepot ; USER=root ; COMMAND=/bin/systemctl status tomcat
Apr 21 09:58:28 m11 sudo[5245]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 21 09:58:28 m11 sudo[5245]: pam_unix(sudo:session): session closed for user root
Apr 21 09:58:43 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:43 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:43 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:43 m11 gnome-shell[4476]: Ignoring excess values in shadow definition
Apr 21 09:58:48 m11 PackageKit[1334]: get-updates transaction /1028_ecebadde from uid 1000 finished with success after 398ms

Что мне не хватает? Как мне заставить работать кота?

0
задан 22 April 2020 в 22:25

1 ответ

Я нашел причину проблемы. Когда я внимательно изучил журнал Catalina, я обнаружил, что добавил дополнительную косую черту к пути в JAVA_HOME, из-за чего Tomcat не смог найти Java.

0
ответ дан 13 May 2020 в 18:11

Другие вопросы по тегам:

Похожие вопросы: