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

get_live_job_log doesn't work for detached jobs #786

Closed
matthewjhands opened this issue Jul 17, 2024 · 2 comments
Closed

get_live_job_log doesn't work for detached jobs #786

matthewjhands opened this issue Jul 17, 2024 · 2 comments

Comments

@matthewjhands
Copy link

matthewjhands commented Jul 17, 2024

Summary

When you create a detached job, the /api/app/get_live_job_log fn returns a no such file or directory error because it is looking for logs/jobs/$JOBID.log and not logs/jobs/$JOBID-detached.log.

Steps to reproduce the problem

  1. Create any detached job.
  2. Start the new job.
  3. Open the Job Details page for it, observe the "Live Job Event Log" is working, and returning logs.
  4. Click "View Full Log" on the right hand side of the screen.
  5. You should have been navigated to http://$PRIMARYURL/api/app/get_live_job_log?id=$JOBID, observe that the response is {"code":"job","description":"Failed to fetch job log: Error: ENOENT: no such file or directory, stat 'logs/jobs/$JOBID.log'"}
  6. Meanwhile, in a terminal run ls -la /opt/cronicle/logs/jobs/. Observe that a job log exists named logs/jobs/$JOBID-detached.log and not logs/jobs/$JOBID.log.

Your Setup

Operating system and version?

Ubuntu 22.04

Node.js version?

v20.15.0

Cronicle software version?

0.9.52

Are you using a multi-server setup, or just a single server?

Single Primary, no workers.

Are you using the filesystem as back-end storage, or S3/Couchbase?

Local FS

Can you reproduce the crash consistently?

Yes

Log Excerpts

@jhuckaby
Copy link
Owner

jhuckaby commented Jul 18, 2024

Fixed in Cronicle v0.9.56. Thanks!

Note that you'll have to upgrade Cronicle on ALL your servers for this to take effect. However, I see you're using a single primary and no workers, so that's easy then. Just a single upgrade for you. Thanks again!

https://github.com/jhuckaby/Cronicle/blob/master/docs/CommandLine.md#upgrading-cronicle

@matthewjhands
Copy link
Author

Thank you! That's great.

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