Open daviddavo opened 5 months ago
Hi @daviddavo
can you perhaps run this sql and show me the results:
-- Ident(all-page-count-tracker), Waiting, Scheduled, Running, Stuck
SELECT job.jid, job.task, job.group_, job.args, job.subject, job.submitted, job.submitter, job.priority, job.state, job.retries, job.progress, job.tracker, job.worker, job.started, job.finished
FROM job
WHERE (job.tracker = 'all-page-count-tracker' AND job.state IN ('Waiting' , 'Scheduled' , 'Running' , 'Stuck'))
(this is taken from your log output, replacing the ?
with the data at the end of line). Looking at the sql it seems to be a bug when selecting unfinished jobs. :/
I get no results:
root@b04185264929:/# psql -d dbname -f "query.sql" -U dbuser
jid | task | group_ | args | subject | submitted | submitter | priority | state | retries | progress | tracker | worker | started | finished
-----+------+--------+------+---------+-----------+-----------+----------+-------+---------+----------+---------+--------+---------+----------
(0 rows)
root@b04185264929:/# psql -d dbname -U dbuser -c 'select COUNT(*) from pg_stat_activity'
count
-------
47
(1 row)
I tried changing the query a bit:
-- Ident(all-page-count-tracker), Waiting, Scheduled, Running, Stuck
SELECT job.jid, job.task, job.group_, job.args, job.subject, job.submitted, job.submitter, job.priority, job.state, job.retries, job.progress, job.tracker, job.worker, job.started, job.finished
FROM job
WHERE (job.state != 'success')
$ psql -d dbname -f "coso.sql" -U dbuser
jid | task | group_ | args | subject | submitted | submitter | priority | state | retries | progress | tracker | worker | started | finished
-------------------------------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+----------------------------+-----------------+----------+---------+---------+----------+-------------------------------------------------+-------------+----------------------------+----------------------------
76MWnvhtsNV-CvLt1prYZJW-r5YcqbxyV29-TQXWSmBJJp4 | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"deu","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"cae_big.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"5feDvDvYsdEnUuT7FNbt5oGnXpCPDRCEdkCgfNymL23H"}}]} | cae_big.pdf | 2024-03-27 12:26:36.080979 | 1 | 0 | running | 0 | 20 | CqbJ5GFdbTC-xvPxt71tH5P-VmwmYvrDrFE-iP7GN9FjiY8 | joex1 | 2024-03-27 12:48:21.362335 |
CEcqbkUEYk6-4KtpDZd76kX-UCFuUvsDfRm-CySU1KFyaJa | full-text-index | docspell-system | {} | Create full-text index | 2024-03-27 20:31:25.970866 | docspell-system | 0 | stuck | 17 | 0 | full-text-index-tracker | joex-aerial | 2024-03-27 20:31:26.451285 | 2024-03-27 20:31:27.023648
Av381YzRMry-8hk7FHCKbEK-JYtixKq4uUK-5sZ6KFW3TZ7 | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"spa","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"es.aeat.dit.adu.eeca.catalogo.vis.Visualiza.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"3mLWVyNZ8ZFtoBHzinUNC6koVTy7bRaQBpCnnkJ5y7eN"}}]} | es.aeat.dit.adu.eeca.catalogo.vis.Visualiza.pdf | 2024-05-11 17:23:22.868502 | 1 | 0 | waiting | 0 | 40 | 6bW9ZVUwtjY-7kt8Sx2CUvP-K6esRCBfNHk-y3rvXo9FeyP | joex-suisei | 2024-05-16 21:55:55.548283 |
9DbaJHKM9mD-uujf8NJEY2P-a9JVzLR4XQN-BkZLL69FdHh | all-previews | docspell-system | {"collective":null,"storeMode":"whenmissing"} | Create preview images | 2024-05-16 21:55:54.811381 | docspell-system | 0 | waiting | 0 | 0 | generate-all-previews | | |
HmifruTDUbk-ZT9eLaQmVWi-d37ayV24UJZ-moy6qV2ARdc | all-page-count | docspell-system | {} | Create all page-counts | 2024-05-16 21:55:54.859923 | docspell-system | 0 | waiting | 0 | 0 | all-page-count-tracker | | |
Awhx2edUahK-Q2PvwpXrKXa-omXPLqr9WcG-kwDEDRyTFuJ | all-page-count | docspell-system | {} | Create all page-counts | 2024-05-16 21:55:54.864825 | docspell-system | 0 | waiting | 0 | 0 | all-page-count-tracker | | |
CUAc5PCv57A-UMx2FvQmsxn-wcpAWBGN93V-LmNuZbySm4r | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"spa","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"2024_csim_japonés_certificado.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"9j2Qite9XsqDw8udgHcpxQa2EDn2gonfVGsp8gkw8Sgm"}}]} | 2024_csim_japonés_certificado.pdf | 2024-05-20 13:59:19.362341 | 1 | 0 | waiting | 0 | 0 | J2oXTbECT5Y-yoLNQWLxALD-bC6UCQVBk1Q-nN84UjdaeP8 | | |
(7 rows)
It seems that jobs have the status with lowercase letters instead of uppercase
Can you try removing one of the all-page-count
jobs? Just pick one. Either HmifruTDUbk-ZT9eLaQmVWi-d37ayV24UJZ-moy6qV2ARdc
or Awhx2edUahK-Q2PvwpXrKXa-omXPLqr9WcG-kwDEDRyTFuJ
How can I export de original file first? It was directly sent to docspell from the scanner.
And what command should I use to delete it?
Figured it out:
DELETE
FROM job
WHERE (job.jid = 'HmifruTDUbk-ZT9eLaQmVWi-d37ayV24UJZ-moy6qV2ARdc')
-- DELETE 1
New state:
jid | task | group_ | args | subject | submitted | submitter | priority | state | retries | progress | tracker | worker | started | finished
-------------------------------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------+----------------------------+-----------------+----------+---------+---------+----------+-------------------------------------------------+-------------+----------------------------+----------------------------
76MWnvhtsNV-CvLt1prYZJW-r5YcqbxyV29-TQXWSmBJJp4 | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"deu","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"cae_big.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"5feDvDvYsdEnUuT7FNbt5oGnXpCPDRCEdkCgfNymL23H"}}]} | cae_big.pdf | 2024-03-27 12:26:36.080979 | 1 | 0 | running | 0 | 20 | CqbJ5GFdbTC-xvPxt71tH5P-VmwmYvrDrFE-iP7GN9FjiY8 | joex1 | 2024-03-27 12:48:21.362335 |
CEcqbkUEYk6-4KtpDZd76kX-UCFuUvsDfRm-CySU1KFyaJa | full-text-index | docspell-system | {} | Create full-text index | 2024-03-27 20:31:25.970866 | docspell-system | 0 | stuck | 17 | 0 | full-text-index-tracker | joex-aerial | 2024-03-27 20:31:26.451285 | 2024-03-27 20:31:27.023648
Awhx2edUahK-Q2PvwpXrKXa-omXPLqr9WcG-kwDEDRyTFuJ | all-page-count | docspell-system | {} | Create all page-counts | 2024-05-16 21:55:54.864825 | docspell-system | 0 | waiting | 0 | 0 | all-page-count-tracker | | |
CUAc5PCv57A-UMx2FvQmsxn-wcpAWBGN93V-LmNuZbySm4r | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"spa","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"2024_csim_japonés_certificado.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"9j2Qite9XsqDw8udgHcpxQa2EDn2gonfVGsp8gkw8Sgm"}}]} | 2024_csim_japonés_certificado.pdf | 2024-05-20 13:59:19.362341 | 1 | 0 | waiting | 0 | 0 | J2oXTbECT5Y-yoLNQWLxALD-bC6UCQVBk1Q-nN84UjdaeP8 | | |
9CEoMzSugib-NNbD5Pa7Wfh-cAibK6YJR2Z-BZdTDuoyMzz | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"spa","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"justificante.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"HJZAZFWAZVjiaNFsGZXHttoTJus2XdB37upjbX5wfdnS"}}]} | justificante.pdf | 2024-05-28 20:18:47.138084 | 1 | 0 | waiting | 0 | 0 | GoHAq2v2SWb-CFhtQKBaVS2-Ed2524Xt5HN-a2zLzDjM6hP | | |
Av381YzRMry-8hk7FHCKbEK-JYtixKq4uUK-5sZ6KFW3TZ7 | process-item | 1 | {"meta":{"collective":1,"itemId":null,"language":"spa","direction":null,"sourceAbbrev":"integration","folderId":null,"validFileTypes":[],"skipDuplicate":true,"fileFilter":"*","tags":[],"reprocess":false,"attachmentsOnly":false,"customData":null},"files":[{"name":"es.aeat.dit.adu.eeca.catalogo.vis.Visualiza.pdf","fileMetaId":{"collective":1,"category":"attachmentsource","id":"3mLWVyNZ8ZFtoBHzinUNC6koVTy7bRaQBpCnnkJ5y7eN"}}]} | es.aeat.dit.adu.eeca.catalogo.vis.Visualiza.pdf | 2024-05-11 17:23:22.868502 | 1 | 0 | running | 0 | 40 | 6bW9ZVUwtjY-7kt8Sx2CUvP-K6esRCBfNHk-y3rvXo9FeyP | joex-suisei | 2024-05-29 17:49:58.631804 |
(6 rows)
It seems to be working now, thanks!
But I don't know what might have caused the problem. Perhaps the fact that I have multiple joex instances under a single url?
Hey, sorry for the late reply. Yes, that is the command I meant. This job is not about processing files, so you don't need to save it somewhere first. And yes, the question is why it was inserted twice. I think it is due to the two instances starting up at the same time, there seems to be no guarding here (all just a guess, haven't had the time yet to really take a look). Both entries have been inserted only a fraction of a second apart. I'll create another issue to take a deeper look
The rest server works fine, but I can't run joex because I get the following error:
The rest server is also on the same version (v0.41.0). I've never used the nightly, so this is not a duplicate of #1642