tleyden / open-ocr

Run your own OCR-as-a-Service using Tesseract and Docker
Apache License 2.0
1.33k stars 223 forks source link

RPC Timeout #22

Closed jtgreen closed 9 years ago

jtgreen commented 9 years ago

This may be an easy one. Im simply trying to run the stoke width transform. The setup works great for straight tesseract, but when I run the test curl for the stoke width transform, I get an RPC timeout. My suspicion is my box is taking too long with the transform so the RPC is kicking back that general network error thinking the call had failed (it not knowing if its a slow network or what).

Here is the error: john@...$ curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://bit.ly/ocrimage-swt","engine":"tesseract", "preprocessors":["stroke-width-transform"]}' http://${DOCKER_HOST}:${HTTP_PORT}/ocr

Unable to perform OCR decode. Error: Timeout waiting for RPC response Thoughts? Thanks!
tleyden commented 9 years ago

I have a feeling the stroke width transform phase might be failing completely, and so the httpd daemon never gets a result on the message queue.

Are there any logs on the worker doing the stroke width transform? On the host OS where you kicked off the docker container, run docker logs <container id>

jtgreen commented 9 years ago

Thanks, Ill check it out. I must say, im completely unfamiliar with docker (I had looked into your great project for this feature I saw on the tesseract mailing list). 

Ill sleuth out what I can and post back.

JG

— Sent from Mailbox

On Fri, Nov 21, 2014 at 7:02 PM, Traun Leyden notifications@github.com wrote:

I have a feeling the stroke width transform phase might be failing completely, and so the httpd daemon never gets a result on the message queue.

Are there any logs on the worker doing the stroke width transform? On the host OS where you kicked off the docker container, run docker logs <container id>

Reply to this email directly or view it on GitHub: https://github.com/tleyden/open-ocr/issues/22#issuecomment-64057253

tleyden commented 9 years ago

What platform are you running it on? GCE, Tutum, local Vagrant? I may be able to give some guidance.

jtgreen commented 9 years ago

Im very sorry. I literally forgot to set the environment variable for the password. So you were right: it was completely failing on the server, butsimply  because of credentials! 

Turned out to be nothing but Im very excited about your project,

Thank you for your prompt responses and kind willingness to help,

John

— Sent from Mailbox

On Fri, Nov 21, 2014 at 7:26 PM, Traun Leyden notifications@github.com wrote:

What platform are you running it on? GCE, Tutum, local Vagrant? I may be able to give some guidance.

Reply to this email directly or view it on GitHub: https://github.com/tleyden/open-ocr/issues/22#issuecomment-64059113

tleyden commented 9 years ago

@jtgreen thanks, I'll close the ticket. Can you let me know how you are kicking things off? Are you using https://github.com/tleyden/open-ocr/blob/master/launcher/launcher.sh? It's supposed to check for the password environment variable and fail if it's not defined.

I'm just wondering how I can improve things to help other users running into the same problem.

kimmobrunfeldt commented 9 years ago

I'm getting this same error but I have set the password. Worker logs don't have anything

kimmobrunfeldt commented 9 years ago

I didn't have the preprocessor worker started as documented here https://github.com/tleyden/open-ocr/wiki/Stroke-Width-Transform#start-an-additional-worker

Same as this issue: https://github.com/tleyden/open-ocr/issues/24

tleyden commented 9 years ago

@kimmobrunfeldt can you open a new issue instead of using this one? (since it's closed)

kimmobrunfeldt commented 9 years ago

@tleyden sorry I thought my issue related to this. But I got that solved by following instructions in issue thread #24.