dshearer / jobber

An alternative to cron, with sophisticated status-reporting and error-handling
https://dshearer.github.io/jobber/
MIT License
1.4k stars 78 forks source link

failed to launch runner: jobberrunner exited prematurely #307

Open MCOfficer opened 4 years ago

MCOfficer commented 4 years ago

Hello, since a couple days after updating to v1.4.4 i have the following issue:

❯ sudo service jobber status
● jobber.service - Replacement for cron, with sophisticated status-reporting and error-handling
   Loaded: loaded (/lib/systemd/system/jobber.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-06-14 15:27:31 CEST; 3s ago
 Main PID: 3018 (jobbermaster)
    Tasks: 17 (limit: 4915)
   CGroup: /system.slice/jobber.service
           └─3018 /usr/lib/x86_64-linux-gnu/jobbermaster

Jun 14 15:27:31 mcofficer-me jobbermaster[3018]: goroutine 18 [running]:
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]: main.(*JobManager).replaceCurrJobfile(0xc0000b6090, 0xc000178090)
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]:         /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:104 +0x15a
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]: main.(*JobManager).loadJobfile(0xc0000b6090, 0x4, 0xc00003c780)
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]:         /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:184 +0xa4
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]: main.(*JobManager).runMainThread.func1(0xc0000b6090)
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]:         /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:243 +0x9b
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]: created by main.(*JobManager).runMainThread
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]:         /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:235 +0xe7
Jun 14 15:27:31 mcofficer-me jobbermaster[3018]: Failed to launch runner for mcofficer: jobberrunner for mcofficer exited prematurely.

This happens whenever i try to launch jobber. Consequentially, none of my cron jobs are currently running.

This is jobber v1.4.4 on ubuntu 18.04, installed via the .deb. I already tried to purge and reinstall jobber, no dice. If you need any other information, just ask.

MCOfficer commented 4 years ago

After running sudo /usr/lib/x86_64-linux-gnu/jobbermaster, the issue is apparently

Restarting runner for mcofficer                                                                                                                                                                                                                                     
Runner for mcofficer exited with error: exit status 2
Error loading jobfile. Reloading previous one. Invalid 'hour' value: cannot be greater than 23.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7dd81a]

goroutine 34 [running]:                                                                                                                                                                                                                                                       
main.(*JobManager).replaceCurrJobfile(0xc000228090, 0xc0001a80f0)                                                                                                                                                                                                             
        /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:104 +0x15a                                                                                                                                                                                                
main.(*JobManager).loadJobfile(0xc000228090, 0x4, 0xc000036780)                                                                                                                                                                                                               
        /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:184 +0xa4
main.(*JobManager).runMainThread.func1(0xc000228090)
        /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:243 +0x9b
created by main.(*JobManager).runMainThread
        /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:235 +0xe7
Failed to launch runner for mcofficer: jobberrunner for mcofficer exited prematurely.

So yes, it was just a bad config. A more accessable log would go a long way in these situations, maybe the daemon can log to /var/log/?

dshearer commented 4 years ago

Yeah...

On Jun 23, 2020, at 4:56 AM, MCOfficer notifications@github.com wrote:

 After running sudo /usr/lib/x86_64-linux-gnu/jobbermaster, the issue is apparently

Restarting runner for mcofficer
Runner for mcofficer exited with error: exit status 2 Error loading jobfile. Reloading previous one. Invalid 'hour' value: cannot be greater than 23. panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x7dd81a]

goroutine 34 [running]:
main.(JobManager).replaceCurrJobfile(0xc000228090, 0xc0001a80f0)
/home/runner/work/jobber/jobber/jobberrunner/job_manager.go:104 +0x15a
main.(
JobManager).loadJobfile(0xc000228090, 0x4, 0xc000036780)
/home/runner/work/jobber/jobber/jobberrunner/job_manager.go:184 +0xa4 main.(JobManager).runMainThread.func1(0xc000228090) /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:243 +0x9b created by main.(JobManager).runMainThread /home/runner/work/jobber/jobber/jobberrunner/job_manager.go:235 +0xe7 Failed to launch runner for mcofficer: jobberrunner for mcofficer exited prematurely. So yes, it was just a bad config. A more accessable log would go a long way in these situations, maybe the daemon can log to /var/log/?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

egorsmkv commented 2 years ago

I also have this issue. Found this solution: to delete all files in /var/log/jobber and restart the jobbermaster service.

tennox commented 2 years ago

Yeah... :rofl:

@dshearer My go skills are too absent to be sure, but I suspect assigning a new value to the variable and then trying to use the old value does not work:

self.jfile, err = jfile.Activate(self.user)
if err != nil {
    self.jobRunner.Start(self.jfile.Jobs, self.Shell)

source