Nukesor / pueue

:stars: Manage your shell commands.
MIT License
4.68k stars 128 forks source link

queue task killed #511

Closed b4seen closed 3 months ago

b4seen commented 3 months ago

Describe the bug

I use pueue by logging into Ubuntu via ssh as a non-root user. After adding the task and the task runs normally, close the ssh connection. Log in again after 10 minutes, check the task status, and find that the task has been killed.

Steps to reproduce

The way I run pueue's daemon in Ubuntu

  1. systemctl --user start pueued
  2. systemctl --user enable pueued

The way I use pueue Use grep command to retrieve information from log files

my operations

~$ pueue add "grep xxx ~/0314_12.log > ~/0314_12.out"
~$ pueue add "grep xxx ~/other/0314_13.log > ~/other/0314_13.out"

~$ pueue start

View task execution status

~$ puepue status

close ssh connection

~$ exit

10 minutes passed

Then use ssh to log in to ubuntu

~$ pueue status

Found that the task status shows "Killed". The task status shows that the Start time is 06:01:18 and the End time is 06:01:39.

View log

~$ pueue log

Display "Task 0: killed by system or user"

Debug logs (if relevant)

06:17:38 [INFO] Parsing config files
06:17:38 [INFO] Checking path: "/home/vick/.config/pueue/pueue.yml"
06:17:38 [INFO] Found config file at: "/home/vick/.config/pueue/pueue.yml"
06:17:38 [INFO] Placing pid file at "/run/user/1008/pueue.pid"
Error: Failed to create pid file.

Caused by:
    Pid file already exists and another daemon seems to be running.
    Please stop the daemon beforehand or delete the file manually: "/run/user/1008/pueue.pid"

Operating system

Ubuntu 22.04.4 LTS

Pueue version

v3.3.3

Additional context

No response

Nukesor commented 3 months ago

Take a look at this and see if it answers your questions :)

https://wiki.archlinux.org/title/Systemd/User#Automatic_start-up_of_systemd_user_instances

b4seen commented 3 months ago

Yes, this article solved my problem, thanks! !