Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem

[root@compute2 ~]# openstack --os-auth-url http://10.192.27.38:35357/v3 --os-project-domain-id default --os-user-domain-id default --os-project-name admin --os-username admin --os-auth-type password token issue Password:

An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-3bcf74c8-6e02-4e62-90d2-199db30944e9)
( I totally referrence the document from official site:  
https://docs.openstack.org/liberty/install-guide-rdo/)

log

var/log/keystone/keystone.log

2017-02-16 15:33:51.002 7752 INFO keystone.common.wsgi [req-b63a1476-fb6f-4e36-ab37-b6dc0b02e16f - - - - -] GET http://10.192.27.38:35357/v3/

2017-02-16 15:33:51.025 7751 INFO keystone.common.wsgi [req-85fabaac-b430-4a0f-8585-db8eadd1699b - - - - -] POST http://10.192.27.38:35357/v3/auth/tokens

2017-02-16 15:33:58.751 7751 WARNING keystone.common.wsgi [req-85fabaac-b430-4a0f-8585-db8eadd1699b - - - - -] An unexpected error prevented the server from fulfilling your request.

[root@compute2 ~]# vim /var/log/httpd/keystone_access.log

10.192.27.38 - - [18/Feb/2017:09:08:01 +0800] "GET /v3/users HTTP/1.1" 200 483 "-" "python-keystoneclient"
10.192.27.38 - - [18/Feb/2017:09:08:24 +0800] "GET /v3/users HTTP/1.1" 200 483 "-" "python-keystoneclient"
10.192.27.38 - - [18/Feb/2017:09:15:08 +0800] "GET /v3/users HTTP/1.1" 200 483 "-" "python-keystoneclient"
10.192.27.38 - - [18/Feb/2017:09:15:25 +0800] "GET /v3/projects HTTP/1.1" 200 906 "-" "python-keystoneclient"
10.192.27.38 - - [18/Feb/2017:09:15:44 +0800] "GET /v3/endpoints HTTP/1.1" 200 1061 "-" "python-keystoneclient"
10.192.27.38 - - [18/Feb/2017:09:15:44 +0800] "GET /v3/services/644d3fb67ce842f883de191b468a190c HTTP/1.1" 200 242 "-" "python-keystoneclient"

10.192.27.38 - - [18/Feb/2017:09:15:44 +0800] "GET /v3/services/644d3fb67ce842f883de191b468a190c HTTP/1.1" 200 242 "-" "python-keystoneclient"

10.192.27.38 - - [18/Feb/2017:09:15:44 +0800] "GET /v3/services/644d3fb67ce842f883de191b468a190c HTTP/1.1" 200 242 "-" "python-keystoneclient"

10.192.27.38 - - [18/Feb/2017:09:16:52 +0800] "GET /v3 HTTP/1.1" 200 252 "-" "python-openstackclient"
10.192.27.38 - - [18/Feb/2017:09:16:52 +0800] "POST /v3/auth/tokens HTTP/1.1" 500 143 "-" "python-openstackclient"

Detailed info

[root@compute2 ~]# cat token

export OS_TOKEN=a5fb8a0d66e9466fde39
export OS_URL=http://10.192.27.38:35357/v3
export OS_IDENTITY_API_VERSION=3

[root@compute2 ~]# source token

[root@compute2 ~]# openstack user list

+----------------------------------+-------+
| ID                               | Name  |
+----------------------------------+-------+
| 260b2fa950744bbd9fa1651193cc7ea8 | demo  |
| 6f6e276273094b1090feca45d74c6e88 | admin |
+----------------------------------+-------+

[root@compute2 ~]# openstack project list

+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 6c80755053104de3aa2539ead9fce125 | demo    |
| ba2a832e17ef44be81489e5965d9fad4 | service |
| cd02d7e4ee2f4df4ba00aac6b5d41c3e | admin   |
+----------------------------------+---------+

[root@compute2 ~]# openstack endpoint list

+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
| ID                               | Region    | Service Name | Service Type | Enabled | Interface | URL                            |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
| 3f039e21d4c54035af9467cfbf6c324a | RegionOne | keystone     | identity     | True    | public    | http://10.192.27.38:5000/v2.0  |
| 5903ddd4193a4167b4900d4c18d7eeb3 | RegionOne | keystone     | identity     | True    | internal  | http://10.192.27.38:5000/v2.0  |
| 5a53b2a6f3b948c094d7cb05aaf3d712 | RegionOne | keystone     | identity     | True    | admin     | http://10.192.27.38:35357/v2.0 |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+

[root@compute2 ~]# unset OS_TOKEN OS_URL

[root@compute2 ~]# openstack --os-auth-url http://10.192.27.38:35357/v3 --os-project-domain-id default --os-user-domain-id default --os-project-name admin --os-username admin --os-auth-type password token issue

Password:

An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-3bcf74c8-6e02-4e62-90d2-199db30944e9)

the detailed info about port

[root@compute2 ~]# lsof -i:15672
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
beam.smp 12719 rabbitmq   17u  IPv4 751628      0t0  TCP *:15672 (LISTEN)
[root@compute2 ~]# netstat  -ntlp | grep httpd
tcp6       0      0 :::5000                 :::*                    LISTEN      2924/httpd
tcp6       0      0 :::80                   :::*                    LISTEN      2924/httpd
tcp6       0      0 :::35357                :::*                    LISTEN      2924/httpd

service related is started

systemctl status   httpd  memcached.service  rabbitmq-server.service  mariadb.service
they are all stated!

Configuration file

/etc/httpd/conf.d/wsgi-keystone.conf

Listen 5000
Listen 35357

<VirtualHost *:5000>
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-public
WSGIScriptAlias / /usr/bin/keystone-wsgi-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/httpd/keystone-error.log
CustomLog /var/log/httpd/keystone-access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>

<VirtualHost *:35357>
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/httpd/keystone-error.log
CustomLog /var/log/httpd/keystone-access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>

/etc/keystone/keystone.conf

[DEFAULT]
admin_token =a5fb8a0d66e9466fde39
verbose = true
[assignment]
[auth]
[cache]
[catalog]
[cors]
[cors.subdomain]
[credential]
[database]
connection = mysql://keystone:keystone@10.192.27.38/keystone
[domain_config]
[endpoint_filter]
[endpoint_policy]
[eventlet_server]
[eventlet_server_ssl]
[federation]
[fernet_tokens]
[identity]
[identity_mapping]
[kvs]
[ldap]
[matchmaker_redis]
[matchmaker_ring]
[memcache]
servers = 10.192.27.38:11211
[oauth1]
[os_inherit]
[oslo_messaging_amqp]
[oslo_messaging_qpid]
[oslo_messaging_rabbit]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
config_file = keystone-paste.ini
[policy]
[resource]
[revoke]
driver=sql
[role]
[saml]
[signing]
[ssl]
[token]
provider = uuid
driver = memcache
[tokenless_auth]
[trust]

[root@compute2 ~]# cat /etc/my.cnf |grep -v "^#"|grep -v "^$"

client]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
max_connections=1000
bind-address = 0.0.0.0
log-bin=mysql-bin
binlog_format=mixed
server-id       = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout

the operations about mariadb

#mysql_install_db --datadir="/var/lib/mysql" --user="mysql"  
#systemctl start mariadb.service
#mysql_secure_installation     
#mysql -p123456
MariaDB [(none)]> CREATE DATABASE keystone;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';
MariaDB [(none)]>flush privileges;
MariaDB [(none)]> SELECT user,host,password FROM mysql.user;
+----------+-----------+-------------------------------------------+
| user     | host      | password                                  |
+----------+-----------+-------------------------------------------+
| root     | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root     | 127.0.0.1 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root     | ::1       | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| keystone | %         | *936E8F7AB2E21B47F6C9A7E5D9FE14DBA2255E5A |
| keystone | localhost | *936E8F7AB2E21B47F6C9A7E5D9FE14DBA2255E5A |
+----------+-----------+-------------------------------------------+
# su -s /bin/sh -c "keystone-manage db_sync" keystone
No handlers could be found for logger "oslo_config.cfg"

# there are 33 tables in keystone database.

the basic environment

[root@compute2 ~]# uname -a
Linux compute2.openstack.da 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@compute2 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@compute2 ~]# hostname
compute2.openstack.da
[root@compute2 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4  compute2.openstack.da
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


10.192.27.38    compute2.openstack.da
[root@compute2 ~]# sestatus
SELinux status:                 disabled
[root@compute2 ~]# systemctl  status  firewalld.service
‚óŹ firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

SEEK FOR HELP

this problem confuse me for days. Do you have any answers to this problem?
Thank you so much!