OpenStack排错常用步骤和命令

栏目: 编程工具 · 发布时间: 7年前

内容简介:OpenStack排错常用步骤和命令

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


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

互联网产品运营:产品经理的10堂精英课

互联网产品运营:产品经理的10堂精英课

丁华、聂嵘海、王晶 / 电子工业出版社 / 2017-5 / 59

《互联网产品运营:产品经理的10堂精英课》共有10章,前9章分别从互联网产品运营的9个点入手,最后一章辅以案例,分析当下市场热门产品的运营模式。 第1章点明在运营产品之前需要经过缜密的策划,这样才能有明确的运营方向;第2章讲述产品运营的定位,有了准确的定位,运营才不会走偏;第3章描述用户运营,用户是一款产品的根本,没有用户,产品就是死的;第4章讲述内容运营的技巧,产品内容要怎么运营才能受到用......一起来看看 《互联网产品运营:产品经理的10堂精英课》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

MD5 加密
MD5 加密

MD5 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具