Closed alexproca closed 9 years ago
You should see something like the following output in your OCR_WORKER logs:
23:58:02.389856 OCR_WORKER: Creating new OCR Worker
23:58:02.390277 OCR_WORKER: Run() called...
23:58:02.390316 OCR_WORKER: dialing "amqp://xxx:yyy@162.222.178.49/"
23:58:17.427673 OCR_WORKER: got Connection, getting Channel
23:58:17.455394 OCR_WORKER: binding to: decode-ocr
and the fact that you are not seeing this tells me that the OCR_WORKER is either connecting to the wrong rabbitmq uri, or is trying to connect before its launched.
To test a workaround, can you add some "sleeps" somehow in your fig config for the OCR_WORKER? Make it sleep for 30s before trying to startup. I guess the long term fix might be to have a timeout and a retry loop in the go code when it connects to rabbit.
I think the log message "OCR_CLIENT: ocrRequest before: ImgUrl: ," is misleading, lets ignore that for now.
Once we get this working, I'll add the fig file to the repo/docs. Thanks for contributing that!
and the fact that you are not seeing this tells me
I mean, the fact that you are not seeing these two lines:
23:58:17.427673 OCR_WORKER: got Connection, getting Channel
23:58:17.455394 OCR_WORKER: binding to: decode-ocr
I can add command in worker command: sleep 30;open-ocr-worker -amqp_uri ...
The 30 seconds delay was the problem. I figured it out and made a pull reqest #33 with fig configuration
Thanks!
I added a ticket to address the retry issue: https://github.com/tleyden/open-ocr/issues/34, at which point we can remove the ugly workaround.
Also, do you have any instructions on how to use the fig files? (I've never used fig, but have heard a lot about it).
I will write in readme how to start with open-ocr with fig but first I would like to add stroke width preprocessor into fig configuration.
Ok great
Hello,
I created a fig file which does the same as setup.sh but when I try to call the rest service it seems like the
img_url
is not passed correctly.Fig file:
Curl request:
Open OCR output:
It seems like the
img_url
is not parsed from request bodyopenocr_1 | 22:09:13.255899 OCR_CLIENT: ocrRequest after: ImgUrl: , EngineType: ENGINE_TESSERACT, Preprocessors: []