Rabbitmq hello world connection only works on localhost (python)

I have this simple code taken from the rabbitmq tutorial (http://www.rabbitmq.com/tutorials/tutorial-one-python.html) import pika import logging logging.basicConfig() connection = pika….