这篇文章将为大家详细讲解有关OpenStack断电重启ceilometer获取数据出错怎么办,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
查看日志文件:
root@controller:/var/log/ceilometer# cat ceilometer-api.log 2017-05-31 13:57:31.620 23249 TRACE ceilometer.api.hooks ConnectionFailure: could not connect to controller:27017: [Errno 111] ECONNREFUSED 2017-05-31 13:57:31.620 23249 TRACE ceilometer.api.hooks 2017-05-31 13:57:31.749 23249 INFO ceilometer.storage.mongo.utils [-] Connecting to mongodb on [('controller', 27017)] 2017-05-31 13:57:31.750 23249 WARNING ceilometer.storage.mongo.utils [-] Unable to connect to the database server: could not connect to controller:27017: [Errno 111] ECONNREFUSED. 2017-05-31 13:57:41.751 23249 INFO ceilometer.storage.mongo.utils [-] Connecting to mongodb on [('controller', 27017)] 2017-05-31 13:57:41.751 23249 WARNING ceilometer.storage.mongo.utils [-] Unable to connect to the database server: could not connect to controller:27017: [Errno 111] ECONNREFUSED. 2017-05-31 13:57:51.752 23249 INFO ceilometer.storage.mongo.utils [-] Connecting to mongodb on [('controller', 27017)] 2017-05-31 13:57:51.752 23249 WARNING ceilometer.storage.mongo.utils [-] Unable to connect to the database server: could not connect to controller:27017: [Errno 111] ECONNREFUSED. 2017-05-31 13:58:01.762 23249 INFO ceilometer.storage.mongo.utils [-] Connecting to mongodb on [('controller', 27017)] 2017-05-31 13:58:01.762 23249 WARNING ceilometer.storage.mongo.utils [-] Unable to connect to the database server: could not connect to controller:27017: [Errno 111] ECONNREFUSED.
根据日志文件判断为 Mongodb的错误
root@controller:/var/log/mongodb# cat mongodb.log ***** SERVER RESTARTED ***** Wed May 31 11:25:53.786 [initandlisten] MongoDB starting : pid=1779 port=27017 dbpath=/var/lib/mongodb 64-bit host=controller Wed May 31 11:25:53.786 [initandlisten] db version v2.4.9 Wed May 31 11:25:53.786 [initandlisten] git version: nogitversion Wed May 31 11:25:53.786 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54 Wed May 31 11:25:53.786 [initandlisten] allocator: tcmalloc Wed May 31 11:25:53.786 [initandlisten] options: { bind_ip: "192.168.1.170", config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", nojournal: "true", noprealloc: "true", smallfiles: "true" } ************** **Unclean shutdown detected.** Please visit http://dochub.mongodb.org/core/repair for recovery instructions. ************* Wed May 31 11:25:53.797 [initandlisten] exception in initAndListen: 12596 old lock file, terminating Wed May 31 11:25:53.797 dbexit: Wed May 31 11:25:53.797 [initandlisten] shutdown: going to close listening sockets... Wed May 31 11:25:53.797 [initandlisten] shutdown: going to flush diaglog... Wed May 31 11:25:53.797 [initandlisten] shutdown: going to close sockets... Wed May 31 11:25:53.797 [initandlisten] shutdown: waiting for fs preallocator... Wed May 31 11:25:53.797 [initandlisten] shutdown: closing all files... Wed May 31 11:25:53.797 [initandlisten] closeAllFiles() finished Wed May 31 11:25:53.797 dbexit: really exiting now
可以看出错误为Unclean shutdown detected. 然后根据此百度查找方法,解决方案 记得要修改数据库文件为 mongdb用户和组
关于“OpenStack断电重启ceilometer获取数据出错怎么办”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。