Доброго времени суток Всем! Есть PACS - dcm4chee. Для управления этим сервисом составил такой unit файл для systemd:
[root@dcm4chee system]# cat ./dcm4chee.service
[Unit]
Description=DICOM server daemon
After=network.target mariadb.service iscsi.service
[Service]
ExecStart=/opt/dcm4chee-2.17.3-mysql/bin/dcm4chee_init_redhat.sh start
ExecReload=/opt/dcm4chee-2.17.3-mysql/bin/dcm4chee_init_redhat.sh restart
ExecStop=/opt/dcm4chee-2.17.3-mysql/bin/dcm4chee_init_redhat.sh stop
KillMode=control-group
[Install]
WantedBy=multi-user.target
[root@dcm4chee ~]# systemctl status dcm4chee
dcm4chee.service - DICOM server daemon
Loaded: loaded (/usr/lib/systemd/system/dcm4chee.service; enabled)
Active: failed (Result: exit-code) since Thu 2015-04-23 11:26:18 NOVT; 1 weeks 6 days ago
Process: 2468 ExecStop=/opt/dcm4chee-2.17.3-mysql/bin/dcm4chee_init_redhat.sh stop (code=exited, status=1/FAILURE)
Process: 2450 ExecStart=/opt/dcm4chee-2.17.3-mysql/bin/dcm4chee_init_redhat.sh start (code=exited, status=0/SUCCESS)
Main PID: 2450 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/dcm4chee.service
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at java.net.Socket.connect(Socket.java:529)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at java.net.Socket.connect(Socket.java:478)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at java.net.Socket.<init>(Socket.java:375)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at java.net.Socket.<init>(Socket.java:276)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru dcm4chee_init_redhat.sh[2468]: ... 5 more
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru systemd[1]: dcm4chee.service: control process exited, code=exited status=1
Apr 23 11:26:18 dcm4chee.corp.zdravalt.ru systemd[1]: Unit dcm4chee.service entered failed state.
В скрипте /opt/dcm4chee-2.17.3-mysql/bin/dcm4chee_init_redhat.sh кроме задания переменных окружения выполняется запуск java программы через ещё один скрипт.
Проблема в том что при просмотре статуса сервиса systemctl status dcm4chee, статус отображается не верно и выключить командой systemctl stop dcm4chee не получается.
Подскажите в чём проблема.