web-dev-qa-db-ja.com

MAAS無効なSSHキー

Ubuntu 12.04でOpenStackのMAASをセットアップしたいと思います。

すべてがうまくいく:

marcel@ubuntu20:~$ juju status
2012-07-09 13:00:02,559 INFO Connecting to environment...
The authenticity of Host 'node1 (10.110.11.71)' can't be established.
ECDSA key fingerprint is 29:42:2c:7a:ef:52:d4:f8:63:51:d8:a1:1e:a9:16:0e.
Are you sure you want to continue connecting (yes/no)? yes
2012-07-09 13:00:05,883 ERROR Invalid SSH key

私はこの問題がバグであるかどうかわからないが、実用的な解決策を見つけることができなかった人をもっと読んだ...

同じ問題を伴うこの投稿 と読みました。

ノードにアクセスできるルートユーザーをこのファイルに追加しました。

/var/lib/cobbler/kickstarts/maas.preseed:

これでノードにアクセスでき、パスワードを使用してユーザーubuntuを作成し、キーをコピーしました。

今、私は思ったより少し良く見えます。

marcel@ubuntu20:~$ juju status
2012-07-09 15:43:12,130 INFO Connecting to environment...
Warning: the ECDSA Host key for 'node1' differs from the key for the IP address '10.110.11.71'
Offending key for IP in /home/marcel/.ssh/known_hosts:1
Matching Host key in /home/marcel/.ssh/known_hosts:8
Are you sure you want to continue connecting (yes/no)? yes

よく見ると、この問題がわかります。

marcel@ubuntu20:~$ juju -v status
2012-07-09 15:36:49,458 DEBUG Initializing juju status runtime
2012-07-09 15:36:49,469 INFO Connecting to environment...
2012-07-09 15:36:49,588 DEBUG Connecting to environment using node1...
2012-07-09 15:36:49,589 DEBUG Spawning SSH process with remote_user="ubuntu" remote_Host="node1" remote_port="2181" local_port="43964".
Warning: the ECDSA Host key for 'node1' differs from the key for the IP address '10.110.11.71'
Offending key for IP in /home/marcel/.ssh/known_hosts:1
Matching Host key in /home/marcel/.ssh/known_hosts:8
Are you sure you want to continue connecting (yes/no)? yes
2012-07-09 15:36:53,098:16474(0x7f0c16d58700):Zoo_INFO@log_env@658: Client environment:zookeeper.version=zookeeper C client 3.3.5
2012-07-09 15:36:53,098:16474(0x7f0c16d58700):Zoo_INFO@log_env@662: Client environment:Host.name=ubuntu20
2012-07-09 15:36:53,098:16474(0x7f0c16d58700):Zoo_INFO@log_env@669: Client environment:os.name=Linux
2012-07-09 15:36:53,098:16474(0x7f0c16d58700):Zoo_INFO@log_env@670: Client environment:os.Arch=3.2.0-23-generic
2012-07-09 15:36:53,098:16474(0x7f0c16d58700):Zoo_INFO@log_env@671: Client environment:os.version=#36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012
2012-07-09 15:36:53,099:16474(0x7f0c16d58700):Zoo_INFO@log_env@679: Client environment:user.name=marcel
2012-07-09 15:36:53,099:16474(0x7f0c16d58700):Zoo_INFO@log_env@687: Client environment:user.home=/home/marcel
2012-07-09 15:36:53,099:16474(0x7f0c16d58700):Zoo_INFO@log_env@699: Client environment:user.dir=/home/marcel
2012-07-09 15:36:53,099:16474(0x7f0c16d58700):Zoo_INFO@zookeeper_init@727: Initiating client connection, Host=localhost:43964 sessionTimeout=10000 watcher=0x7f0c14b886b0 sessionId=0 sessionPasswd=<null> context=0x367e940 flags=0
2012-07-09 15:36:53,100:16474(0x7f0c118e2700):Zoo_INFO@check_events@1585: initiated connection to server [127.0.0.1:43964]
2012-07-09 15:36:53,100:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1603: Socket [127.0.0.1:43964] zk retcode=-4, errno=112(Host is down): failed while receiving a server response
2012-07-09 15:36:56,434:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:36:59,770:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:37:03,107:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:37:06,443:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:37:09,779:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:37:13,116:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:37:16,452:16474(0x7f0c118e2700):Zoo_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:43964] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
2012-07-09 15:37:19,589 DEBUG Retrying connection: Cannot connect to environment using node1 (perhaps still initializing): could not connect before timeout after 1 retries
2012-07-09 15:37:19,708 DEBUG Connecting to environment using node1...
2012-07-09 15:37:19,708 DEBUG Spawning SSH process with remote_user="ubuntu" remote_Host="node1" remote_port="2181" local_port="60742".
Warning: the ECDSA Host key for 'node1' differs from the key for the IP address '10.110.11.71'
Of
1
keamas

Jujuでデプロイする場合、SSHキーを手動で追加する必要はありません。展開の段階で失敗する可能性のあるものがいくつかあります(そして、問題を軽減するためにいくつかの修正をバックポートしています)。こちらをご覧ください https://answers.launchpad.net/maas/+faqs 最初の2つのFAQのいずれかが当てはまるかどうかを確認してください。

2
bigjools

Jujuは別の名前のユーザーではなく、MaaSユーザー「root」を使用したいようです-確認するためにエラーを繰り返していないことに注意してください...

最初のテストロールアウト中に無効なSSHキーメッセージが表示されました(2013年3月11日)-上記の時間の問題を確認して、使用できないことを確認しました。

最初のMaaSインストールで、ルート以外の名前のMaaSユーザーを作成し、JuJuをインストールし、このエラーを過ぎてJuJuを取得しようとしました-

無効なSSHキーの問題を解決するために、MaaSで「root」という名前のユーザーを作成しました。

Sudo ssh-keygen -t rsaフォルダー〜/ .ssh/id_rsa(/home/MyUbuntuLoginName/.ssh/id_rsa-/root/.ssh/id_rsaのSudoデフォルトではありません)

chmod 777 ~/.ssh/(これが必要かどうかわからない-明らかに安全ではない)

Sudo cat ~/.ssh/id_rsa.pubおよびMaaS Web GUIの結果をroot/preferences/add sshキーにコピーします

ルートのMaaSキーを/home/MyUbuntuLoginName/environment.yamlファイルにコピーしました

Sudo juju bootstrap-マシンがオンラインになるまで待機します(おそらく長い時間)

Sudo juju status

プロンプトが表示されたらyesと入力して証明書を受け入れます

成功!

繰り返しますが、これが根本的な原因であることを確認するために問題を繰り返していません...

ミクロドット

1
Mikrodots