您当前的位置: 首页 >  服务器

mutourend

暂无认证

  • 1浏览

    0关注

    661博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

阿里云服务器中应用程序连接阿里云redis域名报错问题解决

mutourend 发布时间:2019-08-23 17:41:06 ,浏览量:1

程序在阿里云服务器上运行时,如连接阿里云redis域名时,程序会出现无法连接的情况。目前的做法是修改阿里云服务器的/etc/resolv.conf文件,将第三行内容注释掉。但是重启后仍需手动修改。

nameserver xxx.xx.xx.xx
nameserver xxx.xx.xx.xx
#options timeout:2 attempts:3 rotate single-request-reopen  

根本的解决办法为:

# vim /etc/resolvconf/resolv.conf.d/tail
注释其中的内容“options timeout:2 attempts:3 rotate single-request-reopen ” 
原因为:/etc/resolvconf/resolv.conf.d/tail文件会默认覆盖/etc/resolv.conf中的最后一行配置。

# sudo resolvconf -u
使修改生效。
关注
打赏
1664532908
查看更多评论
立即登录/注册

微信扫码登录

0.0410s