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

Redis "Waiting for other jobs to finish" but there are no other jobs. #107

Open
richpav opened this issue Jun 28, 2018 · 1 comment
Open

Comments

@richpav
Copy link

richpav commented Jun 28, 2018

I have audiogram installed on a fresh Ubuntu Bionic Beaver VM. Installed exactly according to instructions. Started afresh twice already. Node version v8.10.0. Using Redis because I was getting errors like this:

info: Listening on 8888
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at load (/home/vagrant/audiogram/lib/transports/redis/fake.js:14:15)
    at hgetall (/home/vagrant/audiogram/lib/transports/redis/fake.js:45:19)
    at start (/home/vagrant/audiogram/node_modules/d3-queue/build/d3-queue.js:74:11)
    at poke (/home/vagrant/audiogram/node_modules/d3-queue/build/d3-queue.js:58:11)
    at Queue.defer (/home/vagrant/audiogram/node_modules/d3-queue/build/d3-queue.js:33:5)
    at module.exports (/home/vagrant/audiogram/server/status.js:8:6)
    at Layer.handle [as handle_request] (/home/vagrant/audiogram/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/vagrant/audiogram/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/vagrant/audiogram/node_modules/express/lib/router/route.js:112:3)

My settings/index.js has this:

module.exports = {
  workingDirectory: "/tmp/",
  storagePath: "/home/vagrant/audiogram/file-storage/",
  redisHost: "127.0.0.1",
  worker: true
};

When I try to render the page displays "Waiting for other jobs to finish, #1 in queue" but nothing happens. Deleting the Redis cache with redis-cli flushall doesn't help.

I see this error was addressed a year or two ago, but I don't see a solution that works with Ubuntu.

I have gotten this to work once or twice, but now I can't even get it to render 60 seconds of audio with Redis off.

@linyf2008
Copy link

linyf2008 commented Nov 10, 2022

It looks like that the queue is stored in a file called ".jobs" at the root. Here is how it looks like:

{"jobs":[{"id":"e2446210-6125-11ed-ade0-5980b5cd2905","created":1668105085742,"theme":{"width":1920,"height":1080,"framesPerSecond":50,"maxDuration":7200,"samplesPerFrame":150,"pattern":"bars","waveTop":675,"waveBottom":1035,"captionTop":450,"captionFont":"300 52px 'Source Sans Pro'","captionLineHeight":52,"captionLineSpacing":7,"captionLeft":200,"captionRight":1080,"name":"DL01","backgroundColor":"#fff","waveColor":"#000","captionColor":"#000","waveLeft":0,"waveRight":1920,"backgroundImageFile":null},"caption":""}],"dc58ede0-6110-11ed-9a1d-c39c8660c91b":{"status":"error","numFrames":1321,"error":"TypeError: Cannot read property 'length' of undefined"},"ed7ee200-6110-11ed-9a1d-c39c8660c91b":{"status":"error","numFrames":1062,"error":"TypeError: Cannot read property 'length' of undefined"},"ff7f7eb0-6110-11ed-9a1d-c39c8660c91b":{"status":"waveform","numFrames":45233},"6ccd5e10-6111-11ed-8a10-c7f9a1611156":{"status":"error","numFrames":4831,"error":"TypeError: Cannot read property 'length' of undefined"},"9cf3b8f0-6111-11ed-8a10-c7f9a1611156":{"status":"waveform","numFrames":45233},"3dcea100-6116-11ed-a62b-8fa1ef621a37":{"status":"error","numFrames":753,"error":"TypeError: Cannot read property 'length' of undefined"},"1c62c310-6117-11ed-a62b-8fa1ef621a37":{"status":"ready","numFrames":389,"framesComplete":389,"url":"/video/1c62c310-6117-11ed-a62b-8fa1ef621a37.mp4"},"4ae58010-6117-11ed-b7b3-1940f0a0fc72":{"status":"ready","numFrames":974,"framesComplete":974,"url":"/video/4ae58010-6117-11ed-b7b3-1940f0a0fc72.mp4"},"de3f8e90-6118-11ed-a38b-4d464bfe50ec":{"status":"ready","numFrames":753,"framesComplete":753,"url":"/video/de3f8e90-6118-11ed-a38b-4d464bfe50ec.mp4"},"8848c320-6119-11ed-b63d-af8b4bf9953c":{"status":"ready","numFrames":753,"framesComplete":753,"url":"/video/8848c320-6119-11ed-b63d-af8b4bf9953c.mp4"},"2f527350-611a-11ed-a352-bd678fbd33b6":{"status":"ready","numFrames":753,"framesComplete":753,"url":"/video/2f527350-611a-11ed-a352-bd678fbd33b6.mp4"},"e1440a10-611a-11ed-95ff-cbb7f356b2ed":{"status":"ready","numFrames":753,"framesComplete":753,"url":"/video/e1440a10-611a-11ed-95ff-cbb7f356b2ed.mp4"},"1d75d200-611d-11ed-a2f1-232c3b276d96":{"status":"ready","numFrames":753,"framesComplete":753,"url":"/video/1d75d200-611d-11ed-a2f1-232c3b276d96.mp4"},"6f973600-611d-11ed-8567-05d75b8e66b8":{"status":"ready","numFrames":753,"framesComplete":753,"url":"/video/6f973600-611d-11ed-8567-05d75b8e66b8.mp4"},"69436110-611e-11ed-8b34-1db0f433c03e":{"status":"ready","numFrames":974,"framesComplete":974,"url":"/video/69436110-611e-11ed-8b34-1db0f433c03e.mp4"},"c54139a0-611f-11ed-955f-6fc7206b7403":{"status":"ready","numFrames":414,"framesComplete":414,"url":"/video/c54139a0-611f-11ed-955f-6fc7206b7403.mp4"},"23edd3f0-6120-11ed-bb1e-8bd8f4dc7ec5":{"status":"ready","numFrames":414,"framesComplete":414,"url":"/video/23edd3f0-6120-11ed-bb1e-8bd8f4dc7ec5.mp4"},"6605b050-6120-11ed-bb1e-8bd8f4dc7ec5":{"status":"ready","numFrames":2475,"framesComplete":2475,"url":"/video/6605b050-6120-11ed-bb1e-8bd8f4dc7ec5.mp4"},"3587a310-6121-11ed-84ea-a3070402f45a":{"status":"ready","numFrames":2475,"framesComplete":2475,"url":"/video/3587a310-6121-11ed-84ea-a3070402f45a.mp4"},"2c730070-6122-11ed-9002-11020da65d55":{"status":"frames","numFrames":2475,"framesComplete":227},"51b01530-6122-11ed-99db-e771dee9daae":{"status":"frames","numFrames":974,"framesComplete":236},"c5798050-6122-11ed-a83e-4f1768c74777":{"status":"error","error":"Error: ENOENT: no such file or directory, open '/mnt/d/workspace/github/audiogram-tmp/media/audio/c5798050-6122-11ed-a83e-4f1768c74777'"},"e91cbb30-6122-11ed-b5a5-a57b6e3185c7":{"status":"error","error":"Error: ENOENT: no such file or directory, open '/mnt/d/workspace/github/audiogram-tmp/media/audio/e91cbb30-6122-11ed-b5a5-a57b6e3185c7'"},"2ff728b0-6123-11ed-b8f8-7b9b83c1ebc4":{"status":"error","error":"Error: ENOENT: no such file or directory, open '/mnt/d/workspace/github/audiogram-tmp/media/audio/2ff728b0-6123-11ed-b8f8-7b9b83c1ebc4'"},"6da96100-6123-11ed-9478-4fe238b9beff":{"status":"ready","numFrames":414,"framesComplete":414,"url":"/video/6da96100-6123-11ed-9478-4fe238b9beff.mp4"},"b0904d30-6123-11ed-a423-2535e543f759":{"status":"ready","numFrames":414,"framesComplete":414,"url":"/video/b0904d30-6123-11ed-a423-2535e543f759.mp4"},"04e5f650-6124-11ed-a801-77078ff1333e":{"status":"ready","numFrames":414,"framesComplete":414,"url":"/video/04e5f650-6124-11ed-a801-77078ff1333e.mp4"}}

So if you don't care about its unfinished tasks, just delete the file. It will automatically create a new one.

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