Pdns Remote Backend 发生未知错误的解决方法

/ 0评 / 0

最近升级到Debian 12,发现默认的Pdns已经升级到4.7.0,然后不管怎么配置,都会提示一些错误,通过抓包又发现请求和返回都是正常的.

大致错误如下表现.

May 27 21:28:30 Backend reported condition which prevented lookup (Exception caught when receiving: While reading from HTTP endpoint 127.0.0.1:80: unknown error) sending out servfail

为什么会这样,是因为新的Pdns Server没有添加HAVE_TM_GMTOFF宏定义编译,且使用remote时候,且对端服务器是Nginx的时候,就会出现这个问题,因为对端服务器返回的Cookie日期格式是这样的.

Sat, 27-May-2023 16:30:58 GMT

而默认的只能判断的格式是这样的.

27-May-2023 16:30:58

但是其实这个库早有冗余,只是缺乏定义,如下图(ext/yahttp/yahttp/utility.hpp).

所以应该在编译之前定义.

CXXFLAGS="-DHAVE_TM_GMTOFF=1" CFLAGS="-DHAVE_TM_GMTOFF=1" ./configure --with-modules="remote bind" --disable-lua-records

这样问题就解决了~

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注