Hi wonderful ppl at openldap- Running 2.4.37 - on centos 6.4
using following ldif to update olcDbConfig dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcDbConfig olcDbConfig: set_lg_max 10485760 olcDbConfig: set_lg_regionmax 262144 olcDbConfig: set_lg_bsize 2097152 olcDbConfig: set_lg_dir /var/lib/ldap/ olcDbConfig: set_lk_max_locks 8192 olcDbConfig: set_lk_max_objects 8192 olcDbConfig: set_flags DB_LOG_AUTOREMOVE olcDbConfig: set_tas_spins 1 -
ldapmodifyx -d 1 -h localhost -D 'cn=Manager,cn=config' -W -f /var/tmp/ldif
Getting the following error res_errno: 80, res_error: <failed to reopen database, rc=22>, res_matched: <> ldap_free_request (origid 2, msgid 2) ldap_parse_result ber_scanf fmt ({iAA) ber: ber_scanf fmt (}) ber: ldap_msgfree ldap_err2string ldap_modify: Other (e.g., implementation specific) error (80) additional info: failed to reopen database, rc=22
Going through the list lead me to believe that changes will be applied after the restart? but didnt say it causes an error. Also does olcDbNoSync play a role here ?
Can someone shed some light on this?
Daniel Jung wrote:
Hi wonderful ppl at openldap- Running 2.4.37 - on centos 6.4
using following ldif to update olcDbConfig dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcDbConfig olcDbConfig: set_lg_max 10485760 olcDbConfig: set_lg_regionmax 262144 olcDbConfig: set_lg_bsize 2097152 olcDbConfig: set_lg_dir /var/lib/ldap/ olcDbConfig: set_lk_max_locks 8192 olcDbConfig: set_lk_max_objects 8192 olcDbConfig: set_flags DB_LOG_AUTOREMOVE olcDbConfig: set_tas_spins 1
ldapmodifyx -d 1 -h localhost -D 'cn=Manager,cn=config' -W -f /var/tmp/ldif
Getting the following error res_errno: 80, res_error: <failed to reopen database, rc=22>, res_matched: <> ldap_free_request (origid 2, msgid 2) ldap_parse_result ber_scanf fmt ({iAA) ber: ber_scanf fmt (}) ber: ldap_msgfree ldap_err2string ldap_modify: Other (e.g., implementation specific) error (80) additional info: failed to reopen database, rc=22
Going through the list lead me to believe that changes will be applied after the restart? but didnt say it causes an error. Also does olcDbNoSync play a role here ?
The change is applied immediately, there should not be any restart required. Unfortunately, it seems like the changes you applied were invalid for the version of BerkeleyDB you're using. Your LDIF worked perfectly fine for me, using BDB 5.3.21.
Another possibility is that the directory you specified for set_lg_dir was invalid, didn't exist, or you didn't have permissions to write it. One further possibility is that you were changing this value - in that case, you need to make sure to manually move all of the BDB logfiles from the old location to the new location first, otherwise BDB won't be able to find them and it will think the BDB environment is corrupted.
Using the -d debug flag on the client doesn't tell you anything useful though, you need to use -d on slapd to see what the actual error was.
Howard Chu wrote:
Daniel Jung wrote:
Hi wonderful ppl at openldap- Running 2.4.37 - on centos 6.4
using following ldif to update olcDbConfig dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcDbConfig olcDbConfig: set_lg_max 10485760 olcDbConfig: set_lg_regionmax 262144 olcDbConfig: set_lg_bsize 2097152 olcDbConfig: set_lg_dir /var/lib/ldap/ olcDbConfig: set_lk_max_locks 8192 olcDbConfig: set_lk_max_objects 8192 olcDbConfig: set_flags DB_LOG_AUTOREMOVE olcDbConfig: set_tas_spins 1
ldapmodifyx -d 1 -h localhost -D 'cn=Manager,cn=config' -W -f /var/tmp/ldif
It looks like this functionality has been broken in slapd since 2.4.32. You should get the patch for ITS#7750 to make sure slapd processees the modify request.
Just upgraded on one box to see if this was indeed the cause but still running into same issue.
528b0ebb @(#) $OpenLDAP: slapd 2.4.38 (Nov 19 2013 07:17:09) $ <snip> 528b0ece conn=1003 op=1 do_modify: dn (olcDatabase={2}hdb,cn=config) => ldap_bv2dn(olcDatabase={2}hdb,cn=config,0) <= ldap_bv2dn(olcDatabase={2}hdb,cn=config)=0 => ldap_dn2bv(272) <= ldap_dn2bv(olcDatabase={2}hdb,cn=config)=0 => ldap_dn2bv(272) <= ldap_dn2bv(olcDatabase={2}hdb,cn=config)=0 528b0ece conn=1003 op=1 modifications: 528b0ece replace: olcDbConfig 528b0ece multiple values 528b0ece bdb(dc=example,dc=com): Error: closing the transaction region with active transactions 528b0ece bdb_db_close: database "dc=example,dc=com": close failed: Invalid argument (22) 528b0ece hdb_cf_cleanup: failed to reopen database, rc=22 528b0ece send_ldap_result: err=80 matched="" text="failed to reopen database, rc=22" 528b0ece daemon: abnormal condition, shutdown initiated. 528b0ece slapd shutdown: waiting for 0 operations/tasks to finish
Tried downgrading to the distro version /usr/sbin/slapd -VV @(#) $OpenLDAP: slapd 2.4.23 (Aug 8 2012 16:29:21) $
And ldapmodify worked .
ITS#7750 was supposed to be fixed in .38?
Thanks
On 2013-11-18 9:24 PM, Howard Chu wrote:
Howard Chu wrote:
Daniel Jung wrote:
Hi wonderful ppl at openldap- Running 2.4.37 - on centos 6.4
using following ldif to update olcDbConfig dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcDbConfig olcDbConfig: set_lg_max 10485760 olcDbConfig: set_lg_regionmax 262144 olcDbConfig: set_lg_bsize 2097152 olcDbConfig: set_lg_dir /var/lib/ldap/ olcDbConfig: set_lk_max_locks 8192 olcDbConfig: set_lk_max_objects 8192 olcDbConfig: set_flags DB_LOG_AUTOREMOVE olcDbConfig: set_tas_spins 1
ldapmodifyx -d 1 -h localhost -D 'cn=Manager,cn=config' -W -f /var/tmp/ldif
It looks like this functionality has been broken in slapd since 2.4.32. You should get the patch for ITS#7750 to make sure slapd processees the modify request.
Daniel Jung wrote:
Just upgraded on one box to see if this was indeed the cause but still running into same issue.
528b0ebb @(#) $OpenLDAP: slapd 2.4.38 (Nov 19 2013 07:17:09) $
ITS#7750 was supposed to be fixed in .38?
ITS#7750 was fixed *after* releasing 2.4.38.
Ciao, Michael.
following seems to indicate that it isn't a permission issue. I am running old version DB, 4.7 from our favourite distro repo :( Seems like there is transaction that is not being closed properly??
528af863 connection_get(16) => ldap_bv2dn(cn=Manager,cn=config,0) <= ldap_bv2dn(cn=Manager,cn=config)=0 => ldap_dn2bv(272) <= ldap_dn2bv(cn=Manager,cn=config)=0 => ldap_dn2bv(272) <= ldap_dn2bv(cn=manager,cn=config)=0 528af863 send_ldap_result: err=0 matched="" text="" 528af863 connection_get(16) 528af863 conn=1003 op=1 do_modify: dn (olcDatabase={2}hdb,cn=config) => ldap_bv2dn(olcDatabase={2}hdb,cn=config,0) <= ldap_bv2dn(olcDatabase={2}hdb,cn=config)=0 => ldap_dn2bv(272) <= ldap_dn2bv(olcDatabase={2}hdb,cn=config)=0 => ldap_dn2bv(272) <= ldap_dn2bv(olcDatabase={2}hdb,cn=config)=0 528af863 conn=1003 op=1 modifications: 528af863 replace: olcDbConfig 528af863 multiple values 528af863 bdb(dc=example,dc=com): Error: closing the transaction region with active transactions 528af863 bdb_db_close: database "dc=example,dc=com": close failed: Invalid argument (22) 528af863 hdb_cf_cleanup: failed to reopen database, rc=22 528af863 send_ldap_result: err=80 matched="" text="failed to reopen database, rc=22" 528af863 daemon: abnormal condition, shutdown initiated.
On 2013-11-18 8:36 PM, Howard Chu wrote:
Daniel Jung wrote:
Hi wonderful ppl at openldap- Running 2.4.37 - on centos 6.4
using following ldif to update olcDbConfig dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcDbConfig olcDbConfig: set_lg_max 10485760 olcDbConfig: set_lg_regionmax 262144 olcDbConfig: set_lg_bsize 2097152 olcDbConfig: set_lg_dir /var/lib/ldap/ olcDbConfig: set_lk_max_locks 8192 olcDbConfig: set_lk_max_objects 8192 olcDbConfig: set_flags DB_LOG_AUTOREMOVE olcDbConfig: set_tas_spins 1
ldapmodifyx -d 1 -h localhost -D 'cn=Manager,cn=config' -W -f /var/tmp/ldif
Getting the following error res_errno: 80, res_error: <failed to reopen database, rc=22>, res_matched: <> ldap_free_request (origid 2, msgid 2) ldap_parse_result ber_scanf fmt ({iAA) ber: ber_scanf fmt (}) ber: ldap_msgfree ldap_err2string ldap_modify: Other (e.g., implementation specific) error (80) additional info: failed to reopen database, rc=22
Going through the list lead me to believe that changes will be applied after the restart? but didnt say it causes an error. Also does olcDbNoSync play a role here ?
The change is applied immediately, there should not be any restart required. Unfortunately, it seems like the changes you applied were invalid for the version of BerkeleyDB you're using. Your LDIF worked perfectly fine for me, using BDB 5.3.21.
Another possibility is that the directory you specified for set_lg_dir was invalid, didn't exist, or you didn't have permissions to write it. One further possibility is that you were changing this value - in that case, you need to make sure to manually move all of the BDB logfiles from the old location to the new location first, otherwise BDB won't be able to find them and it will think the BDB environment is corrupted.
Using the -d debug flag on the client doesn't tell you anything useful though, you need to use -d on slapd to see what the actual error was.
openldap-technical@openldap.org