• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
百分百
http://www.qrw100.com
博客园    首页    新随笔    联系   管理    订阅  订阅

/etc/resolv.conf No such file or directory 错误问题

服务器有段时间ssh连接总是连不上,查看系统日志出现/etc/resolv.conf  No such file or directory次错误。网上找到的解决办法,但是照做了效果不明显,依然出现上述错误。不过ssh链接已经正常,真是奇了怪了,到底是什么问题呢。。。
restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory

    Sep  7 18:04:31 bora ntpd[4063]: synchronized to 220.130.158.71, stratum 2
    Sep  7 18:35:57 bora restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory

解决方法

    $ ls -i /etc/resolv.conf         #get inode 获得索引节点
    16711694 /etc/resolv.conf
    $ sudo find /etc -inum 16711694        #find hard link  找到硬链接
    Password:
    /etc/sysconfig/networking/profiles/default/resolv.conf
    /etc/resolv.conf
    $ sudo /usr/sbin/lsof|grep resolv.conf        #make sure it is not open 确保它是不开放
    $ sudo rm /etc/sysconfig/networking/profiles/default/resolv.conf      #delete
    $ sudo restorecon /etc/resolv.conf
    $ sudo ln /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf  #recreate hard link创建硬链接

posted @ 2011-11-10 14:44  爱尚美  阅读(3175)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3