1

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.

  • systemd is running the process as the nats user; are you? – Jeff Schaller Feb 17 at 13:30
  • Yes. It is there. user and group has assigned to the /srv/nats folder. – Dinuka Thilanga Feb 17 at 14:52
  • What is /srv/nats/bin/gnatsd? Does it exist? What are the permissions? What is the type of file that it is? – Michael Hampton Feb 17 at 14:57
  • It is nats service executable file. It has permission to run as nats:nats. – Dinuka Thilanga Feb 17 at 16:19
  • status=203/EXEC says: The actual process execution failed (specifically, the execve(2) system call). Most likely this is caused by a missing or non-accessible executable file – Jeff Schaller Feb 20 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.