Failed to obtain address information for hostname mynode1: Name or service not known
来源:互联网 发布:水溶性颜料淘宝 编辑:程序博客网 时间:2024/05/20 20:57
启动mongodb的时候报以下错,意思是获取不到地址对应的主机名,这一般与HOSTS有关
Failed to obtain address information for hostname mynode1: Name or service not known
2016-05-19T15:18:53.339+0800 I CONTROL [initandlisten] MongoDB starting : pid=16871 port=27017 dbpath=/data/db 64-bit host=mdb2016-05-19T15:18:53.340+0800 I CONTROL [initandlisten] db version v3.2.32016-05-19T15:18:53.340+0800 I CONTROL [initandlisten] git version: b326ba837cf6f49d65c2f85e1b70f6f31ece79372016-05-19T15:18:53.340+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 20132016-05-19T15:18:53.340+0800 I CONTROL [initandlisten] allocator: tcmalloc2016-05-19T15:18:53.340+0800 I CONTROL [initandlisten] modules: none2016-05-19T15:18:53.856+0800 I CONTROL [initandlisten] 2016-05-19T15:18:53.856+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.2016-05-19T15:18:53.856+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'2016-05-19T15:18:53.856+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.2016-05-19T15:18:53.856+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'2016-05-19T15:18:53.856+0800 I CONTROL [initandlisten] 2016-05-19T15:18:53.859+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'2016-05-19T15:18:53.860+0800 I NETWORK [initandlisten] waiting for connections on port 270172016-05-19T15:18:53.860+0800 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker2016-05-19T15:18:53.918+0800 W NETWORK [HostnameCanonicalizationWorker] Failed to obtain address information for hostname mynode1: Name or service not known首先检查hosts文件,看是否有服务器IP地址对应的主机名[root@w ~]# more /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6发现没有地址对应的主机名,手动添加以下条目192.168.10.10 mdb再次重新启动mongodb,错误消失,看来mongodb启动需要解析hosts,这点与oracle RAC 有点类似,Mark一下
# nohup ./mongod > mongo.out &
# tail -50 mongo.out
2016-05-19T16:56:24.685+0800 I CONTROL [initandlisten] MongoDB starting : pid=22471 port=27017 dbpath=/data/db 64-bit host=mdb2016-05-19T16:56:24.686+0800 I CONTROL [initandlisten] db version v3.2.32016-05-19T16:56:24.686+0800 I CONTROL [initandlisten] git version: b326ba837cf6f49d65c2f85e1b70f6f31ece79372016-05-19T16:56:24.686+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 20132016-05-19T16:56:24.686+0800 I CONTROL [initandlisten] allocator: tcmalloc2016-05-19T16:56:24.686+0800 I CONTROL [initandlisten] modules: none2016-05-19T16:56:25.176+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.2016-05-19T16:56:25.176+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'2016-05-19T16:56:25.176+0800 I CONTROL [initandlisten] 2016-05-19T16:56:25.176+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.2016-05-19T16:56:25.176+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'2016-05-19T16:56:25.176+0800 I CONTROL [initandlisten] 2016-05-19T16:56:25.179+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'2016-05-19T16:56:25.180+0800 I NETWORK [initandlisten] waiting for connections on port 270172016-05-19T16:56:25.180+0800 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
0 0
- Failed to obtain address information for hostname mynode1: Name or service not known
- MongoDB:[HostnameCanonicalizationWorker] Failed to obtain address information for hostname
- Unable to resolve address ' ' service ' ': Name or service not known
- Unable to resolve address ' ' service ' ': Name or service not known
- Failed to obtain address information for hostname-记一次Mongodb无法启动
- could not translate host name “localhost”, service “5432″ to address: Name or service not known
- Could not resolve hostname 。。。。。。: Name or service not known
- apache启动失败:Name or service not known: mod_unique_id: unable to find IPv4 address of "narkii"
- Name or service not known
- ssh: Could not resolve hostname devsrv: Name or service not known
- ssh: Could not resolve hostname code.csdn.net: Name or service not known
- ssh: Could not resolve hostname hadoop0: Name or service not known
- Could not resolve hostname hadoop.master: Name or service not known
- Could not resolve hostname t143ghl: Name or service not known lost connection
- hadoop启动时,报ssh: Could not resolve hostname xxx: Name or service not known
- ssh: Could not resolve hostname guard.: Name or service not known
- IP address '121.41.35.30' could not be resolved: Name or service not known解决方法
- git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known--解决方式
- iOS音频的后台播放总结(后台网络请求歌曲,Remote控制,锁屏封面,各种打断)
- ssl例4
- Linux驱动之设备模型(9)-platform
- 第12周项目1 一个定义完整的类
- (转载)Unity3D研究院之获取摄像机的视口区域
- Failed to obtain address information for hostname mynode1: Name or service not known
- 如何防止SQLserver服务器被黑?
- memset函数
- 使用log4jdbc记录SQL信息
- LOJ 1422 Halloween Costumes【区间DP】
- swift网络数据请求方法
- ElasticSearch(九)-分布式搜索
- Windows下安装node及基本操作
- 类工厂方法是什么?