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

connect to rabbitmq error on Ubuntu 14.04 #37

Closed
zhao0 opened this issue Feb 14, 2015 · 7 comments
Closed

connect to rabbitmq error on Ubuntu 14.04 #37

zhao0 opened this issue Feb 14, 2015 · 7 comments

Comments

@zhao0
Copy link

zhao0 commented Feb 14, 2015

Hi,
I install it following README step by step,but when I test the API,I got a error :Unable to perform OCR decode. Error: dial tcp 127.0.0.1:5672: connection refused.

here is my docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
113840c08653 tleyden5iwx/open-ocr:latest open-ocr-worker -amq 11 seconds ago Up 10 seconds stoic_pike
5b7c8a8d9340 tleyden5iwx/open-ocr:latest open-ocr-httpd -amqp 14 seconds ago Up 12 seconds 0.0.0.0:8080->8080/tcp evil_lalande
090b2f66c809 tutum/rabbitmq:latest /run.sh 46 seconds ago Up 45 seconds 0.0.0.0:5672->5672/tcp, 0.0.0.0:15672->15672/tcp nostalgic_brown

@tleyden
Copy link
Owner

tleyden commented Feb 14, 2015

5672,eaddrinuse means you have something (RabbitMQ?) already listening on that port.

@zhao0
Copy link
Author

zhao0 commented Feb 15, 2015

I just install it on a new machine

@wicope
Copy link

wicope commented Jul 16, 2016

Hi,
https://docs.docker.com/compose/startup-order/

depends_on:
  - "rabbitmq"

@zhao0 zhao0 closed this as completed Jul 16, 2016
@tleyden
Copy link
Owner

tleyden commented Jul 16, 2016

Thanks @wicope! That's a much cleaner approach than the current docker compose file

@wicope
Copy link

wicope commented Jul 28, 2016

docker ps -a
c30dd164a980        tleyden5iwx/open-ocr                "/opt/open-ocr/open-o"   18 minutes ago      Exited (2) 17 minutes ago                            dockercompose_openocrworker_1
docker logs c30dd164a980
14:12:13.176167 OCR_WORKER: Creating new OCR Worker
14:12:13.185760 OCR_WORKER: Run() called...
14:12:13.186077 OCR_WORKER: dialing "amqp://admin:Cdoe4O8oOalghout4FR4cqfx@rabbitmq/"
14:12:13.322935 OCR_WORKER: error connecting to rabbitmq dial tcp 172.18.0.2:5672: connection refused
14:12:13.323108 PANIC: Error running worker: dial tcp 172.18.0.2:5672: connection refused -- main.main() at main.go:36
panic: Error running worker: dial tcp 172.18.0.2:5672: connection refused
...

https://github.com/docker/compose/blob/master/docs/compose-file.md#depends_on

Controlling startup order in Compose
https://docs.docker.com/compose/startup-order/
https://github.com/docker/compose/blob/master/docs/startup-order.md
https://github.com/vishnubob/wait-for-it
https://github.com/jwilder/dockerize
http://www.onegeek.com.au/articles/waiting-for-dependencies-in-docker-compose
docker/compose#374

@tleyden tleyden reopened this Jul 28, 2016
@tleyden
Copy link
Owner

tleyden commented Jul 28, 2016

Would be great if someone could do pull request to fix the docker compose file

@tleyden
Copy link
Owner

tleyden commented Oct 10, 2017

@tleyden tleyden closed this as completed Oct 10, 2017
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

3 participants