{"action":"created","issue":{"url":"https://api.github.com/repos/docker-library/docs/issues/468","labels_url":"https://api.github.com/repos/docker-library/docs/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/docker-library/docs/issues/468/comments","events_url":"https://api.github.com/repos/docker-library/docs/issues/468/events","html_url":"https://github.com/docker-library/docs/issues/468","id":128686292,"number":468,"title":"RabbitMQ connection refused","user":{"login":"poliveira89","id":1919475,"avatar_url":"https://avatars.githubusercontent.com/u/1919475?v=3","gravatar_id":"","url":"https://api.github.com/users/poliveira89","html_url":"https://github.com/poliveira89","followers_url":"https://api.github.com/users/poliveira89/followers","following_url":"https://api.github.com/users/poliveira89/following{/other_user}","gists_url":"https://api.github.com/users/poliveira89/gists{/gist_id}","starred_url":"https://api.github.com/users/poliveira89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poliveira89/subscriptions","organizations_url":"https://api.github.com/users/poliveira89/orgs","repos_url":"https://api.github.com/users/poliveira89/repos","events_url":"https://api.github.com/users/poliveira89/events{/privacy}","received_events_url":"https://api.github.com/users/poliveira89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-26T00:49:49Z","updated_at":"2016-01-26T17:51:31Z","closed_at":null,"body":"Similar to what is told on documentation I created an container with:\r\n```bash\r\n$ docker run -d -p 5672:5672 -h myrabbit --name new-rabbit rabbitmq\r\n````\r\n\r\nIf I do `docker exec` into the container I can execute successfully `rabbitmqctl` subcommands, so I know that this containter and RabbitMQ instance is working.\r\n\r\n\r\nBut from the host I can't connect to the RabbitMQ server. \r\nI have tried with `telnet`\r\n\r\n```bash\r\n$ telnet 127.0.0.1 5672\r\nTrying 127.0.0.1...\r\ntelnet: connect to address 127.0.0.1: Connection refused\r\ntelnet: Unable to connect to remote host\r\n````\r\n\r\nI have done one of RabbitMQ tutorials: [Tutorial 1 - Hello World](https://www.rabbitmq.com/tutorials/tutorial-one-python.html)\r\nWith this change:\r\n\r\n```python\r\n# ...\r\n\r\ncred = pika.PlainCredentials('guest', 'guest')\r\nparams = pika.ConnectionParameters(\r\n    host='127.0.0.1',\r\n    port=5672,\r\n    virtual_host='/',\r\n    credentials=cred\r\n)\r\nconnection = pika.BlockingConnection(params)\r\nchannel = connection.channel()\r\n\r\n#...\r\n```\r\n\r\nThis not work either.\r\n\r\nI do even tried with [Celery](https://www.digitalocean.com/community/tutorials/how-to-use-celery-with-rabbitmq-to-queue-tasks-on-an-ubuntu-vps) example. Did not connect successfully.\r\n\r\nWhat could be missing to successfully connect into this RabbitMQ server?"},"comment":{"url":"https://api.github.com/repos/docker-library/docs/issues/comments/175140228","html_url":"https://github.com/docker-library/docs/issues/468#issuecomment-175140228","issue_url":"https://api.github.com/repos/docker-library/docs/issues/468","id":175140228,"user":{"login":"yosifkit","id":896423,"avatar_url":"https://avatars.githubusercontent.com/u/896423?v=3","gravatar_id":"","url":"https://api.github.com/users/yosifkit","html_url":"https://github.com/yosifkit","followers_url":"https://api.github.com/users/yosifkit/followers","following_url":"https://api.github.com/users/yosifkit/following{/other_user}","gists_url":"https://api.github.com/users/yosifkit/gists{/gist_id}","starred_url":"https://api.github.com/users/yosifkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosifkit/subscriptions","organizations_url":"https://api.github.com/users/yosifkit/orgs","repos_url":"https://api.github.com/users/yosifkit/repos","events_url":"https://api.github.com/users/yosifkit/events{/privacy}","received_events_url":"https://api.github.com/users/yosifkit/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T17:51:31Z","updated_at":"2016-01-26T17:51:31Z","body":"Are you on OSX or Windows?  If you are connecting from your host, you'll need to hit the virtual machine's ip address.  You can get it with `docker-machine ip default`."}}