MAAS/VirtualBox 'http://169.254.169.254/2009-04-04/meta-data/instance-id' 호출이 실패하고 SSH가 실패합니다.

MAAS/VirtualBox 'http://169.254.169.254/2009-04-04/meta-data/instance-id' 호출이 실패하고 SSH가 실패합니다.

설정

테스트 목적으로 VirtualBox VM에 MAAS를 설치했고 두 번째 VM을 PXE 부팅하도록 하려고 합니다.

두 VM 모두 VirtualBox 내부 네트워크에 연결되어 있습니다.

MAAS VM은 Ubuntu Server 14.04.2이고 다음 패키지의 버전 1.7.5+bzr3369-0ubuntu1~trusty1을 설치했습니다.

maas
maas-region-controller
maas-cluster-controller
maas-dhcp
maas-dns

MAAS GUI의 "이미지" 섹션에서 기본 아카이브(http://archive.ubuntu.com/ubuntu). 그러면 기본 클러스터("클러스터 마스터")가 성공적으로 동기화될 수 있습니다.

MAAS VM에서도 ssh 키를 생성하여 ssh-keygen기본 위치(~/.ssh/)에 저장했습니다. 그런 다음 GUI의 사용자 기본 설정 섹션에 SSH 공개 키를 추가했습니다.

GUI의 "Clusters" 섹션에서 "Cluster Master"에 인터페이스(eth2)를 추가하고 dhcp 및 dns를 관리하도록 구성했습니다. 인터페이스 eth2는 VirtualBox 내부 네트워크를 통해 다른 VM에 연결됩니다.

GUI에서는 Wake On Lan이 VirtualBox에서 작동하지 않기 때문에 "기본 클러스터"에 노드를 추가하고 "전원 유형"을 비워 두었습니다.

질문

클라이언트 VM을 수동으로 시작한 후 IP 주소를 획득하고 부팅 프로세스를 성공적으로 시작합니다. 그러나 어떤 시점에서는 다음 메시지가 여러 번 반복되면서 120초 동안 정지됩니다.

url_helper.py[경고]: ' 호출 중http://169.254.169.254/2009-04-04/meta-data/instance-id' 실패 [70/120s]: 요청 오류 [HTTPConnectionPool(host='169.254.269.254', port=80): 최대 재시도가 URL: /2009-04-04/meta-data/instance-id로 초과되었습니다(원인: [Errno 101] 네트워크에 연결할 수 없습니다.)]

온라인에서 이 내용을 읽은 후 이것이 Ubuntu의 클라우드 이미지이기 때문에 인스턴스 메타데이터를 검색하려고 한다는 것을 알게 되었습니다.

1) 이 동작을 비활성화하려면 어떻게 해야 합니까?

2) 인스턴스 메타데이터를 제공하기 위해 메타데이터(cloud-init?) 서비스(그리고 MAAS VM의 위치)를 어떻게 실행합니까?

이것이 첫 번째 문제와 관련이 있는지 확실하지 않습니다. 120초가 지나면 부팅 프로세스가 다시 시작되고 로그인 프롬프트가 표시됩니다. 온라인에서 읽은 후 로컬로 로그인할 수 없다는 것을 알았습니다. 대신 공개키 인증을 사용하여 SSH를 통해 연결해야 합니다. 위에서 언급한 대로 SSH 키를 생성하여 MAAS에 추가했지만 SSH 연결이 거부되었습니다.

test@ubuntuServer1404:~$ ssh [email protected] -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 [email protected] none
debug1: kex: client->server aes128-ctr [email protected] 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).

도움을 주시면 감사하겠습니다. 감사해요.

답변1

나에게도 같은 문제가 있었는데, 이는 maas가 잘못된 IP로 구성되었기 때문이었습니다(머신을 처음 구축할 때는 DHCP였습니다). 실행 후 문제가 해결되었습니다.

dpkg-reconfigure maas-region-controller 

올바른 IP를 제공합니다.

관련 정보