关于juju bootstrap遇到的问题

OpenStack/Juju/MAAS/CloudStack/Hadoop
回复
cnhome
帖子: 33
注册时间: 2007-08-08 15:15

关于juju bootstrap遇到的问题

#1

帖子 cnhome » 2014-05-14 16:26

在maas上部署了juju,但是一运行juju bootstrap就报错误


我遇到了类似的问题,但是情况不太一样。

juju bootstrap
Launching instance
WARNING picked arbitrary tools &{"1.18.3-trusty-amd64" "https://streams.canonical.com/juju/tool ... -amd64.tgz" "b54decd84ad21c5a3b924448bc865fa53f6552d230a89ed01d929db4fa8659b6" %!q(int64=7385591)}
- /MAAS/api/1.0/nodes/node-b357d8ce-da6f-11e3-98bd-525400256fea/
Waiting for address
Attempting to connect to node1.maas:22
Attempting to connect to 10.17.17.102:22
ERROR bootstrap failed: waited for 10m0s without being able to connect: /var/lib/juju/nonce.txt does not exist
Stopping instance...
Bootstrap failed, destroying environment
ERROR waited for 10m0s without being able to connect: /var/lib/juju/nonce.txt does not exist

juju status的情况如下

juju status
ERROR Unable to connect to environment "".
Please check your credentials or use 'juju bootstrap' to create a new environment.

Error details:
environment is not bootstrapped


有谁知道,问题出在哪里么?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于juju bootstrap遇到的问题

#2

帖子 poloshiao » 2014-05-14 18:41

看看 能否幫你
https://juju.ubuntu.com/docs/
cnhome
帖子: 33
注册时间: 2007-08-08 15:15

Re: 关于juju bootstrap遇到的问题

#3

帖子 cnhome » 2014-05-14 20:50

这个我看过了,按道理来说很简单,配置上environment.yaml就可以用。官方的视频是连接EC2的。我这里连接的是MAAS,说啥都过不去。很混乱~~~

environment里只要配置两个参数即可,步骤上很简单,就是搞不明白为什么错~~~
cnhome
帖子: 33
注册时间: 2007-08-08 15:15

Re: 关于juju bootstrap遇到的问题

#4

帖子 cnhome » 2014-05-14 21:10

明天再测试一下,如果不行,就只能参考http://marcoceppi.com/2012/05/juju-maas-virtualbox/用12.04来做了
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于juju bootstrap遇到的问题

#5

帖子 poloshiao » 2014-05-15 7:29

WARNING picked arbitrary tools &{"1.18.3-trusty-amd64" "https://streams.canonical.com/juju/tool ... -amd64.tgz" "b54decd84ad21c5a3b924448bc865fa53f6552d230a89ed01d929db4fa8659b6" %!q(int64=7385591)}
- /MAAS/api/1.0/nodes/node-b357d8ce-da6f-11e3-98bd-525400256fea/
Waiting for address
Attempting to connect to node1.maas:22
Attempting to connect to 10.17.17.102:22
ERROR bootstrap failed: waited for 10m0s without being able to connect: /var/lib/juju/nonce.txt does not exist
Stopping instance...
Bootstrap failed, destroying environment
ERROR waited for 10m0s without being able to connect: /var/lib/juju/nonce.txt does not exist
表示 要去下載
"https://streams.canonical.com/juju/tool ... -amd64.tgz" "b54decd84ad21c5a3b924448bc865fa53f6552d230a89ed01d929db4fa8659b6" %!q(int64=7385591)}
- /MAAS/api/1.0/nodes/node-b357d8ce-da6f-11e3-98bd-525400256fea/
等超過 10 分鐘 沒有回應
所以失敗

看看 這一篇 有沒有 幫助
http://askubuntu.com/questions/370990/w ... nvironment
我这里连接的是MAAS
配置上environment.yaml就可以用
https://juju.ubuntu.com/docs/config-maas.html
~/.juju/environments.yaml
是不是 少了一個 s ?
官方的视频是连接EC2的
我这里连接的是MAAS,说啥都过不去。很混乱~~~
0. 如果設置 MAAS 有 最少需要多少 nodes 的 要求
https://help.ubuntu.com/community/Ubunt ... AAS_server

1. 如果是 單機 先玩玩這個
https://help.ubuntu.com/14.04/serverguide/lxc.html
https://juju.ubuntu.com/docs/config-local.html

2. Ubuntu 14.04 已經把重點從 EC2 轉向 OpenStack
http://www.ubuntu.com/download/cloud/in ... untu-cloud
https://help.ubuntu.com/14.04/servergui ... cloud.html
https://juju.ubuntu.com/docs/config-openstack.html
cnhome
帖子: 33
注册时间: 2007-08-08 15:15

Re: 关于juju bootstrap遇到的问题

#6

帖子 cnhome » 2014-05-15 10:37

多谢回馈!

我主要是想做 MAAS+JUJU+Openstack的模式,MAAS已经部署完毕了,需要JUJU连接上maas.
environments.yaml确实我写帖子掉了一个s,真实文件如下:

代码: 全选

more environments.yaml 
default: maas
environments:
    maas:
        type: maas
        maas-server: 'http://10.17.17.200/MAAS/'
        maas-oauth: '...省略...'

执行了juju --debug -v status,情况如下:

代码: 全选

juju --debug -v status
2014-05-15 02:22:43 INFO juju.cmd supercommand.go:302 running juju-1.18.3-trusty-amd64 [gc]
2014-05-15 02:22:43 DEBUG juju api.go:179 no cached API connection settings found
2014-05-15 02:22:43 DEBUG juju.provider.maas environprovider.go:30 opening environment "maas".
2014-05-15 02:22:43 ERROR juju.cmd supercommand.go:305 Unable to connect to environment "maas".
Please check your credentials or use 'juju bootstrap' to create a new environment.

Error details:
environment is not bootstrapped
我想,应当运行一下juju bootstrap。运行 juju --debug -v bootstrap 得到如下信息

代码: 全选

juju --debug -v bootstrap
2014-05-15 02:30:21 INFO juju.cmd supercommand.go:302 running juju-1.18.3-trusty-amd64 [gc]
2014-05-15 02:30:21 DEBUG juju.environs.configstore disk.go:64 Making /home/cnhome/.juju/environments
2014-05-15 02:30:21 DEBUG juju.provider.maas environprovider.go:30 opening environment "maas".
2014-05-15 02:30:21 INFO juju.environs.bootstrap bootstrap.go:46 bootstrapping environment "maas"
2014-05-15 02:30:21 DEBUG juju.environs.bootstrap synctools.go:165 looking for bootstrap tools: series="trusty", arch=<nil>, version=<nil>
2014-05-15 02:30:21 INFO juju.environs.tools tools.go:186 filtering tools by released version
2014-05-15 02:30:21 INFO juju.environs.tools tools.go:86 reading tools with major.minor version 1.18
2014-05-15 02:30:21 INFO juju.environs.tools tools.go:97 filtering tools by series: trusty
2014-05-15 02:30:21 DEBUG juju.environs.tools tools.go:45 no architecture specified when finding tools, looking for any
2014-05-15 02:30:21 DEBUG juju.environs.simplestreams simplestreams.go:490 fetchData failed for "tools/streams/v1/index.sjson": file '6e3d04a3-73f0-40b2-8c08-03a5bf3cc550-tools/streams/v1/index.sjson' not found not found
2014-05-15 02:30:21 DEBUG juju.environs.simplestreams simplestreams.go:464 cannot load index "streams/v1/index.sjson": invalid URL "tools/streams/v1/index.sjson" not found
2014-05-15 02:30:22 DEBUG juju.environs.simplestreams simplestreams.go:490 fetchData failed for "tools/streams/v1/index.json": file '6e3d04a3-73f0-40b2-8c08-03a5bf3cc550-tools/streams/v1/index.json' not found not found
2014-05-15 02:30:22 DEBUG juju.environs.simplestreams simplestreams.go:464 cannot load index "streams/v1/index.json": invalid URL "tools/streams/v1/index.json" not found
2014-05-15 02:30:22 INFO juju.utils http.go:55 hostname SSL verification enabled
2014-05-15 02:30:26 INFO juju.utils http.go:55 hostname SSL verification enabled
2014-05-15 02:30:31 DEBUG juju.environs.simplestreams simplestreams.go:677 using default candidate for content id "com.ubuntu.juju:released:tools" are {20140515 mirrors:1.0 content-download streams/v1/cpc-mirrors.sjson []}
2014-05-15 02:30:31 INFO juju.utils http.go:55 hostname SSL verification enabled
2014-05-15 02:30:35 DEBUG juju.environs.simplestreams simplestreams.go:548 no mirror information available for { }: mirror info with cloud { } not found
2014-05-15 02:30:35 DEBUG juju.environs.simplestreams simplestreams.go:468 read metadata index at "https://streams.canonical.com/juju/tools/streams/v1/index.sjson"
2014-05-15 02:30:35 DEBUG juju.environs.simplestreams simplestreams.go:635 candidate matches for products ["com.ubuntu.juju:14.04:amd64" "com.ubuntu.juju:14.04:i386" "com.ubuntu.juju:14.04:armhf" "com.ubuntu.juju:14.04:arm64" "com.ubuntu.juju:14.04:ppc64"] are [{Thu, 15 May 2014 01:11:00 +0000 products:1.0 content-download  [] streams/v1/com.ubuntu.juju:released:tools.sjson [com.ubuntu.juju:12.04:amd64 com.ubuntu.juju:12.04:armhf com.ubuntu.juju:12.04:i386 com.ubuntu.juju:12.10:amd64 com.ubuntu.juju:12.10:i386 com.ubuntu.juju:13.04:amd64 com.ubuntu.juju:13.04:i386 com.ubuntu.juju:13.10:amd64 com.ubuntu.juju:13.10:armhf com.ubuntu.juju:13.10:i386 com.ubuntu.juju:14.04:amd64 com.ubuntu.juju:14.04:arm64 com.ubuntu.juju:14.04:armhf com.ubuntu.juju:14.04:i386 com.ubuntu.juju:14.04:powerpc com.ubuntu.juju:14.04:ppc64el com.ubuntu.juju:14.10:amd64 com.ubuntu.juju:14.10:armhf com.ubuntu.juju:14.10:i386]}]
2014-05-15 02:30:35 DEBUG juju.environs.simplestreams simplestreams.go:947 finding products at path "streams/v1/com.ubuntu.juju:released:tools.sjson"
2014-05-15 02:30:35 INFO juju.utils http.go:55 hostname SSL verification enabled
2014-05-15 02:30:43 DEBUG juju.environs.simplestreams simplestreams.go:985 metadata: &{map[com.ubuntu.juju:12.04:amd64:{ 1.15.0 amd64   map[20140515:0xc21037d3c0]} com.ubuntu.juju:12.04:armhf:{ 1.16.2 armhf   map[20140515:0xc21037d4e0]} com.ubuntu.juju:12.04:i386:{ 1.15.0 i386   map[20140515:0xc21037d600]} com.ubuntu.juju:13.10:amd64:{ 1.15.0 amd64   map[20140515:0xc21037dba0]} com.ubuntu.juju:13.10:armhf:{ 1.16.2 armhf   map[20140515:0xc21037dcc0]} com.ubuntu.juju:13.10:i386:{ 1.15.0 i386   map[20140515:0xc21037dde0]} com.ubuntu.juju:14.04:ppc64el:{ 1.17.2 ppc64el   map[20140515:0xc21037d780]} com.ubuntu.juju:12.10:i386:{ 1.15.0 i386   map[20140515:0xc21037d840]} com.ubuntu.juju:13.04:i386:{ 1.15.0 i386   map[20140515:0xc21037da80]} com.ubuntu.juju:14.10:amd64:{ 1.18.2 amd64   map[20140515:0xc210334900]} com.ubuntu.juju:14.10:armhf:{ 1.18.2 armhf   map[20140515:0xc2103340c0]} com.ubuntu.juju:14.04:amd64:{ 1.16.2 amd64   map[20140515:0xc21037df00]} com.ubuntu.juju:14.04:arm64:{ 1.17.2 arm64   map[20140515:0xc21037d120]} com.ubuntu.juju:14.04:armhf:{ 1.16.2 armhf   map[20140515:0xc21037d240]} com.ubuntu.juju:14.04:i386:{ 1.16.2 i386   map[20140515:0xc21037d420]} com.ubuntu.juju:14.04:powerpc:{ 1.17.2 powerpc   map[20140515:0xc21037d5a0]} com.ubuntu.juju:12.10:amd64:{ 1.15.0 amd64   map[20140515:0xc21037d720]} com.ubuntu.juju:13.04:amd64:{ 1.15.0 amd64   map[20140515:0xc21037d960]} com.ubuntu.juju:14.10:i386:{ 1.18.2 i386   map[20140515:0xc2103341e0]}] map[] Thu, 15 May 2014 01:11:00 +0000 products:1.0 com.ubuntu.juju:released:tools}
2014-05-15 02:30:43 INFO juju.environs.bootstrap bootstrap.go:58 picked newest version: 1.18.3
2014-05-15 02:30:43 DEBUG juju.provider.common bootstrap.go:98 generate a system ssh key
Launching instance
2014-05-15 02:30:45 WARNING juju.provider.maas environ.go:233 picked arbitrary tools &{"1.18.3-trusty-amd64" "https://streams.canonical.com/juju/tools/releases/juju-1.18.3-trusty-amd64.tgz" "b54decd84ad21c5a3b924448bc865fa53f6552d230a89ed01d929db4fa8659b6" %!q(int64=7385591)}
2014-05-15 02:30:45 DEBUG juju.provider.maas environ.go:311 maas user data; 1321 bytes
2014-05-15 02:30:45 DEBUG juju.provider.maas environ.go:317 started instance "/MAAS/api/1.0/nodes/node-b357d8ce-da6f-11e3-98bd-525400256fea/"
 - /MAAS/api/1.0/nodes/node-b357d8ce-da6f-11e3-98bd-525400256fea/
2014-05-15 02:30:45 DEBUG juju.environs.bootstrap state.go:41 putting "provider-state" to bootstrap storage *maas.maasStorage
Waiting for address
Attempting to connect to node1.maas:22
Attempting to connect to 10.17.17.102:22
2014-05-15 02:30:45 DEBUG juju.utils.ssh ssh_openssh.go:122 running: ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /home/cnhome/.juju/ssh/juju_id_rsa -i /home/cnhome/.ssh/id_rsa ubuntu@node1.maas /bin/bash
2014-05-15 02:30:45 DEBUG juju.utils.ssh ssh_openssh.go:122 running: ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /home/cnhome/.juju/ssh/juju_id_rsa -i /home/cnhome/.ssh/id_rsa ubuntu@10.17.17.102 /bin/bash

......

2014-05-15 02:40:24 ERROR juju.provider.common bootstrap.go:123 bootstrap failed: waited for 10m0s without being able to connect: /var/lib/juju/nonce.txt does not exist
Stopping instance...
2014-05-15 02:40:24 INFO juju.cmd cmd.go:113 Bootstrap failed, destroying environment
2014-05-15 02:40:24 INFO juju.provider.common destroy.go:14 destroying environment "maas"
2014-05-15 02:40:24 ERROR juju.cmd supercommand.go:305 waited for 10m0s without being able to connect: /var/lib/juju/nonce.txt does not exist
 
我发现juju会从我的ready的node里边启动一个来进行连接,但我不知道为什么下边的指令不停的执行。

代码: 全选

ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /home/cnhome/.juju/ssh/juju_id_rsa -i /home/cnhome/.ssh/id_rsa ubuntu@10.17.17.102 /bin/bash
上次由 cnhome 在 2014-05-15 11:08,总共编辑 2 次。
cnhome
帖子: 33
注册时间: 2007-08-08 15:15

Re: 关于juju bootstrap遇到的问题

#7

帖子 cnhome » 2014-05-15 10:51

poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于juju bootstrap遇到的问题

#8

帖子 poloshiao » 2014-05-15 11:35

比較像這一個
https://bugs.launchpad.net/juju-core/+bug/1314665
他的解決方法
https://bugs.launchpad.net/juju-core/+b ... comments/1
把時間限制拉長到 30 分 (1800 秒)

juju 指令及參數 參閱
http://manpages.ubuntu.com/manpages/qua ... uju.1.html
ierover
帖子: 1
注册时间: 2014-05-16 23:48
系统: ubuntu server 14.04

Re: 关于juju bootstrap遇到的问题

#9

帖子 ierover » 2014-05-16 23:50

哥们解决了吗?我也遇到一样的问题
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于juju bootstrap遇到的问题

#10

帖子 poloshiao » 2014-05-17 6:58

但我不知道为什么下边的指令不停的执行。
ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /home/cnhome/.juju/ssh/juju_id_rsa -i /home/cnhome/.ssh/id_rsa ubuntu@10.17.17.102 /bin/bash
參數意義 參閱
http://manpages.ubuntu.com/manpages/tru ... ssh.1.html

1. -o option
option 可能選項名單 以及 可能的 參數值
1-1. 額外參閱
http://manpages.ubuntu.com/manpages/tru ... fig.5.html
1-2. 你的 參數值 以及 參數值
PasswordAuthentication no
是 從哪裡得到的 資訊 ? 要這樣設 ?
參閱
http://manpages.ubuntu.com/manpages/tru ... fig.5.html
PasswordAuthentication

2. -i identity_file
檢查看看 下面目錄 中
/home/cnhome/.juju/ssh/juju_id_rsa
/home/cnhome/.ssh/id_rsa
有沒有 cnhome 的 private key 檔案
這個 private key 必須是 ssh server 上面 cnhome 的 public key 檔案的 配對
缺一不可


3. 補充
3-1. 這是 一般 /etc/ssh/ssh_config 額外增加的參數及參數值 供你參考
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
3-2. viewtopic.php?p=3083186#p3083186
如果設置 MAAS 有 最少需要多少 nodes 的 要求
https://help.ubuntu.com/community/Ubunt ... AAS_server
http://maas.ubuntu.com/docs/nodes.html
有談到 如何手動 增加足夠的 nodes 數目 以及 設定 ssh public-private key pair
不知 你有沒有完成確認 已經 ready ?
5589731
帖子: 4
注册时间: 2008-03-15 18:02

Re: 关于juju bootstrap遇到的问题

#11

帖子 5589731 » 2014-06-19 21:20

你好,请问问题解决了吗?? 我也碰到这个问题,我的QQ是 82049406, 望联系解答!!!!
回复