nats.service file is throwing error

asked 2019-02-17 05:09:23 -0500

dinuka gravatar image

I install NATS as guid for Ubuntu. How To Install and Configure NATS on Ubuntu 16.04

I had used same instruction as this in Fedora 27 it was working.

But nats.service file is not working in Fedora 29

/etc/systemd/system/nats.service

[Unit]
Description=NATS messaging server

[Service]
ExecStart=/srv/nats/bin/gnatsd -c /srv/nats/gnatsd.config
User=nats
Restart=on-failure

[Install]
WantedBy=multi-user.target

I did sudo systemctl start nats and sudo systemctl status nats

It is showing

● nats.service - NATS messaging server
   Loaded: loaded (/etc/systemd/system/nats.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2019-02-17 16:28:54 +0530; 1s ago
  Process: 6664 ExecStart=/srv/nats/bin/gnatsd -c /srv/nats/gnatsd.config (code=exited, status=203/EXEC)
 Main PID: 6664 (code=exited, status=203/EXEC)

Feb 17 16:28:54 localhost.localdomain systemd[1]: nats.service: Service RestartSec=100ms expired, scheduling restart.
Feb 17 16:28:54 localhost.localdomain systemd[1]: nats.service: Scheduled restart job, restart counter is at 5.
Feb 17 16:28:54 localhost.localdomain systemd[1]: Stopped NATS messaging server.
Feb 17 16:28:54 localhost.localdomain systemd[1]: nats.service: Start request repeated too quickly.
Feb 17 16:28:54 localhost.localdomain systemd[1]: nats.service: Failed with result 'exit-code'.
Feb 17 16:28:54 localhost.localdomain systemd[1]: Failed to start NATS messaging server.

But /srv/nats/bin/gnatsd -c /srv/nats/gnatsd.config is working properly.

edit retag flag offensive close merge delete

Comments

@dinuka , we need more information exit startus 1 is not enough, Could you read this post -> how-do-i-view-logs-on-fedora, example execute this in terminal journalctl _SYSTEMD_UNIT=nats.service

hhlp gravatar imagehhlp ( 2019-02-17 11:32:18 -0500 )edit