O serviço em execução no RHEL7.5 não está em execução no RHEL8 (serviço httpd)

O serviço em execução no RHEL7.5 não está em execução no RHEL8 (serviço httpd)

Eu tenho um serviço que estava funcionando bem com o RHEL 7.5, agora atualizei para o RHEL 8 e o mesmo serviço está falhando com o status abaixo:

Service.service - LSB: Web Server
Loaded: loaded (/etc/rc.d/init.d/Service; generated)
Active: failed (Result: protocol) since Mon 2020-04-06 12:02:21 IST; 38min ago
Docs: man:systemd-sysv-generator(8)
Process: 403 ExecStart=/etc/rc.d/init.d/Service start (code=exited, status=0/SUCCESS)

Apr 06 12:02:21 localhost.localdomain systemd[1]: Starting LSB: Web Server...
Apr 06 12:02:21 localhost.localdomain Service[403]: httpd (pid 29434) already running
Apr 06 12:02:21 localhost.localdomain systemd[1]: Service.service: Refusing to accept PID outside of service control group, acquired through unsafe symlink chain:
/usr/local/apache/logs/Service.pid
Apr 06 12:02:21 localhost.localdomain systemd[1]: Service.service: Refusing to accept PID outside of service control group, acquired through unsafe symlink chain:
/usr/local/apache/logs/Service.pid
Apr 06 12:02:21 localhost.localdomain systemd[1]: Service.service: Failed with result 'protocol'.
Apr 06 12:02:21 localhost.localdomain systemd[1]: Failed to start LSB: Web Server

Esta é a minha unidade de serviço colocada em /etc/init.d/Service, o mesmo é feito para o RHEL 7.5, mas esse serviço está funcionando e no RHEL 8 não. Mais uma coisa a ser observada aqui é que o servidor web está funcionando conforme o esperado, embora me dê esse erro.

    #!/bin/sh
#
# chkconfig: 345 97 03
# description:Web Server
# processname: httpd
# config: /usr/local/Test/apache/conf/httpd.conf
# pidfile: /usr/local/Test/apache/logs/httpd.pid

### BEGIN INIT INFO
# Provides: Service
# Required-Start: $remote_fs $network $syslog
# Should-Start:
# Required-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6`enter code here`
# Short-Description: Web Server
# Description: Web Server
### END INIT INFO

LANG=en_US.iso88591
export LANG

BASEDIR=/usr/local/Test/apache
PATH=$BASEDIR/bin:/usr/bin:/bin
export PATH

LD_LIBRARY_PATH=$BASEDIR/lib
export LD_LIBRARY_PATH

inst=/usr/local/Test
MIBDIRS=$inst/mibs
export MIBDIRS

case $1 in
start)
  apachectl start
  ;;
stop)
  apachectl stop
  ;;
restart)
  apachectl restart
  ;;
*)
  echo "usage: $0 { start | stop | restart }"
  ;;
esac

Por favor, me ajude nisso.

Responder1

Se você vir no lançamento do diário:

Refusing to accept PID outside of service control group, acquired through unsafe symlink chain:

A versão do systemd em 7.5 não possui verificações adicionais para verificar se o pid do serviço está fora do cgroup da unidade do systemd.

Se você atualizasse o sistema 7.5 para 7.7 ou posterior, ele também falharia com o mesmo erro.

Você pode ter mais sorte se converter o script de inicialização sysv em uma unidade de serviço real do systemd.

informação relacionada