Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error code=exited status=203/exec #2155

Closed
zyn23 opened this issue May 22, 2024 · 9 comments
Closed

Error code=exited status=203/exec #2155

zyn23 opened this issue May 22, 2024 · 9 comments

Comments

@zyn23
Copy link

zyn23 commented May 22, 2024

I made a specific user for running ergo called "ergo" :)
When i go into this user and cd into the server direcory and run "./ergo run" everything works well... but I tried to create a service so the server would start when I turn de pc on. I do systemctl enable ergo and systemctl start ergo and dont get any error messages but when I do systemctl status ergo it shows this
ergo.service - Ergo IRC server Loaded: loaded (/etc/systemd/system/ergo.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Wed 2024-05-22 13:47:11 WEST; 4s ago Duration: 2ms Process: 3874143 ExecStart=/home/ergo/server/start.sh (code=exited, status=203/EXEC) Main PID: 3874143 (code=exited, status=203/EXEC) CPU: 1ms
I followed this guide https://landchad.net/irc/ and on the end of the "Connecting to the server" section there is a ergo.service example and I just copied and paste. (Yes the server is also on the same "server" directory like in the guide)

@slingamn
Copy link
Member

Can you check systemctl status ergo.service as per this answer: https://unix.stackexchange.com/a/490707 ?

@zyn23
Copy link
Author

zyn23 commented May 22, 2024

Same output as systemctl status ergo
image
I will check the SELinux option to see if is something related

@zyn23
Copy link
Author

zyn23 commented May 22, 2024

It is not a SELinux related problem

@slingamn
Copy link
Member

If you watch journalctl --follow while triggering the restart, do you see anything in the logs?

@zyn23
Copy link
Author

zyn23 commented May 23, 2024

image
Apparently there is an error with the format i think

@slingamn
Copy link
Member

It's probably an issue either with the shebang line in start.sh, or that start.sh is not executable: https://stackoverflow.com/a/57025791

@zyn23
Copy link
Author

zyn23 commented May 23, 2024

That fixed it! Thanks a lot! It was the shebang line. I wasn't specifying the shell

@zyn23 zyn23 closed this as completed May 23, 2024
@slingamn
Copy link
Member

Thanks! I should try and contact the Landchad maintainers to remove the start.sh recommendation, our suggested systemd unit file just points ExecStart directly at the ergo binary:

https://github.com/ergochat/ergo/blob/ca4b9c15c5c7e6009cd907e24fe31c2bf48a2083/distrib/systemd/ergo.service

@slingamn
Copy link
Member

@termermc ^ thanks for your work on the landchad guide! Would you be able to update the guide according to the above recommendation? I think you would just have to delete the instruction to create start.sh, and then replace the current ExecStart with:

ExecStart=/home/ergo/server/ergo run

since you're already setting WorkingDirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants