Imapsync traceback stopping or removing task

NethServer Version: 8
Module: imapsync

I have 3 Imapsync tasks that are hung. I can’t do a stop or delete the tasks. I’m getting a traceback:

<7>run-imapsync stop amb_qnyj6d
Traceback (most recent call last):
File “/home/imapsync1/.config/actions/stop-task/50stop-service”, line 16, in
agent.run_helper(“run-imapsync”, “stop”,localuser+‘_’+task_id).check_returncode()
File “/usr/lib64/python3.11/subprocess.py”, line 502, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command ‘(‘run-imapsync’, ‘stop’, ‘amb_qnyj6d’)’ returned non-zero exit status 1.

Is there any way I can manually delete the jobs?

Yes, you can stop a single task or all tasks.

I get the traceback when I try to delete the jobs. They won’t go away.

I’ve tried restarting the imapsync app, and even tried restarting the server.

To remove for example the following task entry:

Enter the imapsync app environment…

runagent -m imapsync1

…and remove the task. Combine the local user name with the task ID like “buck_w0wwit”:

rm imapsync/buck_w0wwit.*
1 Like

That did it. Thank you. I’m still getting used to containers.

1 Like

If the tasks you deleted were setup to run in a time interval, please also check the cron folder and delete the related .cron files, like for example cron/buck_w0wwit.cron
Just to keep the system clean and avoid errors.

Maybe helpful: Howto manage or customize NS8 podman containers

They weren’t timed, but that’s a good tip to remember.

1 Like

yep a find could help

find . -iname *w0wwit*

you could combine find and rm also

1 Like