doufan9805 2018-05-02 00:08
浏览 124

Apache 2.4:php_network_getaddresses:getaddrinfo失败: - 没有进行DNS查找

Mostly posting this as a rubber duck method and for my future self.

We have a RHEL 7.4 server running Apache 2.4 (httpd24-httpd-2.4.27-8.el7.x86_64) with mod_php (no php-fpm). Today, all of the sudden about 20 of our servers started failing in our PHP app with php_network_getaddresses: getaddrinfo failed:. Doing a systemctl restart httpd24-httpd resolves the issue, (reload does not (opcache). If I monitor DNS resolution with tcpdump -i eth0 -vvv -nn udp port 53 I don't even see the DNS lookups being made, however I do see others. It appears that Apache isn't even making the DNS requests that PHP wants. These servers reboot daily and had all turned on around 7am or later so they weren't running that long (not some kind of buildup) and had been operating fine for months.

Our main concern now is that our production servers are running the same stack and although production has been fine I want to avoid this issue reaching production.

Why would Apache all of the sudden stop making DNS lookups? (It doesn't even make it to /etc/hosts)

  • 写回答

1条回答 默认 最新

  • donglu8334 2018-08-02 18:53
    关注

    I traced the issue to the fact that system patching was performed and glibc was updated and the processes (and system) were not rebooted. I rebooted the httpd service and DNS lookups were working again. I suspect it had something to do with the old glibc still being in memory along with bits of the new glibc.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料