为什么计算节点不能登录模拟登录openstack部署?

Openstack安装过程中出现的一些问题及解决https://yq.aliyun.com/articles/523834摘要: 一、Centos7安装Mitika问题1.问题:在keystone安装阶段请求认证令牌出现错误 1 2 3 4 5 6 7 8 9 10 11 12 # vim admin-openrc export OS_PROJECT_DOMAIN_NAME=default expor…一、Centos7安装Mitika问题1.问题:在keystone安装阶段请求认证令牌出现错误# vim admin-openrcexport OS_PROJECT_DOMAIN_NAME=defaultexport OS_USER_DOMAIN_NAME=defaultexport OS_PROJECT_NAME=adminexport OS_USERNAME=adminexport OS_PASSWORD=adminexport OS_AUTH_URL=http://192.168.30.139:35357/v3export OS_IDENTITY_API_VERSION=3export OS_IMAGE_API_VERSION=2# . admin-openrc# openstack token issueThe request you have made requires authentication. (HTTP 401) (Request-ID: req-7fdfe96b-ed63-4204-a357-ef104d9cf07d)解决:该问题是由于二次实验时更改了用户密码,密码错误致使出现该问题,更改环境变量脚本的密码后,请求认证令牌成功# vim admin-openrcexport OS_PROJECT_DOMAIN_NAME=defaultexport OS_USER_DOMAIN_NAME=defaultexport OS_PROJECT_NAME=adminexport OS_USERNAME=adminexport OS_PASSWORD=keystoneexport OS_AUTH_URL=http://192.168.30.139:35357/v3export OS_IDENTITY_API_VERSION=3export OS_IMAGE_API_VERSION=2# openstack token issue±-----------±---------------------------------------------------------+
Field
Value
±-----------±---------------------------------------------------------+
expires
2017-03-14T14:41:44.254142Z
id
gAAAAABYx_MYf4J-87AUujC_aN5Fulubz0X7TJd1rbnaZu-
yqtu7UZeg8s786Rp1_WYENr1JJMqYFOk6JXJRHsiPFK-dq_CLa79FBJWa
_F96vpz_knlb_ZnU1lo7BXUf4Tx0vNyjlNEbRiyrrqiCI7K4FZwsLDP-
_798X_zNTDb-rC9iYXi8
project_id
8bd659ec3af14030ab92047844856463
user_id
04fd25261b6444f7a331fe021e85f2fe
±-----------±---------------------------------------------------------+2.dashboard仪表盘无法登陆浏览器输入 http://controller/dashboard 访问仪表盘无法登陆,提示“出错啦!遇到异常情况,请刷新。如需帮助请联系管理员。”wKioL1jki4rCZeSfAAAw9NOCM0k087.pngtail -n 40 /var/log/apache2/error.log[Wed Mar 15 22:56:22.744149 2017] [:error] [pid 2733] Login successful for user “admin”.[Wed Mar 15 22:56:34.220718 2017] [:error] [pid 2733] Internal Server Error: /dashboard/auth/login/[Wed Mar 15 22:56:34.220920 2017] [:error] [pid 2733] Traceback (most recent call last):[Wed Mar 15 22:56:34.220935 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/core/handlers/base.py”, line 132, in get_response[Wed Mar 15 22:56:34.220943 2017] [:error] [pid 2733] response = wrapped_callback(request, *callback_args, **callback_kwargs)[Wed Mar 15 22:56:34.220951 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/views/decorators/debug.py”, line 76, in sensitive_post_parameters_wrapper[Wed Mar 15 22:56:34.220959 2017] [:error] [pid 2733] return view(request, *args, **kwargs)[Wed Mar 15 22:56:34.220966 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/utils/decorators.py”, line 110, in _wrapped_view[Wed Mar 15 22:56:34.220973 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)[Wed Mar 15 22:56:34.220981 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/views/decorators/cache.py”, line 57, in _wrapped_view_func[Wed Mar 15 22:56:34.221043 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)[Wed Mar 15 22:56:34.221052 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/openstack_auth/views.py”, line 103, in login[Wed Mar 15 22:56:34.221059 2017] [:error] [pid 2733] **kwargs)[Wed Mar 15 22:56:34.221067 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/views/decorators/debug.py”, line 76, in sensitive_post_parameters_wrapper[Wed Mar 15 22:56:34.221075 2017] [:error] [pid 2733] return view(request, *args, **kwargs)[Wed Mar 15 22:56:34.221082 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/utils/decorators.py”, line 110, in _wrapped_view[Wed Mar 15 22:56:34.221089 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)[Wed Mar 15 22:56:34.221095 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/views/decorators/cache.py”, line 57, in _wrapped_view_func[Wed Mar 15 22:56:34.221102 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)[Wed Mar 15 22:56:34.221109 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 51, in login[Wed Mar 15 22:56:34.221179 2017] [:error] [pid 2733] auth_login(request, form.get_user())[Wed Mar 15 22:56:34.221206 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/auth/init.py”, line 110, in login[Wed Mar 15 22:56:34.221214 2017] [:error] [pid 2733] request.session.cycle_key()[Wed Mar 15 22:56:34.221221 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py”, line 285, in cycle_key[Wed Mar 15 22:56:34.221228 2017] [:error] [pid 2733] self.create()[Wed Mar 15 22:56:34.221269 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py”, line 48, in create[Wed Mar 15 22:56:34.221281 2017] [:error] [pid 2733] "Unable to create a new session key. "[Wed Mar 15 22:56:34.221288 2017] [:error] [pid 2733] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.[root@openstack1 ~]# tail -f /var/log/httpd/error_log[Wed Mar 15 22:56:34.221102 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)[Wed Mar 15 22:56:34.221109 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 51, in login[Wed Mar 15 22:56:34.221179 2017] [:error] [pid 2733] auth_login(request, form.get_user())[Wed Mar 15 22:56:34.221206 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/auth/init.py”, line 110, in login[Wed Mar 15 22:56:34.221214 2017] [:error] [pid 2733] request.session.cycle_key()[Wed Mar 15 22:56:34.221221 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py”, line 285, in cycle_key[Wed Mar 15 22:56:34.221228 2017] [:error] [pid 2733] self.create()[Wed Mar 15 22:56:34.221269 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py”, line 48, in create[Wed Mar 15 22:56:34.221281 2017] [:error] [pid 2733] "Unable to create a new session key. "[Wed Mar 15 22:56:34.221288 2017] [:error] [pid 2733] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.解决:更改dashboard的local_settings配置文件并重启httpd和memcached,刷新后可正常登陆,这是在国外的论坛上找到得解决方法。# vim /etc/openstack-dashboard/local_settings#SESSION_ENGINE = ‘django.contrib.sessions.backends.cache’SESSION_ENGINE = ‘django.contrib.sessions.backends.file’# systemctl restart httpd memcached# systemctl status httpd memcached3.创建实例提示HTTP 500 未知API错误[root@openstack1 ~]# openstack server create --flavor m1.tiny --image cirros > --nic net-id=d920a7fc-2b7b-4553-9b4e-1cffe1f18c4d --security-group default \
–key-name mykey1 provider-instanceUnexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.<class ‘keystoneauth1.exceptions.auth_plugins.MissingRequiredOptions’> (HTTP 500) (Request-ID: req-4a0895e6-971b-4531-b266-f393b6951e10)[root@openstack1 ~]# tail -10 /var/log/nova/nova-api.log2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions return plugin.load_from_options_getter(_getter, **kwargs)2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions File “/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py”, line 148, in load_from_options_getter2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions return self.load_from_options(**kwargs)2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions File “/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py”, line 123, in load_from_options2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions raise exceptions.MissingRequiredOptions(missing_required)2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions MissingRequiredOptions: Auth plugin requires parameters which were not given: auth_url2017-03-19 14:40:00.540 2662 ERROR nova.api.openstack.extensions2017-03-19 14:40:00.551 2662 INFO nova.api.openstack.wsgi [req-4a0895e6-971b-4531-b266-f393b6951e10 04fd25261b6444f7a331fe021e85f2fe 8bd659ec3af14030ab92047844856463 - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.<class ‘keystoneauth1.exceptions.auth_plugins.MissingRequiredOptions’>2017-03-19 14:40:00.555 2662 INFO nova.osapi_compute.wsgi.server [req-4a0895e6-971b-4531-b266-f393b6951e10 04fd25261b6444f7a331fe021e85f2fe 8bd659ec3af14030ab92047844856463 - - -] 192.168.30.139 “POST /v2.1/8bd659ec3af14030ab92047844856463/servers HTTP/1.1” status: 500 len: 536 time: 5.7874300
解决:nova.conf配置文件配置错误,仔细核对重新配置后正常1vim /etc/nova/nova.conf4.登陆云主机控制台提示如下错误Failed to connect to server (code: 1006)原因:计算节点开启了防火墙、SELINUX,关闭后重启计算节点正常5.云主机无法获取IP,提示如下:wKiom1jkkR2RiSuuAABk3-gotY4921.pngFailed to allocate the network(s), not rescheduling.原因:计算节点不支持硬件加速# egrep -c ‘(vms|svm)’ /proc/cpuinfo0解决:确定计算节点是否支持虚拟机的硬件加速# egrep -c ‘(vmx|svm)’ /proc/cpuinfo0注:大于等于1:计算节点支持硬件加速且不需要额外的配置0:计算节点不支持硬件加速,必须配置 libvirt 来使用 QEMU 去代替 KVM# vim /etc/nova/nova.conf[libvirt]virt_type = qemu6.上传云镜像失败,提示403 Forbidden# openstack image create “cirros” --file cirros-0.3.5-x86_64-disk.img --disk-format qcow2 --container-format bare --public403 ForbiddenYou are not authorized to complete publicize_image action.(HTTP 403)原因:Glance镜像服务组件中未进行如下配置 [paste_deploy]flavor = keystone7.登陆云主机控制台提示:Booting from Hard DiskwKiom1jkldOxP-FMAACd1xu26Y0895.png这里是由于镜像损坏导致,重新下载换个镜像后即可正常进入系统。二、Ubuntu安装openstack ocata问题1.neutron服务安装完成后,无法验证neutron-server# openstack extension list --network‘unicode’ object has no attribute ‘get’# tail -n 10 /var/log/neutron/neutron-server.log2017-03-24 21:55:29.244 97086 INFO neutron.wsgi [-] 192.168.30.145 - - [24/Mar/2017 21:55:29] “GET / HTTP/1.1” 200 271 0.0098762017-03-24 21:55:30.548 97086 WARNING keystonemiddleware.auth_token [-] Identity response: {“error”: {“message”: “The request you have made requires authentication.”, “code”: 401, “title”: “Unauthorized”}}2017-03-24 21:55:31.205 97086 WARNING keystonemiddleware.auth_token [-] Identity response: {“error”: {“message”: “The request you have made requires authentication.”, “code”: 401, “title”: “Unauthorized”}}2017-03-24 21:55:31.207 97086 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data2017-03-24 21:55:31.214 97086 INFO neutron.wsgi [-] 192.168.30.145 - - [24/Mar/2017 21:55:31] “GET /v2.0/extensions HTTP/1.1” 503 401 1.9493262017-03-24 22:04:06.670 97083 INFO neutron.wsgi [-] 192.168.30.145 - - [24/Mar/2017 22:04:06] “GET / HTTP/1.1” 200 271 0.0062912017-03-24 22:04:07.251 97083 WARNING keystonemiddleware.auth_token [-] Identity response: {“error”: {“message”: “The request you have made requires authentication.”, “code”: 401, “title”: “Unauthorized”}}2017-03-24 22:04:07.566 97083 WARNING keystonemiddleware.auth_token [-] Identity response: {“error”: {“message”: “The request you have made requires authentication.”, “code”: 401, “title”: “Unauthorized”}}2017-03-24 22:04:07.567 97083 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data2017-03-24 22:04:07.572 97083 INFO neutron.wsgi [-] 192.168.30.145 - - [24/Mar/2017 22:04:07] “GET /v2.0/extensions HTTP/1.1” 503 401 0.895275openstack extension list --network --debugUsing http://192.168.30.145:9696/v2.0 as public network endpointREQ: curl -g -i -X GET http://192.168.30.145:9696/v2.0/extensions -H “User-Agent: openstacksdk/0.9.13 keystoneauth1/2.18.0 python-requests/2.12.4 CPython/2.7.12” -H “Accept: application/json” -H “X-Auth-Token: {SHA1}95ed2e189a2e72c1caf8da574a50e218d3c8a9c0”http://192.168.30.145:9696 “GET /v2.0/extensions HTTP/1.1” 503 170RESP: [503] Content-Length: 170 Content-Type: application/json; charset=UTF-8 X-Openstack-Request-Id: req-8cb0be17-836e-4793-b461-842e267052ee Date: Sat, 25 Mar 2017 05:07:57 GMT Connection: keep-aliveRESP BODY: {“message”: “The server is currently unavailable. Please try again at a later time.\n\n\n”, “code”: “503 Service Unavailable”, “title”: “Service Unavailable”}解决:重新构建neutron-server服务openstack user list±---------------------------------±----------+
ID
Name
±---------------------------------±----------+
179677ec534648dbab9f0ca49cef017b
nova
24208e7494d04e3d9a925f7efbcb34ce
admin
5833a630dc9b42d48de9ea00d197834e
placement
830fc99cc93742b88be1b0c04db55fd0
neutron
cea92b6d391f4b008299d9a62d887202
glance
e723711c56e64da7a2e4a21bbd8376b9
demo
±---------------------------------±----------+openstack user delete 830fc99cc93742b88be1b0c04db55fd012openstack endpoint listopenstack endpoint delete openstack service list±---------------------------------±----------±----------+
ID
Name
Type
±---------------------------------±----------±----------+
1e5869c704be4f82b2a3948ec87aea37
neutron
network
9d52187708cc41a39582baa7c50fc63a
neutron
network
9fb4ba14d8dc443bac19b7c3bc6c31fa
keystone
identity
c44529c847be466a8c314fee77c90fe8
glance
image
d07ff10550e14570b073de85141badf1
placement
placement
d6ec58eb7bc2435ab71f21a2b3a44a37
nova
compute
dd2ff93317d6497798db071f360fb5f1
neutron
network
±---------------------------------±----------±----------+openstack service delete 9d52187708cc41a39582baa7c50fc63aopenstack service delete dd2ff93317d6497798db071f360fb5f12.浏览器输入http://controller/horizon无法登陆horizon仪表盘服务,提示HTTP 500错误500 Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.More information about this error may be available in the server error log.tail -n 10 /var/log/apache2/error.log[Sat Mar 25 03:24:01.146624 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] import(name)[Sat Mar 25 03:24:01.146671 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] File “/usr/share/openstack-dashboard/openstack_dashboard/settings.py”, line 335, in [Sat Mar 25 03:24:01.146914 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] from local.local_settings import * # noqa[Sat Mar 25 03:24:01.146942 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] File “/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py”, line 133, in [Sat Mar 25 03:24:01.147303 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] SECRET_KEY = secret_key.generate_or_read_from_file(’/var/lib/openstack-dashboard/secret_key’)[Sat Mar 25 03:24:01.147331 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] File “/usr/share/openstack-dashboard/horizon/utils/secret_key.py”, line 68, in generate_or_read_from_file[Sat Mar 25 03:24:01.147438 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] key = read_from_file(key_file)[Sat Mar 25 03:24:01.147464 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] File “/usr/share/openstack-dashboard/horizon/utils/secret_key.py”, line 50, in read_from_file[Sat Mar 25 03:24:01.147499 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] with open(key_file, ‘r’) as f:[Sat Mar 25 03:24:01.147544 2017] [wsgi:error] [pid 103683:tid 139708160366336] [remote 192.168.30.1:23901] IOError: [Errno 13] Permission denied: ‘/var/lib/openstack-dashboard/secret_key’解决:cd /var/lib/openstack-dashboard/ls -ltrhtotal 12Kdrwxr-xr-x 2 root root 4.0K Feb 22 11:40 secret-key-rw-r–r-- 1 root root 0 Mar 25 02:16 _var_lib_openstack-dashboard_secret_key.lock-rw------- 1 root root 64 Mar 25 02:16 secret_keydrwxr-xr-x 10 www-data www-data 4.0K Mar 25 02:16 staticchown www-data:www-data /var/lib/openstack-dashboard/secret_keyls -ltrhtotal 12Kdrwxr-xr-x 2 root root 4.0K Feb 22 11:40 secret-key-rw-r–r-- 1 root root 0 Mar 25 02:16 _var_lib_openstack-dashboard_secret_key.lock-rw------- 1 www-data www-data 64 Mar 25 02:16 secret_keydrwxr-xr-x 10 www-data www-data 4.0K Mar 25 02:16 staticservice apache2 reload3.输入域及admin凭证登陆提示Invalid credentials.tail -n 10 /var/log/apache2/error.log[Sun Mar 26 01:35:57.953542 2017] [wsgi:warn] [pid 7841:tid 140163993126784] mod_wsgi: Compiled for Python/2.7.11.[Sun Mar 26 01:35:57.953714 2017] [wsgi:warn] [pid 7841:tid 140163993126784] mod_wsgi: Runtime using Python/2.7.12.[Sun Mar 26 01:35:57.969646 2017] [mpm_event:notice] [pid 7841:tid 140163993126784] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured – resuming normal operations[Sun Mar 26 01:35:57.969747 2017] [core:notice] [pid 7841:tid 140163993126784] AH00094: Command line: ‘/usr/sbin/apache2’[Sun Mar 26 01:36:32.116454 2017] [wsgi:error] [pid 7844:tid 140163838510848] Login failed for user “admin”, remote address 192.168.30.1.解决:可能是BUG,不支持谷歌浏览器,找了好长时间原因,后来无心插柳下用火狐浏览器正常登陆4.nova服务配置完成后无法重新启动其中组件service nova-api restartservice nova-consoleauth restartservice nova-scheduler restartservice nova-conductor restart ##无法启动tail -n 10 /var/log/nova/nova-consoleauth.log2017-03-29 15:13:43.336 108033 ERROR oslo_service.service File “/usr/lib/python2.7/dist-packages/amqp/connection.py”, line 274, in _wait_method2017-03-29 15:13:43.336 108033 ERROR oslo_service.service wait()2017-03-29 15:13:43.336 108033 ERROR oslo_service.service File “/usr/lib/python2.7/dist-packages/amqp/abstract_channel.py”, line 69, in wait2017-03-29 15:13:43.336 108033 ERROR oslo_service.service return self.dispatch_method(method_sig, args, content)2017-03-29 15:13:43.336 108033 ERROR oslo_service.service File “/usr/lib/python2.7/dist-packages/amqp/abstract_channel.py”, line 87, in dispatch_method2017-03-29 15:13:43.336 108033 ERROR oslo_service.service return amqp_method(self, args)2017-03-29 15:13:43.336 108033 ERROR oslo_service.service File “/usr/lib/python2.7/dist-packages/amqp/connection.py”, line 530, in _close2017-03-29 15:13:43.336 108033 ERROR oslo_service.service (class_id, method_id), ConnectionError)2017-03-29 15:13:43.336 108033 ERROR oslo_service.service AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.2017-03-29 15:13:43.336 108033 ERROR oslo_service.service原因及解决:Rabbitmq未创建成功openstack用户,出现认证错误,创建后重启正常rabbitmqctl list_usersListing users …guest[administrator]本文转自 结束的伤感 51CTO博客,原文链接:http://blog.51cto.com/wangzhijian/1913082}

您愿意向朋友推荐“博客详情页”吗?
强烈不推荐
不推荐
一般般
推荐
强烈推荐
提交
成就一亿技术人!
hope_wisdom 发出的红包
实付元使用余额支付
点击重新获取
钱包余额
0
抵扣说明: 1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。余额充值
}
1 问题的现象[root@controller160 ~]# less /var/log/rabbitmq/rabbit@controller160.log
2020-07-16 14:32:25.765 [error] <0.21731.1548> Channel error on connection <0.20499.1547> (172.16.1.160:34298 -> 172.16.1.160:5672, vhost: '/', user: 'rabbitmq'), channel 1:
operation queue.declare caused a channel exception not_found: failed to perform operation on queue 'conductor.controller160' in vhost '/' due to timeout
2020-07-16 14:32:25.834 [warning] <0.20499.1547> closing AMQP connection <0.20499.1547> (172.16.1.160:34298 -> 172.16.1.160:5672 - nova-conductor:156924:5a96df21-0cf1-4172-99b3-14077dc0d3f2, vhost: '/', user: 'rabbitmq'):
[root@controller160 ~]# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
ID
Agent Type
Host
Availability Zone
Alive
State
Binary
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
12f5026f-2a62-49a2-8d87-ee0ca71688ea
Metadata agent
compute163
None
XXX
UP
neutron-metadata-agent
7014261e-6719-447e-882a-19f45033a6c9
Metadata agent
compute164
None
XXX
UP
neutron-metadata-agent
767a9db2-7b3a-4edc-833a-39f4c3812b70
DHCP agent
compute163
nova
XXX
UP
neutron-dhcp-agent
8df5c9ee-8086-4351-8c66-866b2d2577fa
L3 agent
compute164
nova
XXX
UP
neutron-l3-agent
aa234650-cf75-4fe4-af48-0ea14495b1a6
DHCP agent
compute164
nova
XXX
UP
neutron-dhcp-agent
b7cf0b1d-4ff0-4314-9427-8cfda3419e15
Linux bridge agent
compute164
None
XXX
UP
neutron-linuxbridge-agent
c510acb9-7123-4ae3-850c-5e5184b6542a
Linux bridge agent
compute163
None
XXX
UP
neutron-linuxbridge-agent
c6660e76-c613-4980-90ba-23c5585b79d5
Open vSwitch agent
compute163
None
XXX
UP
neutron-openvswitch-agent
dadea42c-e242-494a-a876-098cd71bcfc4
L3 agent
compute163
nova
XXX
UP
neutron-l3-agent
e611f91f-f162-47be-aebc-d6eaf824e0d0
Open vSwitch agent
compute164
None
XXX
UP
neutron-openvswitch-agent
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
[root@compute163 ~]# less /var/log/nova/nova-compute.log
2020-07-16 14:35:34.073 381825 ERROR oslo_service.service oslo_messaging.exceptions.MessageDeliveryFailure: Unable to connect to AMQP server on controller160:5672 after inf tries: Queue.declare: (4
04) NOT_FOUND - failed to perform operation on queue 'compute.compute163' in vhost '/' due to timeout
2 解决方案#具体原因没有找出来,因此直接使用暴力的方式直接重建#重建rabbitmq集群#rabbitmq所在的节点都必须执行,这里只以一台为例#停止每台节点的集群
[root@controller160 bin]# rabbitmqctl stop_app
Stopping rabbit application on node rabbit@controller160 ...
#停止rabbitmq服务
[root@controller160 bin]# systemctl stop rabbitmq-server.service
#删除或者移动mnesia目录,我这里用的是移动
[root@controller160 mnesia]# ll
total 8
drwxr-x--- 4 rabbitmq rabbitmq 4096 Jul 16 16:24 rabbit@controller160
-rw-r----- 1 rabbitmq rabbitmq
64 Jun 18 00:20 rabbit@controller160-feature_flags
drwxr-x--- 8 rabbitmq rabbitmq
178 Jul 16 15:51 rabbit@controller160-plugins-expand
[root@controller160 mnesia]# pwd
/var/lib/rabbitmq/mnesia
[root@controller160 ~]# mv /var/lib/rabbitmq/mnesia/ /tmp/mnesia
#任选1个控制节点首先启动rabbitmq服务,这里选择controller160节点
[root@controller160 ~]#systemctl start rabbitmq-server.service
[root@controller160 ~]#rabbitmqctl cluster_status
#分发.erlang.cookie
[root@controller160 ~]#scp /var/lib/rabbitmq/.erlang.cookie root@172.16.1.161:/var/lib/rabbitmq/
[root@controller160 ~]#scp /var/lib/rabbitmq/.erlang.cookie root@172.16.1.162:/var/lib/rabbitmq/
#修改controller161/162节点.erlang.cookie文件的用户/组,以controller161节点为例
[root@controller161 ~]#chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
#注意修改全部控制节点.erlang.cookie文件的权限,默认即400权限,可不修改
[root@controller161 ~]#ll /var/lib/rabbitmq/.erlang.cookie
#启动controller161/162节点的rabbitmq服务
[root@controller161 ~]#systemctl restart rabbitmq-server
[root@controller162 ~]#systemctl restart rabbitmq-server
#构建集群,controller161/162节点以ram节点的形式加入集群
[root@controller161 ~]#rabbitmqctl stop_app
[root@controller161 ~]#rabbitmqctl join_cluster --ram rabbit@controller160
[root@controller161 ~]#rabbitmqctl start_app
#重新授权,确认都为管理员权限
rabbitmqctl set_user_tags rabbitmq administrator
rabbitmqctl set_permissions -p "/" rabbitmq ".*" ".*" ".*"
[root@controller160 ~]# rabbitmqctl list_users
Listing users ...
user tags
rabbitmq [administrator]
guest [administrator]
#最后依次重启每个节点的rabbitmq
systemctl restart rabbitmq-server
3 验证服务是否恢复:#查看日志,已无报错[root@controller160 ~]# openstack network agent list
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
ID
Agent Type
Host
Availability Zone
Alive
State
Binary
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
12f5026f-2a62-49a2-8d87-ee0ca71688ea
Metadata agent
compute163
None
:-)
UP
neutron-metadata-agent
7014261e-6719-447e-882a-19f45033a6c9
Metadata agent
compute164
None
:-)
UP
neutron-metadata-agent
767a9db2-7b3a-4edc-833a-39f4c3812b70
DHCP agent
compute163
nova
:-)
UP
neutron-dhcp-agent
8df5c9ee-8086-4351-8c66-866b2d2577fa
L3 agent
compute164
nova
:-)
UP
neutron-l3-agent
aa234650-cf75-4fe4-af48-0ea14495b1a6
DHCP agent
compute164
nova
:-)
UP
neutron-dhcp-agent
b7cf0b1d-4ff0-4314-9427-8cfda3419e15
Linux bridge agent
compute164
None
XXX
UP
neutron-linuxbridge-agent
c510acb9-7123-4ae3-850c-5e5184b6542a
Linux bridge agent
compute163
None
XXX
UP
neutron-linuxbridge-agent
c6660e76-c613-4980-90ba-23c5585b79d5
Open vSwitch agent
compute163
None
:-)
UP
neutron-openvswitch-agent
dadea42c-e242-494a-a876-098cd71bcfc4
L3 agent
compute163
nova
:-)
UP
neutron-l3-agent
e611f91f-f162-47be-aebc-d6eaf824e0d0
Open vSwitch agent
compute164
None
:-)
UP
neutron-openvswitch-agent
+--------------------------------------+--------------------+------------+-------------------+-------+-------+---------------------------+
[root@controller160 ~]# openstack compute service list
+----+----------------+---------------+----------+---------+-------+----------------------------+
ID
Binary
Host
Zone
Status
State
Updated At
+----+----------------+---------------+----------+---------+-------+----------------------------+
13
nova-conductor
controller160
internal
enabled
up
2020-07-16T15:59:13.000000
19
nova-scheduler
controller160
internal
enabled
up
2020-07-16T15:59:08.000000
20
nova-conductor
controller162
internal
enabled
up
2020-07-16T15:59:01.000000
23
nova-scheduler
controller162
internal
enabled
up
2020-07-16T15:58:43.000000
25
nova-conductor
controller161
internal
enabled
up
2020-07-16T15:59:18.000000
26
nova-scheduler
controller161
internal
enabled
up
2020-07-16T15:59:17.000000
47
nova-compute
compute163
nova
enabled
up
2020-07-16T15:59:27.000000
48
nova-compute
compute164
nova
enabled
up
2020-07-16T15:59:27.000000
+----+----------------+---------------+----------+---------+-------+----------------------------+
}

我要回帖

更多关于 openstack部署 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信