Вернуться назад

Не запускается Apache на CentOS 7 — AH00015: Unable to open logs

Не запускается Apache на CentOS 7 — AH00015: Unable to open logs

Не стартует apache с ошибками:

# service httpd status
Redirecting to /bin/systemctl status httpd.service
* httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-06-01 09:50:28 EDT; 1min 20s ago
Process: 5854 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 5852 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 5852 (code=exited, status=1/FAILURE)
Jun 01 09:50:28 70598 systemd[1]: Starting The Apache HTTP Server...
Jun 01 09:50:28 70598 httpd[5852]: [Wed Jun 01 09:50:28.692165 2016] [so:warn] [pid 5852] AH01574: module ruid2_module is already loaded, skipping
Jun 01 09:50:28 70598 httpd[5852]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 0.1.19.19...s message
Jun 01 09:50:28 70598 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 01 09:50:28 70598 kill[5854]: kill: cannot find process ""
Jun 01 09:50:28 70598 systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 01 09:50:28 70598 systemd[1]: Failed to start The Apache HTTP Server.
Jun 01 09:50:28 70598 systemd[1]: Unit httpd.service entered failed state.
Jun 01 09:50:28 70598 systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

В логах apache можем наблюдать вот такое:

AH00015: Unable to open logs
AH00015: Unable to open logs
AH00015: Unable to open logs
AH00015: Unable to open logs
AH00015: Unable to open logs
AH00015: Unable to open logs
AH00015: Unable to open logs

Данная ошибка означает что для запуска apache через systemd нехватает файловых дескрипторов, поэтому увеличиваем их командами:

# ulimit -n1000000
# mkdir -p /etc/systemd/system/httpd.service.d/
# echo -e "[Service]\nLimitNOFILE=1000000" >> /etc/systemd/system/httpd.service.d/nofile.conf
# systemctl daemon-reload
# systemctl restart httpd.service


igel
Дата: 25 января 2019 г. в 01:08:59

Автор: igel