500 error when converting PDF #46
Comments
The error happens within the GROBID container. Could you please run it separately: docker run --rm --add-host api.crossref.org:127.0.0.1 -p 8070:8070 lfoppiano/grobid:0.5.1 and then: curl -v --form input=@elife-32671-v2.pdf --form consolidateHeader=0 \
--form consolidateCitations=0 \
localhost:8070/api/processFulltextDocument Can you reproduce the problem just using GROBID? What is your platform you are running it on? |
The grobid container exits curl logs$ curl -v --form input=@elife-32671-v2.pdf -form consolidateHeader=0 \ --form consolidateCitations=0 \ localhost:8070/api/processFulltextDocument * Rebuilt URL to: consolidateHeader=0/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Could not resolve host: consolidateHeader=0 * Closing connection 0 curl: (6) Could not resolve host: consolidateHeader=0 * Trying ::1... * Connected to localhost (::1) port 8070 (#1) > POST /api/processFulltextDocument HTTP/1.1 > Host: localhost:8070 > User-Agent: curl/7.43.0 > Accept: */* > Content-Length: 6429644 > Expect: 100-continue > Content-Type: multipart/form-data; boundary=------------------------5fd1cdfd8599ce92 > < HTTP/1.1 100 Continue * Empty reply from server * Connection #1 to host localhost left intact curl: (52) Empty reply from server grobid container logsINFO [2018-05-16 15:43:49,190] org.grobid.core.factory.GrobidPoolingFactory: Number of Engines in pool active/max: 1/10 INFO [2018-05-16 15:43:49,218] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/fulltext/model.wapiti (size: 20462507) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/fulltext/model.wapiti" Model path: /opt/grobid/grobid-home/models/fulltext/model.wapiti INFO [2018-05-16 15:43:52,208] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/segmentation/model.wapiti (size: 15807193) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/segmentation/model.wapiti" Model path: /opt/grobid/grobid-home/models/segmentation/model.wapiti INFO [2018-05-16 15:43:56,820] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/figure/model.wapiti (size: 680116) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/figure/model.wapiti" Model path: /opt/grobid/grobid-home/models/figure/model.wapiti [Wapiti] Loading model: "/opt/grobid/grobid-home/models/header/model.wapiti" INFO [2018-05-16 15:43:57,167] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/header/model.wapiti (size: 36094028) Model path: /opt/grobid/grobid-home/models/header/model.wapiti INFO [2018-05-16 15:44:02,854] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/name/header/model.wapiti (size: 2225578) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/name/header/model.wapiti" Model path: /opt/grobid/grobid-home/models/name/header/model.wapiti INFO [2018-05-16 15:44:03,094] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/name/citation/model.wapiti (size: 393118) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/name/citation/model.wapiti" Model path: /opt/grobid/grobid-home/models/name/citation/model.wapiti INFO [2018-05-16 15:44:03,521] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/affiliation-address/model.wapiti (size: 2646298) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/affiliation-address/model.wapiti" Model path: /opt/grobid/grobid-home/models/affiliation-address/model.wapiti [Wapiti] Loading model: "/opt/grobid/grobid-home/models/date/model.wapiti" INFO [2018-05-16 15:44:06,343] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/date/model.wapiti (size: 102435) Model path: /opt/grobid/grobid-home/models/date/model.wapiti INFO [2018-05-16 15:44:06,603] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/citation/model.wapiti (size: 16235248) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/citation/model.wapiti" Model path: /opt/grobid/grobid-home/models/citation/model.wapiti INFO [2018-05-16 15:44:14,332] org.grobid.core.jni.WapitiModel: Loading model: /opt/grobid/grobid-home/models/reference-segmenter/model.wapiti (size: 4829569) [Wapiti] Loading model: "/opt/grobid/grobid-home/models/reference-segmenter/model.wapiti" Model path: /opt/grobid/grobid-home/models/reference-segmenter/model.wapiti I'm using Docker 18.03.1-ce-mac65 on OSX 10.11 with > 50GB free space. 😕 |
Apologies, a hyphen in front of one of the --form parameters got lost. I updated my previous comment. |
Same result: empty reply and grobid container exits with code |
Could you send over the logs for that please? (in the previous logs it was not able to resolve 'consolidateHeader' due to the parameter issue) |
curl
grobid
|
This issue moby/moby#21083 suggests that you might be able to solve it by increasing the memory allocation for docker. You could also decrease the Java heap (1g is what the ScienceBeam docker compose file is using):
|
Aha! Increasing the Java memory fixed it for the Grobid container when running solo. And doubling Docker's memory to 4GB appears to have fixed it when running through ScienceBeam. Thanks! 👍 🎉 🍷 |
Hi, i need reopen it; have same problem:
in my docker yaml have added:
I have tried also run grobid and sciencebeam from command line but i have same error Docker full logs of Grobid is here How can resolve? Thanks |
Are you on a Mac too? If so, have you increased the memory for Docker? |
Ok, up memory from 4Gb to 12Gb now working |
* added name header model * added name-header api route * filter name author using header model * added SegmentedModelNestedBluePrint * added TestLayoutDocumentLabelResult * refactored test_should_filter_by_line_without_token * implemented filtering by layout token * using id for line filtering * minor optmisation * updated readme * extract authors from header * added test_should_add_authors * replace raw authors with author * parse author forename surnames * minor optimisation using set * initial extraction of author names to tei * added note type for author output * split authors * moved to separate extractor * added simple extraction test * parse combine raw authors block * renamed sur_name to surname * added support for title, middle name and suffix * renamed label to marker * handle marker at the beginning * handle multiple markers at the end * using public model * implemented name model features
Steps to reproduce
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
git clone https://github.com/elifesciences/sciencebeam.git
docker-compose up
curl "https://elifesciences.org/download/aHR0cHM6Ly9jZG4uZWxpZmVzY2llbmNlcy5vcmcvYXJ0aWNsZXMvMzI2NzEvZWxpZmUtMzI2NzEtdjIucGRm/elife-32671-v2.pdf?_hash=nrG1HRdFl4DZPdYxrP0OOJfOcyNJrkWHhR5HiBe0O4M%3D" > elife-32671-v2.pdf
curl -XPOST --data-binary @elife-32671-v2.pdf -v -H "content-type: application/octet-stream" http://localhost:8075/api/convert\?filename=elife-32671-v2.pdf
Expected
Returns JATS XML
Actual
Sometimes it returns the JATS but sometimes it returns a HTTP 500 error. Usually the first request after starting the container succeeds and the second one fails but this is not entirely consistent.
ScienceBeam logs for failed request
The text was updated successfully, but these errors were encountered: