Can you run the a sudo systemctl status Ignition-Gateway.service so we can see some of the logs? It looks like it is enabled and attempting to start, but failing for some reason.
@kcollins1 I think the error is related to “status=217/USER”, but I’m not sure what that means. I’m trying to remember when I installed this, if I used the sudo command, or if I just installed it as the user I was logged in as… could this error be related to me installing it while logged in as a non-root user?
I’m not a systemd wizard unfortunately, but some initial research does seem to point to it being an issue with what user the gateway is targeted to run as by systemd. Perhaps the content of /etc/systemd/system/Ignition-Gateway.service might reveal some more info.
Also, a sudo systemctl status Ignition-Gateway.service after a reboot would likely be telling… Here is what I get when I adjust a test VM with a different User=xxxx line (to a user that doesn’t exist) in the service definition:
ubuntu@ubuntu-ignition-test:~$ systemctl status Ignition-Gateway.service
● Ignition-Gateway.service - Ignition-Gateway
Loaded: loaded (/etc/systemd/system/Ignition-Gateway.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-02-05 12:15:44 CST; 19s ago
Process: 613 ExecStart=/usr/local/bin/ignition/ignition.sh start sysd (code=exited, status=217/USER)
Feb 05 12:15:43 ubuntu-ignition-test systemd[1]: Starting Ignition-Gateway...
Feb 05 12:15:44 ubuntu-ignition-test systemd[613]: Ignition-Gateway.service: Failed to determine user credentials: No such process
Feb 05 12:15:44 ubuntu-ignition-test systemd[613]: Ignition-Gateway.service: Failed at step USER spawning /usr/local/bin/ignition/ignition.sh: No such process
Feb 05 12:15:44 ubuntu-ignition-test systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=217/USER
Feb 05 12:15:44 ubuntu-ignition-test systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
Feb 05 12:15:44 ubuntu-ignition-test systemd[1]: Failed to start Ignition-Gateway.
I think you have helped me zero in on it! This is right after a reboot:
brian@usp-clgateway:~$ sudo systemctl status Ignition-Gateway.service
● Ignition-Gateway.service - Ignition-Gateway
Loaded: loaded (/etc/systemd/system/Ignition-Gateway.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-02-05 18:28:51 UTC; 2min 20s ago
Process: 702 ExecStart=/usr/local/bin/ignition/ignition.sh start sysd (code=exited, status=217/USER)
Feb 05 18:28:51 usp-clgateway systemd[1]: Starting Ignition-Gateway...
Feb 05 18:28:51 usp-clgateway systemd[702]: Ignition-Gateway.service: Failed to determine user credentials: No such file or directory
Feb 05 18:28:51 usp-clgateway systemd[702]: Ignition-Gateway.service: Failed at step USER spawning /usr/local/bin/ignition/ignition.sh:>
Feb 05 18:28:51 usp-clgateway systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=217/USER
Feb 05 18:28:51 usp-clgateway systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
Feb 05 18:28:51 usp-clgateway systemd[1]: Failed to start Ignition-Gateway.
So what is the best way to resolve? Reinstall ignition as the root user? Or pass a --USER=xxx somewhere?
I’d double check the existence of that service definition, if the service is loading, that file should be there. You can then try inspecting and then setting the User=... declaration. Here is the file from a fresh install on one of my VMs:
You verify the permissions of the install folder /usr/local/bin/ignition, you may need to chown -R <user>.root /usr/local/bin/ignition to make sure that the target user owns the gateway files.
Run systemctl daemon-reload after you make changes to your service definition (not 100% sure if this is needed for every type of change, but it won’t hurt).
On some Unix variants, the Tanuki wrapper does not recognize system.d and falls back to init.d! In this case there is no service definition but a symlink in init.d.
well, I ‘fixed’ it, but I’m not proud of how I did it.
1- created a new user ‘ignition2’ (I can’t remove the user ‘ignition’, and I can’t add it either!)
2- changed the ownership of all the files in the ignition directory to ignition2:root
3- edited the ignition.sh file, where the user ‘ignition’ was set, changed it to ‘ignition2’
4- ran ./ignition.sh install (after I ran with the remove option)
5- verified the /etc/systemd/system/Ignition-Gateway.service file was using “User=ignition2” (I might have manually edited this file in an earlier attempt, but I think it was created correctly after I edited the ignition.sh file)
6- ran sudo systemctl enable Ignition-Gateway.service