Falha ao iniciar serviços no Fedora

1. Falha ao iniciar serviços no Fedora

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 25/02/2018 - 18:56h

Galera, tudo bem com voces? Então, eu estou quase ficando careca com esse problema hehe.

Seguinte: Eu não consigo iniciar alguns serviços no Fedora, como por exemplo o httpd, mysqld, postgresql , etc.

Sempre que dou o comando systemctl start httpd por exemplo, aparece o seguinte:

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


O mesmo acontece para os demais (mysqld, postgresql ). Vejam a saída do erro com o journalctl -xn:

Apache:

-- Logs begin at Sat 2017-10-28 20:40:43 -02, end at Sun 2018-02-25 18:51:36 -03. --
fev 25 18:51:36 fedora systemd[1]: Failed to start The PHP FastCGI Process Manager.
-- Subject: A unidade php-fpm.service falhou
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade php-fpm.service falhou.
--
-- O resultado é failed.
fev 25 18:51:36 fedora systemd[1]: php-fpm.service: Unit entered failed state.
fev 25 18:51:36 fedora systemd[1]: php-fpm.service: Failed with result 'exit-code'.
fev 25 18:51:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=php-fpm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
fev 25 18:51:36 fedora systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
fev 25 18:51:36 fedora systemd[1]: httpd.service: Killing process 7199 (httpd) with signal SIGKILL.
fev 25 18:51:36 fedora systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: A unidade httpd.service falhou
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade httpd.service falhou.
--
-- O resultado é failed.
fev 25 18:51:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
fev 25 18:51:36 fedora systemd[1]: httpd.service: Unit entered failed state.
fev 25 18:51:36 fedora systemd[1]: httpd.service: Failed with result 'exit-code'.


Como disse antes, acontece com os demais tambem:

MySQL:

-- Logs begin at Sat 2017-10-28 20:40:43 -02, end at Sun 2018-02-25 18:52:53 -03. --
fev 25 18:52:53 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
fev 25 18:52:53 fedora systemd[1]: Failed to start MySQL Server.
-- Subject: A unidade mysqld.service falhou
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade mysqld.service falhou.
--
-- O resultado é failed.
fev 25 18:52:53 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
fev 25 18:52:53 fedora systemd[1]: mysqld.service: Unit entered failed state.
fev 25 18:52:53 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
fev 25 18:52:53 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
fev 25 18:52:53 fedora systemd[1]: Stopped MySQL Server.
-- Subject: A unidade mysqld.service concluiu o desligamento
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade mysqld.service concluiu o desligamento.
fev 25 18:52:53 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
fev 25 18:52:53 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
fev 25 18:52:53 fedora systemd[1]: Starting MySQL Server...
-- Subject: Unidade mysqld.service sendo iniciado
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- A unidade mysqld.service está sendo iniciada.


Eu não sei o que fazer. Eu consegui contorcer o problema reinstalando os pacotes, mas depois que reinicio a máquina, o problema persiste em voltar. Mesmo que eu coloque por exemplo systemctl enable mysqld para iniciar no boot, não inicia.

Alguém tem uma noção do que seja isso, se é permissão de diretórios ou algo assim? Se precisarem de mais informações eu digo.

Agradecido.


  


2. Re: Fedora não quer iniciar alguns serviços

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 12/03/2018 - 04:37h

Usando comando: systemctl status mysqld


● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
Active: activating (start-pre) since Mon 2018-03-12 04:34:32 -03; 2s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 3943 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Cntrl PID: 3972 (mysqld_pre_syst)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/mysqld.service
└─control
├─3972 /bin/bash /usr/bin/mysqld_pre_systemd
└─3991 /usr/bin/python3 -Es /usr/sbin/semanage fcontext -a -e /var/lib/mysql /var/lib/mysql-keyring

mar 12 04:34:32 fedora systemd[1]: Starting MySQL Server...
mar 12 04:34:37 fedora mysqld[3994]: Unable to determine if daemon is running: No such file or directory
mar 12 04:34:37 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 12 04:34:37 fedora systemd[1]: Failed to start MySQL Server.
mar 12 04:34:37 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 12 04:34:37 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 12 04:34:37 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 12 04:34:37 fedora systemd[1]: Stopped MySQL Server.
mar 12 04:34:37 fedora systemd[1]: Starting MySQL Server...



Lembrando que o mysql, postgresql,apache...todos esses não iniciam nem no boot e nem manualmente. Eu não sei o motivo, porem sei que eles usam o diretprio /run. Será que é permissão? já deixei 755.
Me ajudem :( :(


3. Re: Falha ao iniciar serviços no Fedora

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 17/03/2018 - 19:19h

Khyser escreveu:

Amigo, aqui no meu Fedora para eu iniciar o mysql dou o seguinte comando:
service mysqld start 


Tenta ai no seu :)

OBS: Não sei se é a mesma coisa para o postgresql e os demais que você citou, mas tenta ai....vai que rola.


Resultado:

Redirecting to /bin/systemctl start mysqld.service
Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xe" for details.


OBS: Fedora usa systemd agora, então é a mesma coisa que systemctl start mysqld.

Não sei porque não está iniciando nenhum serviço (postgresql, mysqld, httpd). Pra iniciar eu desisntalo e instalo de novbo, ai inicia, mas quando a máquina da boot, na volta não inicia mais o serviço.


4. Re: Falha ao iniciar serviços no Fedora

Carlos A. P. Cunha
Carlos_Cunha

(usa Linux Mint)

Enviado em 18/03/2018 - 19:21h

Para iniciar serviços no Boot no Systemd:

systemctl enable SERVIÇO


Validar:

systemctl is-enabled SERVIÇO


#-------------------------------------------------------------------------------------#
Administrador de Redes Mistas Linux/Windows
LPI 101-102
LPI 201
Para consultas particulares acesse:
www.cunhatec.com.br

"Falar é fácil, me mostre o código." - Linus Torvalds


5. Re: Falha ao iniciar serviços no Fedora

Stanislaus K
StanislausK

(usa FreeBSD)

Enviado em 18/03/2018 - 21:03h

Ola,

no livro Linux, A Biblia (Christopher Negus, 2014), página 446 diz:

"Em sistemas Fedora recentes, voce habilita e inicia httpd usando o comando systemctl:
# systemctl enable httpd.service
# systemctl start httpd.service
# systemctl status httpd.service"


6. Re: Fedora não quer iniciar alguns serviços

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 21/03/2018 - 03:25h

StanislausK escreveu:

Ola,

no livro Linux, A Biblia (Christopher Negus, 2014), página 446 diz:

"Em sistemas Fedora recentes, voce habilita e inicia httpd usando o comando systemctl:
# systemctl enable httpd.service
# systemctl start httpd.service
# systemctl status httpd.service"


Então amigo, ja fiz isso, eu sei que esse comando inicia, porem dá aquele problema que mencionei no começo, aquelas mensagens.

Obs: Acho que vcs estão entendo que eu não estou usando esse comando, mas estou sim, só que não inicia o serviço.


7. Re: Fedora não quer iniciar alguns serviços

Patrick Costa da Silva
patrickpcs

(usa Nenhuma)

Enviado em 21/03/2018 - 07:23h

O status que o systemctl fornece sobre a inicialização de algum serviço é bem limitado. Só serve mesmo pra saber se está funcionando ou não, e no caso de não estar funcionando ele não descreve bem a causa.

Acho que a melhor aposta será usar o journalctl. Abra dois terminais, em um você coloca o comando journalctl -f para ir acompanhando o log do sistema no momento da inicialização, em outro você manda iniciar um dos serviços com problema e acompanhe o journalctl para ver se você pesca uma informação boa. Essas opções -xn do journalctl na minha opinião mais atrapalham do que ajudam.


PS: Acho que o título do seu tópico que está aguçando a falha de interpretação de texto dos demais colegas. Acho que o correto seria algo como falha ao iniciar serviços no fedora, pois na verdade o systemctl está tentando iniciar os serviços, não é que ele não queira ^^'....to noiado hoje, que viagem.


PS2: Olhando com mais calma os seus logs podemos encontrar o seguinte;
mar 12 04:34:37 fedora mysqld[3994]: Unable to determine if daemon is running: No such file or directory

Não sei ao certo como funciona no systemd, mas no SysV se não estiver errado, quando você usa o parâmetro start para os scripts de inicialização de serviços eles tentam checar se já não há uma instância do programa em questão rodando. Talvez o problema esteja relacionado ao systemd e não aos serviços....esperando sua análise na saída do journalctl -f.


8. Re: Fedora não quer iniciar alguns serviços

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 21/03/2018 - 15:58h

patrickpcs escreveu:

O status que o systemctl fornece sobre a inicialização de algum serviço é bem limitado. Só serve mesmo pra saber se está funcionando ou não, e no caso de não estar funcionando ele não descreve bem a causa.

Acho que a melhor aposta será usar o journalctl. Abra dois terminais, em um você coloca o comando journalctl -f para ir acompanhando o log do sistema no momento da inicialização, em outro você manda iniciar um dos serviços com problema e acompanhe o journalctl para ver se você pesca uma informação boa. Essas opções -xn do journalctl na minha opinião mais atrapalham do que ajudam.


PS: Acho que o título do seu tópico que está aguçando a falha de interpretação de texto dos demais colegas. Acho que o correto seria algo como falha ao iniciar serviços no fedora, pois na verdade o systemctl está tentando iniciar os serviços, não é que ele não queira ^^'....to noiado hoje, que viagem.




PS2: Olhando com mais calma os seus logs podemos encontrar o seguinte;
mar 12 04:34:37 fedora mysqld[3994]: Unable to determine if daemon is running: No such file or directory

Não sei ao certo como funciona no systemd, mas no SysV se não estiver errado, quando você usa o parâmetro start para os scripts de inicialização de serviços eles tentam checar se já não há uma instância do programa em questão rodando. Talvez o problema esteja relacionado ao systemd e não aos serviços....esperando sua análise na saída do journalctl -f.




Oi, obrigado por responder. Então fiz o que você disse, está aqui a saída do log. Iniciei os dos serviços, do apache e do mysql.


systemctl start httpd.service

e depois o

systemctl start mysqld.service




root@fedora:[gabriel]# journalctl -f
-- Logs begin at Sat 2017-10-28 20:40:43 -02. --
mar 21 15:50:36 fedora su[1835]: pam_unix(su:session): session opened for user root by (uid=1000)
mar 21 15:50:37 fedora audit[1835]: USER_START pid=1835 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_xauth acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/0 res=success'
mar 21 15:50:52 fedora audit[2042]: USER_AUTH pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:authentication grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:52 fedora audit[2042]: USER_ACCT pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:52 fedora su[2042]: (to root) gabriel on pts/1
mar 21 15:50:52 fedora audit[2042]: CRED_ACQ pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:52 fedora su[2042]: pam_systemd(su:session): Cannot create session: Already running in a session
mar 21 15:50:52 fedora su[2042]: pam_unix(su:session): session opened for user root by (uid=1000)
mar 21 15:50:52 fedora audit[2042]: USER_START pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_xauth acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:53 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:51:06 fedora dbus-daemon[1236]: [session uid=1000 pid=1236] Activating service name='org.gnome.ChromeGnomeShell' requested by ':1.71' (uid=1000 pid=2082 comm="/usr/bin/python3 /usr/bin/chrome-gnome-shell chrom")
mar 21 15:51:06 fedora dbus-daemon[1236]: [session uid=1000 pid=1236] Successfully activated service 'org.gnome.ChromeGnomeShell'
mar 21 15:51:11 fedora systemd[1]: Starting The Apache HTTP Server...
mar 21 15:51:11 fedora systemd[1]: Starting The PHP FastCGI Process Manager...
mar 21 15:51:11 fedora httpd[2124]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
mar 21 15:51:11 fedora php-fpm[2125]: [21-Mar-2018 15:51:11] ERROR: unable to bind listening socket for address '/run/php-fpm/www.sock': No such file or directory (2)
mar 21 15:51:11 fedora php-fpm[2125]: [21-Mar-2018 15:51:11] ERROR: FPM initialization failed
mar 21 15:51:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=php-fpm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:51:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:51:11 fedora systemd[1]: php-fpm.service: Main process exited, code=exited, status=78/n/a
mar 21 15:51:11 fedora systemd[1]: Failed to start The PHP FastCGI Process Manager.
mar 21 15:51:11 fedora systemd[1]: php-fpm.service: Unit entered failed state.
mar 21 15:51:11 fedora systemd[1]: php-fpm.service: Failed with result 'exit-code'.
mar 21 15:51:11 fedora systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
mar 21 15:51:11 fedora systemd[1]: httpd.service: Killing process 2126 (httpd) with signal SIGKILL.
mar 21 15:51:11 fedora systemd[1]: Failed to start The Apache HTTP Server.
mar 21 15:51:11 fedora systemd[1]: httpd.service: Unit entered failed state.
mar 21 15:51:11 fedora systemd[1]: httpd.service: Failed with result 'exit-code'.


mar 21 15:53:06 fedora systemd[1]: Starting MySQL Server...
mar 21 15:53:59 fedora mysqld[2288]: Unable to determine if daemon is running: No such file or directory
mar 21 15:53:59 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:53:59 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:53:59 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:53:59 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:53:59 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:53:59 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:04 fedora mysqld[2350]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:04 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:04 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:04 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:04 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:04 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:04 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:09 fedora mysqld[2405]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:09 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:09 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:09 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:09 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:09 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:09 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:15 fedora mysqld[2455]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:15 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:15 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:15 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:15 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:15 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:15 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:20 fedora mysqld[2508]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:20 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:20 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:20 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:20 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:20 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:21 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:21 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:21 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:21 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:21 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:25 fedora mysqld[2558]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:25 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:25 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:25 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:25 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:25 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:25 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:29 fedora mysqld[2608]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:29 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:29 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:29 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:29 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:29 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:30 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:30 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:30 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:30 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:30 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:36 fedora mysqld[2658]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:36 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:36 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:36 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:36 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:41 fedora mysqld[2726]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:41 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:41 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:41 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:41 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:41 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'




9. Re: Fedora não quer iniciar alguns serviços

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 21/03/2018 - 16:03h

gabrielscorpion escreveu:

patrickpcs escreveu:

O status que o systemctl fornece sobre a inicialização de algum serviço é bem limitado. Só serve mesmo pra saber se está funcionando ou não, e no caso de não estar funcionando ele não descreve bem a causa.

Acho que a melhor aposta será usar o journalctl. Abra dois terminais, em um você coloca o comando journalctl -f para ir acompanhando o log do sistema no momento da inicialização, em outro você manda iniciar um dos serviços com problema e acompanhe o journalctl para ver se você pesca uma informação boa. Essas opções -xn do journalctl na minha opinião mais atrapalham do que ajudam.


PS: Acho que o título do seu tópico que está aguçando a falha de interpretação de texto dos demais colegas. Acho que o correto seria algo como falha ao iniciar serviços no fedora, pois na verdade o systemctl está tentando iniciar os serviços, não é que ele não queira ^^'....to noiado hoje, que viagem.




PS2: Olhando com mais calma os seus logs podemos encontrar o seguinte;
mar 12 04:34:37 fedora mysqld[3994]: Unable to determine if daemon is running: No such file or directory

Não sei ao certo como funciona no systemd, mas no SysV se não estiver errado, quando você usa o parâmetro start para os scripts de inicialização de serviços eles tentam checar se já não há uma instância do programa em questão rodando. Talvez o problema esteja relacionado ao systemd e não aos serviços....esperando sua análise na saída do journalctl -f.




Oi, obrigado por responder. Então fiz o que você disse, está aqui a saída do log. Iniciei os dos serviços, do apache e do mysql.


systemctl start httpd.service

e depois o

systemctl start mysqld.service




root@fedora:[gabriel]# journalctl -f
-- Logs begin at Sat 2017-10-28 20:40:43 -02. --
mar 21 15:50:36 fedora su[1835]: pam_unix(su:session): session opened for user root by (uid=1000)
mar 21 15:50:37 fedora audit[1835]: USER_START pid=1835 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_xauth acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/0 res=success'
mar 21 15:50:52 fedora audit[2042]: USER_AUTH pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:authentication grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:52 fedora audit[2042]: USER_ACCT pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:52 fedora su[2042]: (to root) gabriel on pts/1
mar 21 15:50:52 fedora audit[2042]: CRED_ACQ pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:52 fedora su[2042]: pam_systemd(su:session): Cannot create session: Already running in a session
mar 21 15:50:52 fedora su[2042]: pam_unix(su:session): session opened for user root by (uid=1000)
mar 21 15:50:52 fedora audit[2042]: USER_START pid=2042 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_xauth acct="root" exe="/usr/bin/su" hostname=fedora addr=? terminal=pts/1 res=success'
mar 21 15:50:53 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:51:06 fedora dbus-daemon[1236]: [session uid=1000 pid=1236] Activating service name='org.gnome.ChromeGnomeShell' requested by ':1.71' (uid=1000 pid=2082 comm="/usr/bin/python3 /usr/bin/chrome-gnome-shell chrom")
mar 21 15:51:06 fedora dbus-daemon[1236]: [session uid=1000 pid=1236] Successfully activated service 'org.gnome.ChromeGnomeShell'
mar 21 15:51:11 fedora systemd[1]: Starting The Apache HTTP Server...
mar 21 15:51:11 fedora systemd[1]: Starting The PHP FastCGI Process Manager...
mar 21 15:51:11 fedora httpd[2124]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
mar 21 15:51:11 fedora php-fpm[2125]: [21-Mar-2018 15:51:11] ERROR: unable to bind listening socket for address '/run/php-fpm/www.sock': No such file or directory (2)
mar 21 15:51:11 fedora php-fpm[2125]: [21-Mar-2018 15:51:11] ERROR: FPM initialization failed
mar 21 15:51:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=php-fpm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:51:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:51:11 fedora systemd[1]: php-fpm.service: Main process exited, code=exited, status=78/n/a
mar 21 15:51:11 fedora systemd[1]: Failed to start The PHP FastCGI Process Manager.
mar 21 15:51:11 fedora systemd[1]: php-fpm.service: Unit entered failed state.
mar 21 15:51:11 fedora systemd[1]: php-fpm.service: Failed with result 'exit-code'.
mar 21 15:51:11 fedora systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
mar 21 15:51:11 fedora systemd[1]: httpd.service: Killing process 2126 (httpd) with signal SIGKILL.
mar 21 15:51:11 fedora systemd[1]: Failed to start The Apache HTTP Server.
mar 21 15:51:11 fedora systemd[1]: httpd.service: Unit entered failed state.
mar 21 15:51:11 fedora systemd[1]: httpd.service: Failed with result 'exit-code'.


mar 21 15:53:06 fedora systemd[1]: Starting MySQL Server...
mar 21 15:53:59 fedora mysqld[2288]: Unable to determine if daemon is running: No such file or directory
mar 21 15:53:59 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:53:59 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:53:59 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:53:59 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:53:59 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:53:59 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:53:59 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:04 fedora mysqld[2350]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:04 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:04 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:04 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:04 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:04 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:04 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:04 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:09 fedora mysqld[2405]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:09 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:09 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:09 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:09 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:09 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:09 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:09 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:15 fedora mysqld[2455]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:15 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:15 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:15 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:15 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:15 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:15 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:15 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:20 fedora mysqld[2508]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:20 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:20 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:20 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:20 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:20 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:21 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:21 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:21 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:21 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:21 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:25 fedora mysqld[2558]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:25 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:25 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:25 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:25 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:25 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:25 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:25 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:29 fedora mysqld[2608]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:29 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:29 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:29 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:29 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:29 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:30 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:30 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:30 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:30 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:30 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:36 fedora mysqld[2658]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:36 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:36 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:36 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:36 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:36 fedora systemd[1]: Starting MySQL Server...
mar 21 15:54:41 fedora mysqld[2726]: Unable to determine if daemon is running: No such file or directory
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Control process exited, code=exited status=1
mar 21 15:54:41 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
mar 21 15:54:41 fedora systemd[1]: Failed to start MySQL Server.
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Unit entered failed state.
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Failed with result 'exit-code'.
mar 21 15:54:41 fedora systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
mar 21 15:54:41 fedora systemd[1]: Stopped MySQL Server.
mar 21 15:54:41 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 21 15:54:41 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mysqld comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'




Olha como esta a permissão do diretório "/var/run", onde são criado a pasta para os serviços:


root@fedora:[gabriel]# ls -l /var/run
lrwxrwxrwx. 1 root root 6 jul 5 2017 /var/run -> ../run
root@fedora:[gabriel]#


OBS: Percebi que quando fui iniciar o Mysql, alem de não inicializar , entra em loop tentando iniciar o MySQl. Fica tentando iniciar direto. Minha máquina fica forçando a CPU por isso, esse loop de tentar iniciar o mysql. Ai, eu dei o comando para parar o serviço, e percebi que a maquina parou de usar CPU forçado.


10. Re: Fedora não quer iniciar alguns serviços

Ghoost User
ghoostuser

(usa Arch Linux)

Enviado em 21/03/2018 - 16:43h

Descobri o motivo mas ainda não consegui resolver...vejam:

Percebi que o Mysql criar uma pasta /var/run/mysqld para armazenar o socket, e esse diretório não estava sendo criado ao iniciar o serviço do MySQL (systemctl start mysqld.service), então eu fiz o seguinte. Criei esse diretório e dei permissão para o usuário do MySQL:

# mkdir /var/run/mysqld
# chown mysql.mysql -R /var/run/mysqld

Depois disso, iniciei o serviço do MySQL e funcionou normalmente, POREM, ao desligar e iniciar a máquina, esse diretório (/var/run/mysqld) não existe mais, o quando inicio o serviço do mysql, não inicia porque o serviço não encontra esse diretório para armazenar o socket. Eu preciso fazer tudo de novo o processo manualmente de criação da pasta e permissão.

Talvez seja problema de permissão mesmo, pois acontece o mesmo com o PostgreSql.

A permissão do diretório /var/run está assim:

root@fedora:[gabriel]# ls -l /var/run
lrwxrwxrwx. 1 root root 6 jul 5 2017 /var/run -> ../run
root@fedora:[gabriel]# ls -ld /run
drwxr-xrwx 27 root root 940 mar 22 01:24 /run
root@fedora:[gabriel]#



Encontrei essa ajuda aqui:
https://bugzilla.redhat.com/show_bug.cgi?id=894750
Fala do MySQL, porem outros serviços estão com esse comportamento. Será que foi o Upgrade que fiz do Fedora 26 para 27?

Resolve temporarialmente, mas não sei o porque está acontecendo isso. Alguém tem palpite?


11. Re: Falha ao iniciar serviços no Fedora

Patrick Costa da Silva
patrickpcs

(usa Nenhuma)

Enviado em 22/03/2018 - 07:26h

https://blog.hqcodeshop.fi/archives/93-Handling-varrun-with-systemd.html


Achei estranho /var/run

sei que o /run e um tpmfs, o que explicaria tudo sumir apos o reboot.

Curiosidade, por acaso vc transformou seu fedora em algum tipo de frankstein? usando repositorios de outra versao ou algo do tipo? fez alguma mudanca profunda no systemd?

Voce pode fazer uma gambiarra, modificando a inicializacao do unit referente a esses servicos e mandando ele criar esses diretorios antes de tentar iniciar o servico. Mas provavelmente seria apagado em alguma atualizacao de pacotes. Se observar bem o link que te mandei, e exatamente isso que se trata a solucao.



Edit:
Estou tomando algumas notas para revisao antes de fazer o exame LPIC-201, talvez ajude...
The following is a partial list of the used files, terms and utilities:
/usr/lib/systemd/
Where default (software-vendor) units files are stored. You shouldn't edit those files cuz they will be overwritten by installation scripts from those softwares.
/etc/systemd/
Where your custom units files should be stored. Everything here will take precedence over /usr/lib/systemd/
/run/systemd/
There is also a third location available in which you can place files to override your unit definitions, this is the /run/systemd directory. Definitions in this directory take precedence over the files in /usr/lib/systemd but not over those in /etc/systemd. Overrides in /run/systemd will only be used until the system is rebooted since all files in /run/systemd will be deleted at a reboot of the system.


12. Re: Falha ao iniciar serviços no Fedora

Patrick Costa da Silva
patrickpcs

(usa Nenhuma)

Enviado em 22/03/2018 - 08:19h

gabrielscorpion escreveu:
Encontrei essa ajuda aqui:
https://bugzilla.redhat.com/show_bug.cgi?id=894750
Fala do MySQL, porem outros serviços estão com esse comportamento. Será que foi o Upgrade que fiz do Fedora 26 para 27?


Interessante o cenário descrito nesse bugreport, mas o caso dele era que o usuário MySQL estava em uma base de dados externa ao sistema e que não era reconhecido durante o boot. Sendo assim o Daemon não conseguia usar esse usuário pra criar os arquivos necessários.


O seu caso provavelmente tem algumas semelhanças, mas eu acho que podemos tentar o seguinte já que você mencionou o upgrade do fedora;
Dê um purge nesse MySQL e nos outros serviços problemáticos
Apague todo o cachê do yum
Verifique os sourcelists
Atualize a lista de pacotes
E reinstale o MySQL.

Antes disso, vc pode verificar se a versão do MySQL instalada não é a do fedora 26 ao invés do 27. Imagino que deva existir na página do fedora da mesma forma que tem pra Debian e Ubuntu a lista de pacotes e suas respectivas versões.

Tente excluir também as unit.target referentes a esses serviços, uma vez que estes armazenam informações sobre como iniciar os serviços em questão. Se me lembro bem, em comparação com o SysV init, os pacotes não alteram/criam os scripts de inicialização em /etc/init.d/ se os mesmos já existirem ( ou era os links simbólicos apenas dentro de cada runlevel?). Bem fazendo essa analogia com as unit.target, talvez você ainda esteja com as que eram referente a versão 26 do fedora e a atualização dos pacotes não estão atualizando os targets. É tudo especulação minha. Mas acho que vale a pena analisar essa linha de raciocínio.





01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts