« August 2006 | 首页 | January 2007 »
December 27, 2006
bind9的部分FAQ
log日志报如下错误:
27-Dec-2006 23:02:57.118 general: error: dns_master_load: localhost.zone:2: unexpected end of line
27-Dec-2006 23:02:57.118 general: error: dns_master_load: localhost.zone:1: unexpected end of input
27-Dec-2006 23:02:57.118 general: error: zone localhost/IN: loading master file localhost.zone: unexpected end of input
解决办法:
localhost.zone配置文件里TTL前加上$
process `named' is using obsolete setsockopt SO_BSDCOMPAT
今天安装bind 9.3.3,成功安装后,message报如下错误
process `named' is using obsolete setsockopt SO_BSDCOMPAT
解决办法:
将Bind得tar包解压后,在其/lib/isc/unix/socket.c里面找到需要修改的代码:
首先找到这个 (在1297行附近):
#if defined(USE_CMSG) || defined(SO_BSDCOMPAT)
int on = 1;
改成:
#if defined(USE_CMSG)
int on = 1;
************************************************************
#ifdef SO_BSDCOMPAT
if (setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
(void *)&on, sizeof on) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, SO_BSDCOMPAT) %s: %s",
sock->fd,
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_FAILED, "failed"),
strbuf);
/* Press on... /*
}
#endif