openstack JUNO 版本在执行租户命令:
root@controller:~# keystone tenant-create --name admin --description "Admin Tenant"
Unable to establish connection to http://controller:35357/v2.0/tenants
前提keystone-manage db_sync 完成,表项也建立成功,共计18个表。
1,hosts 文件:
root@controller:~# cat /etc/hosts
#127.0.0.1 localhost
# controller
192.168.1.94 controller
#computer1
192.168.1.95 computer1
2,关于变量:
export OS_SERVICE_ENDPOINT="http://localhost:35357/v2.0"
export OS_SERVICE_TOKEN="69c08416a921853870f6"
3,/etc/keystone/keystone.conf 修改的地方:
. admin_token=69c08416a921853870f6
.connection=mysql://keystone:keystone_pass@controller/keystone
.verbose=true
4,数据库:
create database keystone;
grant all privileges on keystone.* to 'keystone'@'localhost' identified by 'keystone_pass';
grant all privileges on keystone.* to 'keystone'@'l%' identified by 'keystone_pass';
flush privileges;
5, 开始建立 tenants,users,and roles
:~# keystone tenant-create --name admin --description "Admin Tenant"
Unable to establish connection to http://controller:35357/v2.0/tenants
一执行就报上面的错误,对照JUNO 的官方安装文档,没有发现问题。
#tail -f /var/log/syslog
Nov 1 07:41:14 controller kernel: [ 4717.097902] init: keystone main process ended, respawning
Nov 1 07:41:15 controller kernel: [ 4717.626426] init: keystone main process (7990) terminated with status 1
是否keystone 进程挂掉了? 但#PS -EF |GREP KEYSTONE,显示如下:
root@controller:~# ps -ef |grep keystone
keystone 8578 1 0 07:42 ? 00:00:00 /usr/bin/python /usr/bin/keystone-all
root 8583 4430 0 07:42 pts/3 00:00:00 grep --color=auto keystone
|