Debian Jessie com falha ao inicializar Apache 2.4.10: "Failed to start LSB: Apache2 web server".

1. Debian Jessie com falha ao inicializar Apache 2.4.10: "Failed to start LSB: Apache2 web server".

priscila
priscilaalvess_

(usa Debian)

Enviado em 02/01/2017 - 12:50h

Olá,

Estou tentando configurar quatro virtualhosts no meu servidor web funcionando com Apache 2.4.10, PHP 5.6.29 e MySQL 5.5.53. Porém, quando tento reiniciar o apache, após ativar as virtualhosts com o comando a2ensite, o apache me retorna o erro "Failed to start LSB: Apache2 web server" e pede que eu execute os comandos 'systemctl status apache2.service' e 'journalctl -xn'.

____________________________________________
Saída do 'systemctl status apache2.service':
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
└─forking.conf
Active: failed (Result: exit-code) since Seg 2017-01-02 10:30:49 BRT; 55s ago
Process: 4933 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jan 02 10:30:49 venus apache2[4933]: Starting web server: apache2 failed!
Jan 02 10:30:49 venus apache2[4933]: The apache2 configtest failed. ... (warning).
Jan 02 10:30:49 venus apache2[4933]: Output of config test was:
Jan 02 10:30:49 venus apache2[4933]: AH00534: apache2: Configuration error: No...d.
Jan 02 10:30:49 venus apache2[4933]: Action 'configtest' failed.
Jan 02 10:30:49 venus apache2[4933]: The Apache error log may have more inform...n.
Jan 02 10:30:49 venus systemd[1]: apache2.service: control process exited, cod...=1
Jan 02 10:30:49 venus systemd[1]: Failed to start LSB: Apache2 web server.
Jan 02 10:30:49 venus systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
____________________________________________
Saída do 'journalctl -xn':
-- Logs begin at Seg 2017-01-02 07:41:09 BRT, end at Seg 2017-01-02 10:30:49 BRT. -
Jan 02 10:30:49 venus systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Jan 02 10:30:49 venus apache2[4933]: Starting web server: apache2 failed!
Jan 02 10:30:49 venus apache2[4933]: The apache2 configtest failed. ... (warning).
Jan 02 10:30:49 venus apache2[4933]: Output of config test was:
Jan 02 10:30:49 venus apache2[4933]: AH00534: apache2: Configuration error: No MPM
Jan 02 10:30:49 venus apache2[4933]: Action 'configtest' failed.
Jan 02 10:30:49 venus apache2[4933]: The Apache error log may have more information
Jan 02 10:30:49 venus systemd[1]: apache2.service: control process exited, code=exi
Jan 02 10:30:49 venus systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Jan 02 10:30:49 venus systemd[1]: Unit apache2.service entered failed state.
____________________________________________
Configuração do Virtualhost:

# DMA
<VirtualHost *:80>
ServerAdmin root@local
ServerName dma.local
ServerAlias www.dma.local
DocumentRoot "/var/www/html/dma.local/public_html/"
ErrorLog /var/www/html.dma.local/logs/error.log
CustomLog /var/www/html.dma.local/logs/error.log combined
</VirtualHost>
# Bootstrap
<VirtualHost *:80>
ServerAdmin root@local
ServerName bootstrap.local
ServerAlias www.bootstrap.local
DocumentRoot "/var/www/html/bootstrap.local/public_html/"
ErrorLog /var/www/html/bootstrap.local/logs/error.log
CustomLog /var/www/html/bootstrap.local/logs/error.log combined
</VirtualHost>
# Joomla
<VirtualHost *:80>
ServerAdmin root@local
ServerName portal.local
ServerAlias www.portal.local
DocumentRoot "/var/www/html/portal.local/public_html/"
ErrorLog /var/www/html/portal.local/logs/error.log
CustomLog /var/www/html/portal.local/logs/error.log combined
</VirtualHost>
#Wordpress
<VirtualHost *:80>
ServerAdmin root@local
ServerName wordpress.local
ServerAlias www.wordpress.local
DocumentRoot "/var/www/html/wordpress.local/public_html/"
ErrorLog /var/www/html/wordpress.local/logs/error.log
CustomLog /var/www/html/wordpress.local/logs/access.log combined
</VirtualHost>

Options ExecCGI
AddHandler cgi-script .pl
___________________________________________________________

O que eu faço?



  


2. Re: Debian Jessie com falha ao inicializar Apache 2.4.10: "Failed to start LSB: Apache2 web server".

Diego França
dtgfranca

(usa Debian)

Enviado em 02/01/2017 - 14:31h

priscilaalvess_ escreveu:

Olá,

Estou tentando configurar quatro virtualhosts no meu servidor web funcionando com Apache 2.4.10, PHP 5.6.29 e MySQL 5.5.53. Porém, quando tento reiniciar o apache, após ativar as virtualhosts com o comando a2ensite, o apache me retorna o erro "Failed to start LSB: Apache2 web server" e pede que eu execute os comandos 'systemctl status apache2.service' e 'journalctl -xn'.

____________________________________________
Saída do 'systemctl status apache2.service':
&#9679; apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
&#9492;&#9472;forking.conf
Active: failed (Result: exit-code) since Seg 2017-01-02 10:30:49 BRT; 55s ago
Process: 4933 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jan 02 10:30:49 venus apache2[4933]: Starting web server: apache2 failed!
Jan 02 10:30:49 venus apache2[4933]: The apache2 configtest failed. ... (warning).
Jan 02 10:30:49 venus apache2[4933]: Output of config test was:
Jan 02 10:30:49 venus apache2[4933]: AH00534: apache2: Configuration error: No...d.
Jan 02 10:30:49 venus apache2[4933]: Action 'configtest' failed.
Jan 02 10:30:49 venus apache2[4933]: The Apache error log may have more inform...n.
Jan 02 10:30:49 venus systemd[1]: apache2.service: control process exited, cod...=1
Jan 02 10:30:49 venus systemd[1]: Failed to start LSB: Apache2 web server.
Jan 02 10:30:49 venus systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
____________________________________________
Saída do 'journalctl -xn':
-- Logs begin at Seg 2017-01-02 07:41:09 BRT, end at Seg 2017-01-02 10:30:49 BRT. -
Jan 02 10:30:49 venus systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Jan 02 10:30:49 venus apache2[4933]: Starting web server: apache2 failed!
Jan 02 10:30:49 venus apache2[4933]: The apache2 configtest failed. ... (warning).
Jan 02 10:30:49 venus apache2[4933]: Output of config test was:
Jan 02 10:30:49 venus apache2[4933]: AH00534: apache2: Configuration error: No MPM
Jan 02 10:30:49 venus apache2[4933]: Action 'configtest' failed.
Jan 02 10:30:49 venus apache2[4933]: The Apache error log may have more information
Jan 02 10:30:49 venus systemd[1]: apache2.service: control process exited, code=exi
Jan 02 10:30:49 venus systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Jan 02 10:30:49 venus systemd[1]: Unit apache2.service entered failed state.
____________________________________________
Configuração do Virtualhost:

# DMA
<VirtualHost *:80>
ServerAdmin root@local
ServerName dma.local
ServerAlias www.dma.local
DocumentRoot "/var/www/html/dma.local/public_html/"
ErrorLog /var/www/html.dma.local/logs/error.log
CustomLog /var/www/html.dma.local/logs/error.log combined
</VirtualHost>
# Bootstrap
<VirtualHost *:80>
ServerAdmin root@local
ServerName bootstrap.local
ServerAlias www.bootstrap.local
DocumentRoot "/var/www/html/bootstrap.local/public_html/"
ErrorLog /var/www/html/bootstrap.local/logs/error.log
CustomLog /var/www/html/bootstrap.local/logs/error.log combined
</VirtualHost>
# Joomla
<VirtualHost *:80>
ServerAdmin root@local
ServerName portal.local
ServerAlias www.portal.local
DocumentRoot "/var/www/html/portal.local/public_html/"
ErrorLog /var/www/html/portal.local/logs/error.log
CustomLog /var/www/html/portal.local/logs/error.log combined
</VirtualHost>
#Wordpress
<VirtualHost *:80>
ServerAdmin root@local
ServerName wordpress.local
ServerAlias www.wordpress.local
DocumentRoot "/var/www/html/wordpress.local/public_html/"
ErrorLog /var/www/html/wordpress.local/logs/error.log
CustomLog /var/www/html/wordpress.local/logs/access.log combined
</VirtualHost>

Options ExecCGI
AddHandler cgi-script .pl
___________________________________________________________

O que eu faço?


Pelo que percebi é algum problema com o INIT , como o Debian, Ubuntu estão adotando o Systemd. Pelo log ao executar o comando a2ensite ele tenta executar o comando /etc/init.d/apache2 start , que muito provavelmente já está em 'desuso' e por isso gerou esse erro. Sugiro que tente executar o seguinte comando:

systemctl start apache2 


Caso não resolva, execute os comandos sugeridos na saída desse erro.

Saudações Livres


3. Re: Debian Jessie com falha ao inicializar Apache 2.4.10:

Perfil removido
removido

(usa Nenhuma)

Enviado em 02/01/2017 - 15:33h

Isso está correto?
ErrorLog /var/www/html.dma.local/logs/error.log
CustomLog /var/www/html.dma.local/logs/error.log combined


Não seria?
ErrorLog /var/www/html/dma.local/logs/error.log
CustomLog /var/www/html/dma.local/logs/error.log combined


Verifique a sintaxe e analise os logs do apache para mais detalhes.

# apache2ctl -t

# tailf /var/log/apache2/error.log







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts