Chinaunix

标题: windows 下的LDAP:日志问题 [打印本页]

作者: zhaowx    时间: 2005-06-20 17:11
标题: windows 下的LDAP:日志问题
windows 下的OPENLDAP中,日志只能写在一个文件里: log.0000000001,问题:
1、一个文件时间长了太大(20M),无法打开,如何象其他应用服务器那样,一天一个日志文件,如:2005-06-01.txt,2005-06-02.txt?

2、为何此文件一旦删除,OPENLDAP服务器就启动不了:

slapd startup: initiated.
backend_startup: starting "o=dtedu.org"
bdb_db_open: dbenv_open(./data)
bdb(o=dtedu.org): PANIC: fatal region error detected; run recovery
bdb_db_open: dbenv_open failed: DB_RUNRECOVERY: Fatal error, run database recove
ry (-30977)
backend_startup: bi_db_open failed! (-30977)
slapd shutdown: initiated
====>; bdb_cache_release_all
bdb(o=dtedu.org): DB_ENV->;lock_id_free interface requires an environment configu
red for the locking subsystem
slapd shutdown: freeing system resources.
bdb(o=dtedu.org): txn_checkpoint interface requires an environment configured fo
r the transaction subsystem
bdb_db_destroy: txn_checkpoint failed: Invalid argument (22)
slapd stopped.
connections_destroy: nothing to destroy.

专家出手。。。。。
作者: huhz1979    时间: 2005-06-21 08:30
标题: windows 下的LDAP:日志问题
zhaowx  你好,能告诉我windows下的LDAP怎么安装吗?要到哪里下载?3X
作者: py    时间: 2005-06-22 23:23
标题: windows 下的LDAP:日志问题
[quote]原帖由 "huhz1979"]zhaowx  你好,能告诉我windows下的LDAP怎么安装吗?要到哪里下载?3X[/quote 发表:

http://download.bergmans.us/openldap/
作者: gary_tay88    时间: 2005-06-28 15:20
标题: windows 下的LDAP:日志问题
Or:

http://www.openldap.org/faq/data/cache/803.html
作者: gary_tay88    时间: 2005-06-28 15:55
标题: windows 下的LDAP:日志问题
I assume you are using BDB 4.2.52 with necessary patches, never use BDB 4.3.XX as OpenLDAP.org developers has not tested it fully.

[root@host /var/lib/ldap]# file log.0000000001
log.0000000001: data

This file is NOT a textual log file, it is part of the OpenLDAP database log file, please do not anyhow remove it.

To "autoremove" un-wanted/outdated BDB log files:

1) Add a "checkpoint" directive to slapd.conf, eg:

checkpoint 256 15

2) Add a "set_flags DB_LOG_AUTOREMOVE" directive to DB_CONFIG (in OpenLDAP data files directory, eg: /var/lib/ldap)

set_flags DB_LOG_AUTOREMOVE

3) Restart slapd.

Gary

See "man slapd-bdb" for more info
===
checkpoint <kbyte>; <min>;
              Specify the frequency for checkpointing the database transaction
              log  upon  updating  of  the database.  A checkpoint flushes the
              database buffers to disk and writes a checkpoint record  in  the
              log.   Upon a database update, a checkpoint will occur if either
              <kbyte>; data has been written or <min>; minutes have passed since
              the  last  checkpoint.  Both arguments default to zero, in which
              case they are ignored.  Note: checkpointing  by  this  directive
              occurs only upon execution of a database update.  If one desires
              checkpointing to occur otherwise, db_checkpoint(1) or some other
              external  process  should be used to cause a database checkpoint
              to be taken.  See the  Berkeley  DB  reference  guide  for  more
              details.
===

See this post in OpenLDAP SW mail list:

http://www.openldap.org/lists/openldap-software/200412/msg00104.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2