Al ejecutar service apache start, veo en el archivo de registro esta entrada:
[mpm_event:notice] [pid 1906:tid XXX] AH00489: Apache/2.4.23 (Unix)
OpenSSL/1.0.2g PHP/7.0.9 configured -- resuming normal operations
[core:notice] [pid 1906:tid XXX] AH00094: Command line: '/usr/sbin/httpd'
[mpm_event:notice] [pid 1906:tid XXX] AH00492: caught SIGWINCH, shutting down gracefully
y el servicio apacheno comienza? Puedo encontrar en Internet lo que SIGWINCHsignifica [ Window size change] pero en este caso no me ayuda mucho.
El archivo /etc/systemd/system/apache.service:
[Unit]
Description=The Apache Webserver [FaF Compiled]
After=network.target nss-lookup.target time-sync.target
[email protected] plymouth-quit.service xdm.service
[Service]
Type=notify
PrivateTmp=true
ExecStart=/usr/sbin/httpd -k start
ExecReload=/usr/sbin/httpd -k graceful
ExecStop=/usr/sbin/httpd -k graceful-stop
KillMode=mixed
[Install]
WantedBy=multi-user.target
Alias=httpd.service apache.service
Ejecutando en SLES 12 SP1. He compilado Apache por mi cuenta. Comenzarlo apachectl -k startfunciona perfectamente y puedo acceder y ejecutar el código PHP.
Mi pregunta:
¿Qué estoy haciendo mal para que el apacheservicio no se inicie? Lo he habilitado con systemctl enable apache. Este fue el resultado:
ln -s '/usr/lib/systemd/system/apache2.service' '/etc/systemd/system/httpd.service'
ln -s '/usr/lib/systemd/system/apache2.service' '/etc/systemd/system/apache.service'
ln -s '/usr/lib/systemd/system/apache2.service' '/etc/systemd/system/multi-user.target.wants/apache2.service'

SIGWINCHhicieron fatales? La acción predeterminada es descartar la señal.Respuestas:
systemdle indica a Apache que se detengagraceful-stop, lo que genera unaSIGWINCHseñal y, por lo tanto, el registrocaught SIGWINCH, shutting down gracefully. (laSIGWINCHseñal es (ab) utilizada por Apache)En mi opinión, existe la posibilidad de otro error, incluidos los errores de configuración, lo que hace que se detenga, y está viendo síntomas relacionados que son un comportamiento normal.
Recomendaría leer detenidamente los registros de errores de Apache, generalmente de forma predeterminada en SLES en el directorio
/var/log/apache2.fuente
Encontré un problema similar informado en RedHat . Cerrado con un estado "NOTABUG". Finalmente reconocido como configuración incorrecta.
img # 1
img # 2
img # 3
ACTUALIZAR
Encontré un problema similar más reportado en serverfault . Y uno más en la respuesta, en la imagen a continuación.
img 1/1
fuente
-DFOREGROUNDNo ayuda en mi caso. Apache comienza pero no regresaservicey, por lo tanto, seservicequeja conapache2.service start operation timed out. Terminating.ExecReload=partir de/usr/lib/systemd/system/apache2.serviceese momentoSIGWINCHno se envía, pero Apache no se inicia; no hay ningún mensaje de error en el registro, nada. Simplemente se cierra inmediatamente cuando se ha iniciado. Implementé ahora el truco que ejecutoapachectl -k startcomo un trabajo cron cuando se inicia el sistema. Puedo reiniciar Apache conapachectl -k restart. Voy a intentarlo más tarde; Puede ser que tenga algunas ideas nuevas.De un comentario sobre el informe de error de Red Hat vinculado a la respuesta de Tomasz :
Ejecuté esto y funcionó:
Estoy en Amazon Linux 2 (probablemente también funcionará en RHEL / Centos 7).
fuente