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

Anyone getting this working in WSL2? Fails at Start service due to "resources", now "exit-code" #1

Open
spcano01 opened this issue Oct 27, 2024 · 0 comments

Comments

@spcano01
Copy link

spcano01 commented Oct 27, 2024

Seems it can't find the .env file? I've tried moving:

  • .py & .env out of home, and into /etc
  • systemd .service from /etc/systemd/system into /lib/systemd/system & simlinking it
  • changing user from my WSL2 one to "root"

Almost solved it, not sure what exactly did it...went back to WSL2 user, but also reformatted .service by moving all comments to line above and removing any trailing spaces.

The error at start telegram_bot.service doesn't happen, but now getting separate error at status

telegram_bot.service - Telegram Bot Service
Loaded: loaded (/lib/systemd/system/telegram_bot.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2024-10-27 14:11:12 CDT; 2min 5s ago
Process: 1931 ExecStart=/usr/bin/python3 /etc/scripts/telegram/telegram_bot.py (code=exited, status=1/FAILURE)
Main PID: 1931 (code=exited, status=1/FAILURE)

Oct 27 14:11:12 wsl-ubuntu systemd[1]: telegram_bot.service: Scheduled restart job, restart counter is at 5.
Oct 27 14:11:12 wsl-ubuntu systemd[1]: Stopped Telegram Bot Service.
Oct 27 14:11:12 wsl-ubuntu systemd[1]: telegram_bot.service: Start request repeated too quickly.
Oct 27 14:11:12 wsl-ubuntu systemd[1]: telegram_bot.service: Failed with result 'exit-code'.
Oct 27 14:11:12 wsl-ubuntu systemd[1]: Failed to start Telegram Bot Service.
  ~ ❯ sudo systemctl start telegram_bot.service  02:13:18 PM
  ~ ❯ sudo systemctl status telegram_bot.service  02:13:38 PM
× telegram_bot.service - Telegram Bot Service
Loaded: loaded (/lib/systemd/system/telegram_bot.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2024-10-27 14:13:41 CDT; 3s ago
Process: 1951 ExecStart=/usr/bin/python3 /etc/scripts/telegram/telegram_bot.py (code=exited, status=1/FAILURE)
Main PID: 1951 (code=exited, status=1/FAILURE)

Oct 27 14:13:41 wsl-ubuntu systemd[1]: telegram_bot.service: Scheduled restart job, restart counter is at 5.
Oct 27 14:13:41 wsl-ubuntu systemd[1]: Stopped Telegram Bot Service.
Oct 27 14:13:41 wsl-ubuntu systemd[1]: telegram_bot.service: Start request repeated too quickly.
Oct 27 14:13:41 wsl-ubuntu systemd[1]: telegram_bot.service: Failed with result 'exit-code'.
Oct 27 14:13:41 wsl-ubuntu systemd[1]: Failed to start Telegram Bot Service.

@spcano01 spcano01 changed the title Anyone getting this working in WSL2? Fails at Start service due to "resources" Anyone getting this working in WSL2? Fails at Start service due to "resources", now "exit-code" Oct 27, 2024
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

1 participant