出于测试目的,我在一个VirtualBox VM中安装了MAAS,并希望它启动第二个VM。
这两个VM都连接到一个VirtualBox内部网络。
MAAS VM是一个UbuntuServer14.04.2,我安装了1.7.5+ and 3369-0ubuntu1~trusty1 1版本的以下软件包:
maas
maas-region-controller
maas-cluster-controller
maas-dhcp
maas-dns在MAAS的“图片”部分,我从默认存档(http://archive.ubuntu.com/ubuntu)中添加了14.04LTS图像。然后,默认集群(“集群主”)能够成功地同步。
在MAAS上,我还用ssh-keygen生成ssh键,并将它们保存在默认位置(~/.ssh/)。然后,在GUI的用户首选项部分,我添加了SSH公钥。
在GUI的“集群”部分,我向“集群主”添加了一个界面(eth2),并将其配置为管理dhcp和dns。接口eth2连接到另一个VM (通过VirtualBox内部网络)。
在GUI中,我向“默认集群”添加了一个节点,并将"Power类型“保留为空白,因为Lan上的Wake不适用于VirtualBox。
手动启动客户端VM之后,它将获得一个ip地址,并成功地开始启动过程。然而,在某个时刻,它挂起整整120秒,下面的消息多次重复:
url_helper.py警告:调用“http://169.254.169.254/2009-04-04/meta-data/instance-id”失败的70/120 S:请求错误[HTTPConnectionPool(主机=‘169.254.269.254’,port=80):最大重试超过url: /2009-04-04/meta/实例-id(由:Errno 101网络无法访问)]
在网上阅读了这篇文章之后,我发现由于这是Ubuntu的云映像,所以它正在尝试检索实例元数据。
1)我将如何阻止这种行为?
2)如何运行元数据(云-init?)服务(在哪里?)(关于MAAS VM?)来提供实例元数据?
我不确定这是否与第一个问题有关。120 s之后,启动过程将继续进行,我将收到一个登录提示。在网上阅读后,我发现我不能在本地登录。相反,我必须通过ssh与公钥身份验证连接。如上所述,我已经生成ssh键并将它们添加到MAAS中,但是我的ssh连接被拒绝。
test@ubuntuServer1404:~$ ssh ubuntu@192.168.7.101 -v
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.7.101 [192.168.7.101] port 22.
debug1: Connection established.
debug1: identity file /home/test/.ssh/id_rsa type 1
debug1: identity file /home/test/.ssh/id_rsa-cert type -1
debug1: identity file /home/test/.ssh/id_dsa type -1
debug1: identity file /home/test/.ssh/id_dsa-cert type -1
debug1: identity file /home/test/.ssh/id_ecdsa type -1
debug1: identity file /home/test/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/test/.ssh/id_ed25519 type -1
debug1: identity file /home/test/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 06:16:8e:d2:22:3a:0b:67:64:3d:7b:17:69:fb:ee:29
debug1: Host '192.168.7.101' is known and matches the ECDSA host key.
debug1: Found key in /home/test/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/test/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/test/.ssh/id_dsa
debug1: Trying private key: /home/test/.ssh/id_ecdsa
debug1: Trying private key: /home/test/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).任何帮助都是非常感谢的。谢谢。
发布于 2016-11-14 06:49:32
我也遇到了同样的问题,这是因为maas配置了不正确的IP (在我第一次构建机器时是DHCP )。问题在运行后得到了解决。
dpkg-reconfigure maas-region-controller 并提供正确的IP。
https://askubuntu.com/questions/641454
复制相似问题