I tried to use this gwcmd to change port from 8088 to 80 as described here --- "gwcmd --port 80"
But after, this command "gwcmd --info" gives me "No response from Gateway", and the server can no longer start.
Here are the logs:
ubuntu@ip-172-31-xx-xxx:~$ 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 Mon 2024-01-01 12:24:47 UTC; 30min ago
Process: 2325 ExecStart=/usr/local/bin/ignition/ignition.sh start sysd (code=exited, status=1/FAILURE)
CPU: 3.740s
Jan 01 12:24:42 ip-172-31-xx-xxx systemd[1]: Starting Ignition-Gateway...
Jan 01 12:24:42 ip-172-31-xx-xxx ignition.sh[2325]: Starting Ignition-Gateway...
Jan 01 12:24:47 ip-172-31-xx-xxx ignition.sh[2325]: Waiting for Ignition-Gateway.......
Jan 01 12:24:47 ip-172-31-xx-xxx ignition.sh[2325]: WARNING: Ignition-Gateway may have failed to start.
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=1/FAILURE
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Failed to start Ignition-Gateway.
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Consumed 3.740s CPU time.
ubuntu@ip-172-31-xx-xxx:~$ journalctl -xeu Ignition-Gateway.service
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ An ExecStart= process belonging to unit Ignition-Gateway.service has exited.
ββ
ββ The process' exit code is 'exited' and its exit status is 1.
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
ββ Subject: Unit failed
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ The unit Ignition-Gateway.service has entered the 'failed' state with result 'exit-code'.
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Failed to start Ignition-Gateway.
ββ Subject: A start job for unit Ignition-Gateway.service has failed
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ A start job for unit Ignition-Gateway.service has finished with a failure.
ββ
ββ The job identifier is 1061 and the job result is failed.
Jan 01 12:24:47 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Consumed 3.740s CPU time.
ββ Subject: Resources consumed by unit runtime
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ The unit Ignition-Gateway.service completed and consumed the indicated resources.
That topic is very old. The modern approach is to include a SystemD override with AmbientCapabilities=CAP_NET_BIND_SERVICE. Or similar for Docker. See these topics:
For now, I am just trying to run ignition as root, after I changed the gwcmd --port 80.
In ignition.sh, I updated RUN_AS_USER=root, but still not able to run ignition.
root@ip-172-31-xx-xxx:~# 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 Tue 2024-01-02 04:05:43 UTC; 18s ago
Process: 2136 ExecStart=/usr/local/bin/ignition/ignition.sh start sysd (code=exited, status=1/FAILURE)
CPU: 89ms
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Starting Ignition-Gateway...
Jan 02 04:05:43 ip-172-31-xx-xxx ignition.sh[2210]: runuser: may not be used by non-root users
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=1/FAILURE
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Unit process 2211 (runuser) remains running after unit stopped.
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Failed to start Ignition-Gateway.
root@ip-172-31-xx-xxx:~# journalctl -xeu Ignition-Gateway.service
ββ
ββ The job identifier is 1398.
Jan 02 04:05:43 ip-172-31-xx-xxx ignition.sh[2210]: runuser: may not be used by non-root users
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=1/FAILURE
ββ Subject: Unit process exited
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ An ExecStart= process belonging to unit Ignition-Gateway.service has exited.
ββ
ββ The process' exit code is 'exited' and its exit status is 1.
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
βοΏ½οΏ½ Subject: Unit failed
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ The unit Ignition-Gateway.service has entered the 'failed' state with result 'exit-code'.
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Ignition-Gateway.service: Unit process 2211 (runuser) remains running after unit stopped.
Jan 02 04:05:43 ip-172-31-xx-xxx systemd[1]: Failed to start Ignition-Gateway.
ββ Subject: A start job for unit Ignition-Gateway.service has failed
ββ Defined-By: systemd
ββ Support: http://www.ubuntu.com/support
ββ
ββ A start job for unit Ignition-Gateway.service has finished with a failure.
ββ
ββ The job identifier is 1398 and the job result is failed.
You cannot do it from ignition.sh. The user for the process must be specified in SystemD. Which is done for you if you use the installer option to set up your gateway user. You will have to do this yourself, in an override, similar to the override needed to specify ambient capabilities.