Problema Ao Reiniciar O Apache

1. Problema Ao Reiniciar O Apache

Reginaldo de Lima Santos
Piquai

(usa Ubuntu)

Enviado em 02/02/2019 - 15:15h

Estou com problema com o comando sudo service apache2 restart. O retorno é a mensagem que segue abaixo:

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

Já até vi tópicos resolvidos sobre o assunto, mas não conseguir entender. Se alguém poder ajudar explicando para quem tem conhecimento básico agradeço.



  


2. Re: Problema Ao Reiniciar O Apache

Mauriciodez
Mauriciodez

(usa Debian)

Enviado em 02/02/2019 - 21:09h

fez o que o erro sugeriu para detalhar o erro ??? de o comando
journalctl -xe 



------------------------------------------------------| Linux User #621728 |------------------------------------------------------

" Nem sempre é amigo aquele que te tira do buraco !!! ( Saddam Hussein )"

------------------------------------------------------| Linux User #621728 |------------------------------------------------------




3. Re: Problema Ao Reiniciar O Apache

Reginaldo de Lima Santos
Piquai

(usa Ubuntu)

Enviado em 02/02/2019 - 22:22h

[email protected]:~# sudo journalctl -xe
sudo: unable to resolve host costabranca
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has finished starting up.
--
-- The start-up result is done.
Feb 02 11:49:49 costabranca sudo[998]: root : unable to resolve host costabranca
Feb 02 11:49:49 costabranca sudo[998]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/service apache2 resta
Feb 02 11:49:49 costabranca sudo[998]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Feb 02 11:49:49 costabranca systemd[1]: Stopped LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Feb 02 11:49:49 costabranca systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Feb 02 11:49:49 costabranca apache2[1004]: * Starting Apache httpd web server a
Feb 02 11:49:49 costabranca apache2[1004]: *
Feb 02 11:49:49 costabranca apache2[1004]: * The apache2 configtest failed.
Feb 02 11:49:49 costabranca apache2[1004]: Output of config test was:
Feb 02 11:49:49 costabranca apache2[1004]: AH00526: Syntax error on line 9 of /e
Feb 02 11:49:49 costabranca apache2[1004]: Invalid command 'Serverspace', perhap
Feb 02 11:49:49 costabranca apache2[1004]: Action 'configtest' failed.
Feb 02 11:49:49 costabranca apache2[1004]: The Apache error log may have more in
Feb 02 11:49:49 costabranca systemd[1]: apache2.service: Control process exited,
Feb 02 11:49:49 costabranca 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.
Feb 02 11:49:49 costabranca systemd[1]: apache2.service: Unit entered failed sta
Feb 02 11:49:49 costabranca systemd[1]: apache2.service: Failed with result 'exi
Feb 02 11:49:49 costabranca sudo[998]: pam_unix(sudo:session): session closed fo
Feb 02 11:50:01 costabranca sudo[1018]: root : unable to resolve host costab
Feb 02 11:50:01 costabranca sudo[1018]: root : TTY=pts/0 ; PWD=/root ; USER=
Feb 02 11:50:01 costabranca sudo[1018]: pam_unix(sudo:session): session opened f
lines 1528-1570/1570 (END)



4. Re: Problema Ao Reiniciar O Apache

Mauriciodez
Mauriciodez

(usa Debian)

Enviado em 03/02/2019 - 00:12h

velho .. essas linhas estão incompletas !!! Tem como mandar a parada completa ??





------------------------------------------------------| Linux User #621728 |------------------------------------------------------

" Nem sempre é amigo aquele que te tira do buraco !!! ( Saddam Hussein )"

------------------------------------------------------| Linux User #621728 |------------------------------------------------------




5. Re: Problema Ao Reiniciar O Apache

Paulo Dias
p4ulodi4s

(usa XUbuntu)

Enviado em 03/02/2019 - 02:03h

Piquai escreveu:

[email protected]:~# sudo journalctl -xe
sudo: unable to resolve host costabranca
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has finished starting up.
--
-- The start-up result is done.
Feb 02 11:49:49 costabranca sudo[998]: root : unable to resolve host costabranca
Feb 02 11:49:49 costabranca sudo[998]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/usr/sbin/service apache2 resta
Feb 02 11:49:49 costabranca sudo[998]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Feb 02 11:49:49 costabranca systemd[1]: Stopped LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Feb 02 11:49:49 costabranca systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Feb 02 11:49:49 costabranca apache2[1004]: * Starting Apache httpd web server a
Feb 02 11:49:49 costabranca apache2[1004]: *
Feb 02 11:49:49 costabranca apache2[1004]: * The apache2 configtest failed.
Feb 02 11:49:49 costabranca apache2[1004]: Output of config test was:
Feb 02 11:49:49 costabranca apache2[1004]: AH00526: Syntax error on line 9 of /e
Feb 02 11:49:49 costabranca apache2[1004]: Invalid command 'Serverspace', perhap
Feb 02 11:49:49 costabranca apache2[1004]: Action 'configtest' failed.
Feb 02 11:49:49 costabranca apache2[1004]: The Apache error log may have more in
Feb 02 11:49:49 costabranca systemd[1]: apache2.service: Control process exited,
Feb 02 11:49:49 costabranca 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.
Feb 02 11:49:49 costabranca systemd[1]: apache2.service: Unit entered failed sta
Feb 02 11:49:49 costabranca systemd[1]: apache2.service: Failed with result 'exi
Feb 02 11:49:49 costabranca sudo[998]: pam_unix(sudo:session): session closed fo
Feb 02 11:50:01 costabranca sudo[1018]: root : unable to resolve host costab
Feb 02 11:50:01 costabranca sudo[1018]: root : TTY=pts/0 ; PWD=/root ; USER=
Feb 02 11:50:01 costabranca sudo[1018]: pam_unix(sudo:session): session opened f
lines 1528-1570/1570 (END)


Oi.


Feb 02 11:49:49 costabranca apache2[1004]: * Starting Apache httpd web server a
Feb 02 11:49:49 costabranca apache2[1004]: *
Feb 02 11:49:49 costabranca apache2[1004]: * The apache2 configtest failed.
Feb 02 11:49:49 costabranca apache2[1004]: Output of config test was:
Feb 02 11:49:49 costabranca apache2[1004]: AH00526: Syntax error on line 9 of /e
Feb 02 11:49:49 costabranca apache2[1004]: Invalid command 'Serverspace', perhap
Feb 02 11:49:49 costabranca apache2[1004]: Action 'configtest' failed.
Feb 02 11:49:49 costabranca apache2[1004]: The Apache error log may have more in


Erro de syntax, você está usando um comando invalido nos arquivos de configuração do apache: Serverspace




6. Re: Problema Ao Reiniciar O Apache

Reginaldo de Lima Santos
Piquai

(usa Ubuntu)

Enviado em 05/02/2019 - 17:38h

Mariciodez ae estão todas as linhas. p4ulodi4s, blz e qual o proceder para corrigir este erro e qual foi o comando q usei?

[email protected]:~# sudo journalctl -xe
sudo: unable to resolve host costabranca
Feb 05 14:32:24 costabranca sshd[14863]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rh
Feb 05 14:32:26 costabranca sshd[14863]: Failed password for root from 218.92.1.184 port 20348 ssh2
Feb 05 14:32:29 costabranca sshd[14863]: Failed password for root from 218.92.1.184 port 20348 ssh2
Feb 05 14:32:32 costabranca sshd[14863]: Failed password for root from 218.92.1.184 port 20348 ssh2
Feb 05 14:32:34 costabranca sshd[14863]: Failed password for root from 218.92.1.184 port 20348 ssh2
Feb 05 14:32:37 costabranca sshd[14863]: Failed password for root from 218.92.1.184 port 20348 ssh2
Feb 05 14:32:40 costabranca sshd[14863]: Failed password for root from 218.92.1.184 port 20348 ssh2
Feb 05 14:32:40 costabranca sshd[14863]: error: maximum authentication attempts exceeded for root from 218.92.1.184 port 2034
Feb 05 14:32:40 costabranca sshd[14863]: Disconnecting: Too many authentication failures [preauth]
Feb 05 14:32:40 costabranca sshd[14863]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.9
Feb 05 14:32:40 costabranca sshd[14863]: PAM service(sshd) ignoring max retries; 6 > 3
Feb 05 14:32:42 costabranca sshd[14865]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Feb 05 14:32:42 costabranca sshd[14865]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Feb 05 14:32:43 costabranca sshd[14865]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rh
Feb 05 14:32:46 costabranca sshd[14865]: Failed password for root from 218.92.1.184 port 42823 ssh2
Feb 05 14:32:48 costabranca sshd[14865]: Failed password for root from 218.92.1.184 port 42823 ssh2
Feb 05 14:32:51 costabranca sshd[14865]: Failed password for root from 218.92.1.184 port 42823 ssh2
Feb 05 14:32:54 costabranca sshd[14865]: Failed password for root from 218.92.1.184 port 42823 ssh2
Feb 05 14:32:57 costabranca sshd[14865]: Failed password for root from 218.92.1.184 port 42823 ssh2
Feb 05 14:33:00 costabranca sshd[14865]: Failed password for root from 218.92.1.184 port 42823 ssh2
Feb 05 14:33:00 costabranca sshd[14865]: error: maximum authentication attempts exceeded for root from 218.92.1.184 port 4282
Feb 05 14:33:00 costabranca sshd[14865]: Disconnecting: Too many authentication failures [preauth]
Feb 05 14:33:00 costabranca sshd[14865]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.9
Feb 05 14:33:00 costabranca sshd[14865]: PAM service(sshd) ignoring max retries; 6 > 3
Feb 05 14:33:01 costabranca sshd[14867]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Feb 05 14:33:01 costabranca sshd[14867]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Feb 05 14:33:03 costabranca sshd[14867]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rh
Feb 05 14:33:05 costabranca sshd[14867]: Failed password for root from 218.92.1.184 port 64995 ssh2
Feb 05 14:33:08 costabranca sshd[14867]: Failed password for root from 218.92.1.184 port 64995 ssh2
Feb 05 14:33:11 costabranca sshd[14867]: Failed password for root from 218.92.1.184 port 64995 ssh2
Feb 05 14:33:14 costabranca sshd[14867]: Failed password for root from 218.92.1.184 port 64995 ssh2
Feb 05 14:33:17 costabranca sshd[14867]: Failed password for root from 218.92.1.184 port 64995 ssh2
Feb 05 14:33:20 costabranca sshd[14867]: Failed password for root from 218.92.1.184 port 64995 ssh2
Feb 05 14:33:20 costabranca sshd[14867]: error: maximum authentication attempts exceeded for root from 218.92.1.184 port 6499
Feb 05 14:33:20 costabranca sshd[14867]: Disconnecting: Too many authentication failures [preauth]
Feb 05 14:33:20 costabranca sshd[14867]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=218.9
Feb 05 14:33:20 costabranca sshd[14867]: PAM service(sshd) ignoring max retries; 6 > 3
Feb 05 14:33:22 costabranca sudo[14869]: root : unable to resolve host costabranca
Feb 05 14:33:22 costabranca sudo[14869]: root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/bin/journalctl -xe
Feb 05 14:33:22 costabranca sudo[14869]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Feb 05 14:33:22 costabranca sshd[14875]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Feb 05 14:33:22 costabranca sshd[14875]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Feb 05 14:33:22 costabranca postfix/pickup[14595]: 9506A1F37B: uid=0 from=<root>
lines 959-1001/1001 (END)



7. Re: Problema Ao Reiniciar O Apache

Paulo Dias
p4ulodi4s

(usa XUbuntu)

Enviado em 05/02/2019 - 20:12h

Você alterou algum arquivo dentro de /etc/apache

O log não mostra qual o arquivo, mas é provável que seja o último arquivo que você mexeu...

Você pode tentar localizar o arquivo assim:


cd /etc/apache
grep Serversp * -R


Linux Professional Institute - LPIC-1
Novell Certified Linux Administrator - CLA
Oracle Certified Associate, Java SE Programmer - OCA

http://twitter.com/p4ulodi4s
http://www.prminformatica.com.br/


8. Re: Problema Ao Reiniciar O Apache

Reginaldo de Lima Santos
Piquai

(usa Ubuntu)

Enviado em 05/02/2019 - 20:30h

[email protected]:~# cd /etc/apache
-bash: cd: /etc/apache: No such file or directory
[email protected]:~#


9. Re: Problema Ao Reiniciar O Apache

Mauriciodez
Mauriciodez

(usa Debian)

Enviado em 05/02/2019 - 20:30h


Piquai escreveu:
sudo: unable to resolve host costabranca


me deixou encucado ... manda aí pra gente
cat /etc/hosts 
cat /etc/hostname 


------------------------------------------------------| Linux User #621728 |------------------------------------------------------

" Nem sempre é amigo aquele que te tira do buraco !!! ( Saddam Hussein )"

------------------------------------------------------| Linux User #621728 |------------------------------------------------------




10. Re: Problema Ao Reiniciar O Apache

Reginaldo de Lima Santos
Piquai

(usa Ubuntu)

Enviado em 05/02/2019 - 20:39h

[email protected]:~# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
[email protected]:~# cat /etc/hostname
costabranca
[email protected]:~#



11. Re: Problema Ao Reiniciar O Apache

Paulo Dias
p4ulodi4s

(usa XUbuntu)

Enviado em 05/02/2019 - 20:44h

Tente '/etc/apache2' ou '/etc/httpd/'



12. Re: Problema Ao Reiniciar O Apache

Reginaldo de Lima Santos
Piquai

(usa Ubuntu)

Enviado em 05/02/2019 - 20:52h

[email protected]:~# cd etc/httpd
-bash: cd: etc/httpd: No such file or directory
[email protected]:~#
Já havia tentado '/etc/apache2'



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner
Linux banner
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts