Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using juju to boostrap and then deploy a service. I was able to create an instance before and deploy it, but after a few creations and deletions I am now unable to connect, ie run juju status.

Running juju -v status gets me this, any ideas?:

juju -v status 
2011-12-17 18:12:21,682 DEBUG Initializing juju status runtime
2011-12-17 18:12:21,724 INFO Connecting to environment...
2011-12-17 18:12:22,396 DEBUG Connecting to environment using
2011-12-17 18:12:22,397 DEBUG Spawning SSH process with remote_user="ubuntu" remote_host="" remote_port="2181" local_port="52821".
2011-12-17 18:12:23,407:4475(0x7fbfd3999720):ZOO_INFO@log_env@658: Client environment:zookeeper.version=zookeeper C client 3.3.3
2011-12-17 18:12:23,407:4475(0x7fbfd3999720):ZOO_INFO@log_env@662: Client
2011-12-17 18:12:23,407:4475(0x7fbfd3999720):ZOO_INFO@log_env@669: Client
2011-12-17 18:12:23,407:4475(0x7fbfd3999720):ZOO_INFO@log_env@670: Client environment:os.arch=3.0.0-15-generic
2011-12-17 18:12:23,407:4475(0x7fbfd3999720):ZOO_INFO@log_env@671: Client environment:os.version=#24-Ubuntu SMP Mon Dec 12 15:23:55 UTC 2011
2011-12-17 18:12:23,408:4475(0x7fbfd3999720):ZOO_INFO@log_env@679: Client
2011-12-17 18:12:23,408:4475(0x7fbfd3999720):ZOO_INFO@log_env@687: Client environment:user.home=/home/shazzner
2011-12-17 18:12:23,408:4475(0x7fbfd3999720):ZOO_INFO@log_env@699: Client environment:user.dir=/home/shazzner
2011-12-17 18:12:23,408:4475(0x7fbfd3999720):ZOO_INFO@zookeeper_init@727: Initiating client connection, host=localhost:52821 sessionTimeout=10000 watcher=0x7fbfd180d650 sessionId=0 sessionPasswd=<null> context=0x1a7c8d0 flags=0
2011-12-17 18:12:23,409:4475(0x7fbfcdb0f700):ZOO_INFO@check_events@1585: initiated connection to server []
2011-12-17 18:12:23,844:4475(0x7fbfcdb0f700):ZOO_ERROR@handle_socket_error_msg@1603: Socket [] zk retcode=-4, errno=112(Host is down): failed while receiving a server response
2011-12-17 18:12:27,178:4475(0x7fbfcdb0f700):ZOO_WARN@zookeeper_interest@1461: Exceeded deadline by 436ms
2011-12-17 18:12:27,178:4475(0x7fbfcdb0f700):ZOO_ERROR@handle_socket_error_msg@1579: Socket [] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2011-12-17 18:12:30,515:4475(0x7fbfcdb0f700):ZOO_ERROR@handle_socket_error_msg@1579: Socket [] zk retcode=-4, errno=111(Connection refused): server refused to accept the client

EDIT Solved: I managed to fix my connection problems by regenerating my environments.yaml file, by deleting it and running juju bootstrap again.

share|improve this question
up vote 2 down vote accepted

The general issue is that takes a minute immediately after bootstrapping before the instance is fully setup.

In the ppa/trunk this has been made a bit more automatic by having the commands after the bootstrap automatically poll/wait the instance till they can proceed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.