设为首页 收藏本站
查看: 4948|回复: 0

[经验分享] ERROR : Error appeared during Puppet run: x.x.x.x _keystone.pp

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-8-2 08:58:13 | 显示全部楼层 |阅读模式
报错
1
2
3
4
ERROR : Error appeared during Puppet run: x.x.x.x_keystone.pp
Error: /Stage[main]/Keystone::Db::Sync/Exec[keystone-manage db_sync]: Failed to call refresh: Command exceeded timeout
You will find full trace in log /var/tmp/packstack/20160801-185048-pwY8Y8/manifests/x.x.x.x_keystone.pp.log
Please check log file /var/tmp/packstack/20160801-185048-pwY8Y8/openstack-setup.log for more information



解决:
报错是  在用RDO模式     packstack安装openstack 最新版mitaka时出现的。
是在云上的环境  
inet 192.168.1.7/24 brd 192.168.1.255 scope global dynamic eth0               有一个外网IP 42.62.X.X
查看日志
1
2
3
4
5
6
[iyunv@controller ~]# cd /var/log/keystone/
[iyunv@controller keystone]# ls
keystone.log
2016-08-01 20:34:33.513 14145 ERROR keystone.common.wsgi DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'x.x.x.x' ([Errno 110] Connection timed out)")
2016-08-01 20:34:33.513 14145 ERROR keystone.common.wsgi
2016-08-01 20:35:34.671 14150 WARNING oslo_db.sqlalchemy.engines [req-12a5fe87-1163-4fbb-a049-5225ea65a05a - - - - -] SQL connection failed. 10 attempts left.



查看数据库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| cinder             |
| glance             |
| gnocchi            |
| information_schema |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| nova_api           |
| performance_schema |
| test               |
+--------------------+
11 rows in set (0.00 sec)
MariaDB [(none)]> use keystone;
Database changed
MariaDB [keystone]> show tables;
Empty set (0.00 sec)
生成了库  没内容


看用户
MariaDB [mysql]> select  host,user  from user;
+-----------+----------------+
| host      | user           |
+-----------+----------------+
| %         | cinder         |
| %         | glance         |
| %         | gnocchi        |
| %         | keystone_admin |
| %         | neutron        |
| %         | nova           |
| %         | nova_api       |
| 127.0.0.1 | keystone_admin |
| localhost | root           |
+-----------+----------------+
9 rows in set (0.00 sec)
权限是  %,应该是可以的,




参考   mysql授权localhost&%区别及一直授权错误解决办法
http://blog.csdn.net/tantexian/article/details/44861733
此处多说一句,此处配置%远程其他host有权限访问,那么在mysql的配置文件中 /etc/my.cnf,也需要做一些配置,将bind_address=0.0.0.0或者直接屏蔽掉此项,更多请自行查找资料。
如果想让外面host能访问数据库:(yunjisuan为root密码)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yunjisuan';
flush privileges;


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
修改hosts
[iyunv@controller keystone]# cat   /etc/hosts
127.0.0.1        controller             localhost localhost.localdomain localhost4 localhost4.localdomain4                  ##在127.0.0.1也添加主机名字
::1                   localhost localhost.localdomain localhost6 localhost6.localdomain6
x.x.x.x        controller



[iyunv@controller keystone]# mysql -ukeystone_admin   -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.                        ##本机测试可以登录
因为本人实在云上环境搭建的,只有一个eth0是内网,通过云是外网ip,现在不确定服务器 访问绑定的外网ip的方式是什么样的,
是直接eth0到外网ip,就回来了,, 还是过了路由再回来。如果是这样,就相当于远程访问mysql数据库。- -,关系好乱。



[iyunv@controller ~]# route -n   ##这是默认路由
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0


所以现在要检查一下 安全组。  测试root 无法远程登录。
用别的机器测试mysql服务器可以,安全组没有问题


MariaDB [mysql]> grant  all privileges on *.*   to 'root'@'%'  identified  by 'xxxxxxxx';       ####添加%,就可以远程登录了.

[iyunv@hequan ~]# mysql   -hip        -p    -ukeystone_admin                 ##   本地测试登录无问题。
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.

MariaDB [mysql]> use keystone;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed

MariaDB [keystone]> show tables;
+------------------------+
| Tables_in_keystone     |
+------------------------+
| access_token           |
| assignment             |
| config_register        |
| consumer               |
| credential             |
| domain                 |
| endpoint               |

###查看有表了


再次执行,又有新的报错


RROR : Error appeared during Puppet run: x.x.x.x_cinder.pp
Error: Could not prefetch cinder_type provider 'openstack': Execution of '/usr/bin/openstack volume type list --quiet --format csv --long' returned 1: Unable to
CONFIG_CINDER_NETAPP_ESERIES_HOST_TYPE=linux_dm_mp   ##这是  cinder_type


MariaDB [keystone]> use  cinder
Database changed
MariaDB [cinder]> show tables;
Empty set (0.00 sec)
查看 cinder里面没有表,还是有问题。
MariaDB [cinder]> use glance;
Database changed
MariaDB [glance]> show tables;
Empty set (0.00 sec)
glance也没有生成表,,,只有keystone 的好了。


Applying x.x.x.x_keystone.pp
Applying x.x.x.x_glance.pp
Applying x.x.x.x_cinder.pp
x.x.x.x_keystone.pp:                              [ DONE ]     
Testing if puppet apply is finished: x.x.x.x_cinder.pp    [ \ ]    $$$##卡在这里


卸载数据库,从新测试,竟然可以了。。= =,我了个大去。感动老天了。。
| %         | cinder         |
| %         | glance         |
| 127.0.0.1 | keystone_admin |





总结:方法3个,1是在127.0.0.1 添加主机名,,2 重新设置一遍 root 在msyql 的权限%     3 卸载掉数据库,重新测试。


打算一会测试  用内网ip,  然后在路由器上做  80映射,这样应该会好一点。不知道行不行。简直是作死,在云上搭建openstack。。。。测试完。


**** Installation completed successfully ******

Additional information:
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host x.x.x.x . To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://x.x.x.x /dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host   x.x.x.x  requires reboot.
* Because of the kernel update the host 127.0.0.1 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20160801-224547-mTb9CN/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20160801-224547-mTb9CN/manifests


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[iyunv@controller ~]# netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 0.0.0.0:8774            0.0.0.0:*               LISTEN      21105/python2      
tcp        0      0 0.0.0.0:8775            0.0.0.0:*               LISTEN      21105/python2      
tcp        0      0 0.0.0.0:9191            0.0.0.0:*               LISTEN      19676/python2      
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      1307/httpd         
tcp        0      0 0.0.0.0:8776            0.0.0.0:*               LISTEN      20207/python2      
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      10588/beam.smp      
tcp        0      0 0.0.0.0:8777            0.0.0.0:*               LISTEN      1307/httpd         
tcp        0      0 0.0.0.0:8041            0.0.0.0:*               LISTEN      1307/httpd         
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      31512/mongod        
tcp        0      0 0.0.0.0:8042            0.0.0.0:*               LISTEN      1307/httpd         
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      17028/mysqld        
tcp        0      0 0.0.0.0:11211           0.0.0.0:*               LISTEN      25302/memcached     
tcp        0      0 0.0.0.0:9292            0.0.0.0:*               LISTEN      19705/python2      
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      22134/rpcbind      
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1307/httpd         
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      816/sshd            
tcp        0      0 0.0.0.0:35357           0.0.0.0:*               LISTEN      1307/httpd         
tcp        0      0 0.0.0.0:16509           0.0.0.0:*               LISTEN      22855/libvirtd      
tcp        0      0 0.0.0.0:9696            0.0.0.0:*               LISTEN      24517/python2      
tcp        0      0 0.0.0.0:6080            0.0.0.0:*               LISTEN      22974/python2      
tcp6       0      0 :::5672                 :::*                    LISTEN      10588/beam.smp      
tcp6       0      0 :::111                  :::*                    LISTEN      22134/rpcbind      
tcp6       0      0 :::22                   :::*                    LISTEN      816/sshd            
tcp6       0      0 :::16509                :::*                    LISTEN      22855/libvirtd      
udp        0      0 0.0.0.0:11211           0.0.0.0:*                           25302/memcached     
udp        0      0 0.0.0.0:11431           0.0.0.0:*                           585/dhclient        
udp        0      0 0.0.0.0:8125            0.0.0.0:*                           29029/python2      
udp        0      0 0.0.0.0:68              0.0.0.0:*                           585/dhclient        
udp        0      0 0.0.0.0:111             0.0.0.0:*                           22134/rpcbind      
udp        0      0 127.0.0.1:323           0.0.0.0:*                           558/chronyd         
udp        0      0 0.0.0.0:685             0.0.0.0:*                           22134/rpcbind      
udp        0      0 0.0.0.0:4952            0.0.0.0:*                           32304/python2      
udp6       0      0 :::111                  :::*                                22134/rpcbind      
udp6       0      0 ::1:323                 :::*                                558/chronyd         
udp6       0      0 :::685                  :::*                                22134/rpcbind      
udp6       0      0 :::38397                :::*                                585/dhclient






运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-251951-1-1.html 上篇帖子: redhat系操作系统改yum源 下篇帖子: linux系统上的特殊权限SUID,SGID,STICKY during ERROR Error
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表