Criei um serviço de usuário. Retorna o erro “Falha no passo GRUPO desova: Operação não permitida”

1

Eu criei um serviço.

admin@Xroklaus:~ $ cat /etc/systemd/user/duniter.service 
[Unit]
Description=Duniter node
After=network.target
ConditionPathExists=/home/folatt/.config/duniter/duniter_default/duniter.db

[Service]
Group=folatt
User=folatt
Type=forking
ExecStart=/usr/bin/duniter webstart
ExecReload=/usr/bin/duniter webrestart
ExecStop=/usr/bin/duniter stop
Restart=on-failure

[Install]
WantedBy=multi-user.target

Após a reinicialização, ele não é carregado.

folatt@Xroklaus:~ $ systemctl --user status duniter.service
● duniter.service - Duniter node
   Loaded: loaded (/etc/systemd/user/duniter.service; enabled)
   Active: failed (Result: start-limit) since Sun 2018-01-07 20:31:43 UTC; 1min 3s ago
  Process: 2212 ExecStart=/usr/bin/duniter webstart (code=exited, status=216/GROUP)

Journalctl fornece um pouco mais de informação sobre o erro.

admin@Xroklaus:~ $ sudo journalctl -p 3 --no-pager
-- Logs begin at Sun 2018-01-07 20:30:33 UTC, end at Sun 2018-01-07 20:31:49 UTC. --
Jan 07 20:30:39 Xroklaus bluetoothd[876]: Sap driver initialization failed.
Jan 07 20:30:39 Xroklaus bluetoothd[876]: sap-server: Operation not permitted (1)
Jan 07 20:31:26 Xroklaus systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Jan 07 20:31:42 Xroklaus systemd[2203]: Failed at step GROUP spawning /usr/bin/duniter: Operation not permitted
Jan 07 20:31:42 Xroklaus systemd[2177]: Failed to start Duniter node.
Jan 07 20:31:42 Xroklaus systemd[2206]: Failed at step GROUP spawning /usr/bin/duniter: Operation not permitted
Jan 07 20:31:42 Xroklaus systemd[2177]: Failed to start Duniter node.
Jan 07 20:31:43 Xroklaus systemd[2208]: Failed at step GROUP spawning /usr/bin/duniter: Operation not permitted
Jan 07 20:31:43 Xroklaus systemd[2177]: Failed to start Duniter node.
Jan 07 20:31:43 Xroklaus systemd[2210]: Failed at step GROUP spawning /usr/bin/duniter: Operation not permitted
Jan 07 20:31:43 Xroklaus systemd[2177]: Failed to start Duniter node.
Jan 07 20:31:43 Xroklaus systemd[2212]: Failed at step GROUP spawning /usr/bin/duniter: Operation not permitted
Jan 07 20:31:43 Xroklaus systemd[2177]: Failed to start Duniter node.
Jan 07 20:31:43 Xroklaus systemd[2177]: Failed to start Duniter node.

Mas isso é tanto quanto eu tenho. Eu não sei qual é a solução para isso.

    
por Folatt 08.01.2018 / 09:12

1 resposta

0

Mudei o arquivo de serviço e removi o usuário e o grupo, além de alterar o destino de instalação assim:

/usr/lib/systemd/user/duniter.service

[Unit]
Description=Duniter node
After=network.target
ConditionPathExists=/home/folatt/.config/duniter/duniter_default/duniter.db

[Service]
Type=forking
ExecStart=/usr/bin/duniter webstart
ExecReload=/usr/bin/duniter webrestart
ExecStop=/usr/bin/duniter stop
Restart=on-failure

[Install]
WantedBy=default.target
    
por 11.01.2018 / 08:56