为什么我无法使用 Juju 连接到我的 ec2 实例?

为什么我无法使用 Juju 连接到我的 ec2 实例?

我正在使用 juju 来启动并部署服务。我之前能够创建一个实例并部署它,但经过几次创建和删除后,我现在无法连接,即运行 juju status。

运行 juju -v status 得到这个结果,有什么想法吗?:

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 ec2-50-19-139-160.compute-1.amazonaws.com...
2011-12-17 18:12:22,397 DEBUG Spawning SSH process with remote_user="ubuntu" remote_host="ec2-50-19-139-160.compute-1.amazonaws.com" 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 environment:host.name=SHINYO
2011-12-17 18:12:23,407:4475(0x7fbfd3999720):ZOO_INFO@log_env@669: Client environment:os.name=Linux
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 environment:user.name=(null)
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 [127.0.0.1:52821]
2011-12-17 18:12:23,844:4475(0x7fbfcdb0f700):ZOO_ERROR@handle_socket_error_msg@1603: Socket [127.0.0.1:52821] 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 [127.0.0.1:52821] 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 [127.0.0.1:52821] zk retcode=-4, errno=111(Connection refused): server refused to accept the client

编辑已解决:我设法通过重新生成我的 environment.yaml 文件、删除它并再次运行 juju bootstrap 来解决我的连接问题。

答案1

一般问题是,引导后立即需要一分钟时间才能完全设置实例。

在 ppa/trunk 中已经完成了更加自动化通过让引导后的命令自动轮询/等待实例直到它们可以继续。

相关内容