阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

OpenStack排错常用步骤和命令

276次阅读
没有评论

共计 5483 个字符,预计需要花费 14 分钟才能阅读完成。

1. 查看日志
OpenStack 的日志系统设计的非常棒。大多数的问题都能从日志中找到原因。日志路径在 /var/log/ 下。

OpenStack 排错常用步骤和命令

哪里有问题就去哪里找:去相应的日志文件夹查看日志。

比如上传镜像报错,就去 /var/log/glance/

如果实例启动失败,就去 /var/log/nova 下查看。注意 nova 的日志分布于 controller 节点和 compute 节点

2. 端口被占用
比如 keystone 集成到 apache 里了,使用 80 端口。如果 80 端口被其他服务占用,那就完蛋了。

正常情况是:

[root@linuxidc ~]# lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 11267 root 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108466 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108467 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108468 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108469 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108470 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108597 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 108598 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)
httpd 109362 apache 8u IPv6 41441 0t0 TCP *:http (LISTEN)

3. 查看租户 / 工程
租户 tenant 和工程 project 在 openstack 中本质是一样的。新版本已经不再区分这 2 个概念
openstack project list

4. 检查服务状态
  ps -aux | grep keystone 或者 ps -ef | grep keystone

5. 查看 openstack 发行版本
nova 是从 openstack 第一版就出现的 ” 祖师爷 ” 组件,借他的版本号可以知晓 openstack 的版本
nova-manage –version
14.0.2
对应着 N 版本

6. 在 Mikata 中:
查看所有的组件状态:openstack-status

[root@infra2 ~]# openstack-status
== Nova services ==
openstack-nova-api: active
openstack-nova-compute: active
openstack-nova-network: inactive (disabled on boot)
openstack-nova-scheduler: active
openstack-nova-cert: active
openstack-nova-conductor: active
openstack-nova-console: inactive (disabled on boot)
openstack-nova-consoleauth: active
openstack-nova-xvpvncproxy: inactive (disabled on boot)
== Glance services ==
openstack-glance-api: active
openstack-glance-registry: active
== Keystone service ==
openstack-keystone: inactive (disabled on boot)
== Horizon service ==
openstack-dashboard: active
== neutron services ==
neutron-server: active
neutron-dhcp-agent: active
neutron-l3-agent: active
neutron-metadata-agent: active
neutron-openvswitch-agent: active
neutron-metering-agent: active
== Swift services ==
openstack-swift-proxy: active
openstack-swift-account: active
openstack-swift-container: active
openstack-swift-object: active
== Cinder services ==
openstack-cinder-api: active
openstack-cinder-scheduler: active
openstack-cinder-volume: active
openstack-cinder-backup: active
== Ceilometer services ==
openstack-ceilometer-api: inactive (disabled on boot)
openstack-ceilometer-central: active
openstack-ceilometer-compute: active
openstack-ceilometer-collector: active
openstack-ceilometer-notification: active
== Support services ==
mariadb: active
libvirtd: active
openvswitch: active
dbus: active
target: active
rabbitmq-server: active
memcached: active
== Keystone users ==
Warning keystonerc not sourced

查看所有服务的状态:

[root@infra2 ~]# openstack-service status
MainPID=3628 Id=neutron-dhcp-agent.service ActiveState=active
MainPID=3627 Id=neutron-l3-agent.service ActiveState=active
MainPID=1324 Id=neutron-metadata-agent.service ActiveState=active
MainPID=1296 Id=neutron-metering-agent.service ActiveState=active
MainPID=3638 Id=neutron-openvswitch-agent.service ActiveState=active
MainPID=1348 Id=neutron-server.service ActiveState=active
MainPID=1301 Id=openstack-aodh-evaluator.service ActiveState=active
MainPID=1316 Id=openstack-aodh-listener.service ActiveState=active
MainPID=1318 Id=openstack-aodh-notifier.service ActiveState=active
MainPID=1282 Id=openstack-ceilometer-central.service ActiveState=active
MainPID=1291 Id=openstack-ceilometer-collector.service ActiveState=active
MainPID=1287 Id=openstack-ceilometer-compute.service ActiveState=active
MainPID=1350 Id=openstack-ceilometer-notification.service ActiveState=active
MainPID=1339 Id=openstack-cinder-api.service ActiveState=active
MainPID=1292 Id=openstack-cinder-backup.service ActiveState=active
MainPID=1341 Id=openstack-cinder-scheduler.service ActiveState=active
MainPID=1293 Id=openstack-cinder-volume.service ActiveState=active
MainPID=1285 Id=openstack-glance-api.service ActiveState=active
MainPID=1336 Id=openstack-glance-registry.service ActiveState=active
MainPID=1288 Id=openstack-gnocchi-metricd.service ActiveState=active
MainPID=1352 Id=openstack-gnocchi-statsd.service ActiveState=active
MainPID=0 Id=openstack-losetup.service ActiveState=active
MainPID=1351 Id=openstack-nova-api.service ActiveState=active
MainPID=1346 Id=openstack-nova-cert.service ActiveState=active
MainPID=3631 Id=openstack-nova-compute.service ActiveState=active
MainPID=1353 Id=openstack-nova-conductor.service ActiveState=active
MainPID=1306 Id=openstack-nova-consoleauth.service ActiveState=active
MainPID=1286 Id=openstack-nova-novncproxy.service ActiveState=active
MainPID=1345 Id=openstack-nova-scheduler.service ActiveState=active
MainPID=1297 Id=openstack-swift-account-auditor.service ActiveState=active
MainPID=1305 Id=openstack-swift-account-reaper.service ActiveState=active
MainPID=1317 Id=openstack-swift-account-replicator.service ActiveState=active
MainPID=1280 Id=openstack-swift-account.service ActiveState=active
MainPID=1283 Id=openstack-swift-container-auditor.service ActiveState=active
MainPID=1340 Id=openstack-swift-container-replicator.service ActiveState=active
MainPID=1321 Id=openstack-swift-container-updater.service ActiveState=active
MainPID=1279 Id=openstack-swift-container.service ActiveState=active
MainPID=1325 Id=openstack-swift-object-auditor.service ActiveState=active
MainPID=1289 Id=openstack-swift-object-expirer.service ActiveState=active
MainPID=1349 Id=openstack-swift-object-replicator.service ActiveState=active
MainPID=1338 Id=openstack-swift-object-updater.service ActiveState=active
MainPID=1278 Id=openstack-swift-object.service ActiveState=active
MainPID=1277 Id=openstack-swift-proxy.service ActiveState=active

7.OK

  • http://www.linuxidc.com/Linux/2017-05/144279.htm
  • http://www.linuxidc.com/Linux/2017-05/144280.htm
  • http://www.linuxidc.com/Linux/2017-05/144281.htm

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-06/144676.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计5483字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中