Re: Logging Region out of memory

2018-06-14 Thread Scott Mayo
On Wed, Jun 13, 2018 at 8:49 AM, Howard Chu  wrote:

> Michael Ströder wrote:
>
>> On 06/12/2018 06:56 PM, Scott Mayo wrote:
>>
>>> Openldap version is 2.4.12
>>>
>>
>> Seriously? This is really ancient release almost 10 years old.
>> Being in your position my next task would be to update such an old
>> system (not only because of OpenLDAP).
>>
>
I am, unfortunately it will be a Windows Server.



>
>> Logging region out of memory; you may need to increase its size
>>> db_open(/var/lib/ldap/id2entry.bdb) failed: Cannot allocate memory (12).
>>>
>>
>> What does your monitoring say about memory usage before that log message?
>>
>
> System-wide memory usage is irrelevant, this is a BDB error message.
>


Memory usage was fine in TOP.  The tweaks fixed it, which is just what I
needed to get it going for a short time.


>
> See https://docs.oracle.com/database/bdb181/html/api_reference/
> C/envset_lg_bsize.html
>
> And switch to back-mdb after you upgrade to a current OpenLDAP release.


Actually, I am moving to Windows 2016. :(  Not because of me, but I plan on
retiring in a few years and when I do, whoever comes after me will more
than likely be a Windows guy and not Linux.  I am trying to get everything
ready for the next person when I leave.  We live in a small Rural Community
and there are virtually no techs around here that deal with Linux anymore.

Thanks for the help.

-- 
Scott Mayo - System Administrator
Bloomfield Schools PH: 573-568-5669  FA: 573-568-4565


Re: Logging Region out of memory

2018-06-14 Thread Scott Mayo
On Wed, Jun 13, 2018 at 1:37 AM, Dieter Klünter  wrote:

> Am Tue, 12 Jun 2018 11:56:23 -0500
> schrieb Scott Mayo :
>
> > I just started getting this early this morning.  I set this server up
> > a number of years ago.  I am getting ready to put a new one in place,
> > but need to get this back up and going in the mean time.
> >
> > Openldap version is 2.4.12
> >
> > /sbin/service ldap start
> >
> > Checking configuration files for slapd:[FAILED]
> > Logging region out of memory; you may need to increase its size
> > db_open(/var/lib/ldap/id2entry.bdb) failed: Cannot allocate memory
> > (12). backend_startup_one: bi_db_open failed! (12)
> > slap_startup failed (test would succeed using the -u switch)
> > stale lock files may be present in /var/lib/ldap   [WARNING]
> >
> > Any ideas on what I need to check there?  Thanks.
>
> The reference to -u switch leads to the impression that filesystem
> owwnership of slapd.conf and bdb database files is not appropriate.
> In addition you may check the database with BerkeleyDB tools, i.e.
> db_stat.
>

Thanks. I forgot to reply yesterday.  I ended up tweaking the
set_cachesize and set_lg_regionmax up just a bit in the DB_CONFIG and that
let ldap run and everything is working now.  Anytime I have ever had
problems in the past was usually some power failure and as you say the file
permissions got changed and I would change them back.

I found it odd that I needed to move those up any though, since I have not
added any users or anything in quite some time.

-- 
Scott Mayo - System Administrator
Bloomfield Schools PH: 573-568-5669  FA: 573-568-4565


Re: Logging Region out of memory

2018-06-13 Thread Howard Chu

Scott Mayo wrote:
Actually, I am moving to Windows 2016. :(  Not because of me, but I plan on 
retiring in a few years and when I do, whoever comes after me will more than 
likely be a Windows guy and not Linux.  I am trying to get everything ready 
for the next person when I leave.  We live in a small Rural Community and 
there are virtually no techs around here that deal with Linux anymore.


Bad news for whoever takes over after you. Windows requires a lot more 
vigilance than Linux.


https://www.theregister.co.uk/2018/06/12/patch_tuesday_microsoft_june_2018/

Also, as an aside - OpenLDAP on Windows is still superior to Microsoft AD...

--
  -- Howard Chu
  CTO, Symas Corp.   http://www.symas.com
  Director, Highland Sun http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



Re: Logging Region out of memory

2018-06-13 Thread Howard Chu

Michael Ströder wrote:

On 06/12/2018 06:56 PM, Scott Mayo wrote:

Openldap version is 2.4.12


Seriously? This is really ancient release almost 10 years old.
Being in your position my next task would be to update such an old
system (not only because of OpenLDAP).


Logging region out of memory; you may need to increase its size
db_open(/var/lib/ldap/id2entry.bdb) failed: Cannot allocate memory (12).


What does your monitoring say about memory usage before that log message?


System-wide memory usage is irrelevant, this is a BDB error message.

See 
https://docs.oracle.com/database/bdb181/html/api_reference/C/envset_lg_bsize.html


And switch to back-mdb after you upgrade to a current OpenLDAP release.

--
  -- Howard Chu
  CTO, Symas Corp.   http://www.symas.com
  Director, Highland Sun http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



Re: Logging Region out of memory

2018-06-13 Thread Dieter Klünter
Am Tue, 12 Jun 2018 11:56:23 -0500
schrieb Scott Mayo :

> I just started getting this early this morning.  I set this server up
> a number of years ago.  I am getting ready to put a new one in place,
> but need to get this back up and going in the mean time.
> 
> Openldap version is 2.4.12
> 
> /sbin/service ldap start
> 
> Checking configuration files for slapd:        [FAILED]
> Logging region out of memory; you may need to increase its size
> db_open(/var/lib/ldap/id2entry.bdb) failed: Cannot allocate memory
> (12). backend_startup_one: bi_db_open failed! (12)
> slap_startup failed (test would succeed using the -u switch)
> stale lock files may be present in /var/lib/ldap   [WARNING]
> 
> Any ideas on what I need to check there?  Thanks.

The reference to -u switch leads to the impression that filesystem
owwnership of slapd.conf and bdb database files is not appropriate.
In addition you may check the database with BerkeleyDB tools, i.e.
db_stat.

-Dieter

-- 
Dieter Klünter | Systemberatung
http://sys4.de
GPG Key ID: E9ED159B
53°37'09,95"N
10°08'02,42"E



Re: Logging Region out of memory

2018-06-12 Thread Michael Ströder
On 06/12/2018 06:56 PM, Scott Mayo wrote:
> Openldap version is 2.4.12

Seriously? This is really ancient release almost 10 years old.
Being in your position my next task would be to update such an old
system (not only because of OpenLDAP).

> Logging region out of memory; you may need to increase its size
> db_open(/var/lib/ldap/id2entry.bdb) failed: Cannot allocate memory (12).

What does your monitoring say about memory usage before that log message?

Ciao, Michael.



Logging Region out of memory

2018-06-12 Thread Scott Mayo
I just started getting this early this morning.  I set this server up a
number of years ago.  I am getting ready to put a new one in place, but
need to get this back up and going in the mean time.

Openldap version is 2.4.12

/sbin/service ldap start

Checking configuration files for slapd:[FAILED]
Logging region out of memory; you may need to increase its size
db_open(/var/lib/ldap/id2entry.bdb) failed: Cannot allocate memory (12).
backend_startup_one: bi_db_open failed! (12)
slap_startup failed (test would succeed using the -u switch)
stale lock files may be present in /var/lib/ldap   [WARNING]

Any ideas on what I need to check there?  Thanks.

-- 
Scott Mayo - System Administrator
Bloomfield Schools PH: 573-568-5669  FA: 573-568-4565


RE: LDAP Issue: Logging region out of memory; you may need to increase its size

2017-06-27 Thread Gurjot Kaur
Hi,

Thanks for the following information. Can you please provide your input for the 
following queries below:

•Is database cache is all that I have to take care off only?
•How to decide the value of ‘set_lg_regionmax’ parameter?
•For below problem should I need to increase the value of DB cache size or 
‘set_lg_regionmax’ if the issue occurs again.
• Is the ‘index generation failed’ issue linked to the logging region issue?

Regards,
Gurjot Kaur

-Original Message-
From: Dieter Klünter [mailto:die...@dkluenter.de]
Sent: Saturday, June 10, 2017 2:31 PM
To: openldap-technical@openldap.org
Subject: Re: LDAP Issue: Logging region out of memory; you may need to increase 
its size

Am Fri, 9 Jun 2017 11:27:32 +
schrieb Gurjot Kaur <gurjot.k...@aricent.com>:

> Hello,
>
> On an already running setup of OpenLDAP 2.4 on Linux (Linux GURKES015
> 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64
> x86_64 GNU/Linux) platform, one day I start getting following error
> when I execute the slapcat command:
>
> bdb_db_open: warning - no DB_CONFIG file found in directory
> /opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data:
> (2). Expect poor performance for suffix
> "dc=ORG,dc=COM".bdb(dc=ORG,dc=COM): Logging region out of memory; you
> may need to increase its size bdb_db_open: database "dc=ORG,dc=COM":
> db_open(/opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServer
> s_1/var/openldap-data/id2entry.bdb)
> failed: Cannot allocate memory (12). backend_startup_one: bi_db_open
> failed! (12) slap_startup failed
>
>
> Following are the system RAM  and disk space usage.
Ram and disk space are irrelvant here, the configuration of a database cache 
size is relevant. This should be configured in a DB_CONFIG file within the 
database directory.
Your OS distribution may have provided a sample DB_CONFIG file.
>
> I have removed some log.x files
> from
> /opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/
> openldap-data which are not in use. But still the same error persist
> while executing slapcat command.

The referenced log files document the database transactions and are vital for 
database operations. You may read on db_config tools and how to manage 
transaction logs. For more information see 
http://www.openldap.org/faq/data/cache/1072.html
http://www.openldap.org/faq/data/cache/1075.html

-Dieter

--
Dieter Klünter | Systemberatung
http://sys4.de
GPG Key ID: E9ED159B
53°37'09,95"N
10°08'02,42"E


"DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."


Re: LDAP Issue: Logging region out of memory; you may need to increase its size

2017-06-10 Thread Quanah Gibson-Mount
--On Saturday, June 10, 2017 12:00 PM +0200 Dieter Klünter 
 wrote:



Am Fri, 9 Jun 2017 11:27:32 +
schrieb Gurjot Kaur :


Hello,

On an already running setup of OpenLDAP 2.4 on Linux (Linux GURKES015
2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64
x86_64 GNU/Linux) platform, one day I start getting following error
when I execute the slapcat command:

bdb_db_open: warning - no DB_CONFIG file found in


I would also note that for current releases of OpenLDAP, the bdb backend is 
deprecated, and it's proably worthwhile to take the time to migrate to 
back-mdb, which doesn't have these issues.


--Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:





Re: LDAP Issue: Logging region out of memory; you may need to increase its size

2017-06-10 Thread Dieter Klünter
Am Fri, 9 Jun 2017 11:27:32 +
schrieb Gurjot Kaur <gurjot.k...@aricent.com>:

> Hello,
> 
> On an already running setup of OpenLDAP 2.4 on Linux (Linux GURKES015
> 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64
> x86_64 GNU/Linux) platform, one day I start getting following error
> when I execute the slapcat command:
> 
> bdb_db_open: warning - no DB_CONFIG file found in
> directory 
> /opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data:
> (2). Expect poor performance for suffix
> "dc=ORG,dc=COM".bdb(dc=ORG,dc=COM): Logging region out of memory; you
> may need to increase its size bdb_db_open: database "dc=ORG,dc=COM":
> db_open(/opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data/id2entry.bdb)
> failed: Cannot allocate memory (12). backend_startup_one: bi_db_open
> failed! (12) slap_startup failed
> 
> 
> Following are the system RAM  and disk space usage.
Ram and disk space are irrelvant here, the configuration of a database
cache size is relevant. This should be configured in a DB_CONFIG file
within the database directory. 
Your OS distribution may have provided a sample DB_CONFIG file.
> 
> I have removed some log.x files
> from 
> /opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data
> which are not in use. But still the same error persist while
> executing slapcat command.

The referenced log files document the database transactions and are
vital for database operations. You may read on db_config tools and how
to manage transaction logs. For more information see
http://www.openldap.org/faq/data/cache/1072.html
http://www.openldap.org/faq/data/cache/1075.html

-Dieter

-- 
Dieter Klünter | Systemberatung
http://sys4.de
GPG Key ID: E9ED159B
53°37'09,95"N
10°08'02,42"E



LDAP Issue: Logging region out of memory; you may need to increase its size

2017-06-09 Thread Gurjot Kaur
Hello,

On an already running setup of OpenLDAP 2.4 on Linux (Linux GURKES015 
2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 
GNU/Linux) platform, one day I start getting following error when I execute the 
slapcat command:

bdb_db_open: warning - no DB_CONFIG file found in directory 
/opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data:
 (2).
Expect poor performance for suffix "dc=ORG,dc=COM".bdb(dc=ORG,dc=COM):
Logging region out of memory; you may need to increase its size
bdb_db_open: database "dc=ORG,dc=COM": 
db_open(/opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data/id2entry.bdb)
 failed:
Cannot allocate memory (12).
backend_startup_one: bi_db_open failed! (12)
slap_startup failed


Following are the system RAM  and disk space usage.

Tasks: 192 total,   2 running, 190 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.1%us,  0.3%sy,  0.0%ni, 98.9%id,  0.7%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:   8178840k total,  8145460k used,33380k free,   329840k buffers

Swap:  2031608k total,  220k used,  2031388k free,  6623032k cached


Filesystem  Size  Used Avail Use% Mounted on

/dev/mapper/rootvg-lv_root  1.9G  688M  1.2G  38% /

tmpfs   3.9G 0  3.9G   0% /dev/shm

/dev/sda1   289M   17M  258M   7% /boot

/dev/mapper/rootvg-lv_users 1.9G  1.6G  218M  89% /users

/dev/mapper/rootvg-lv_exec  124M  5.6M  113M   5% /exec

/dev/mapper/rootvg-lv_images1.9G   73M  1.8G   4% /images

/dev/mapper/rootvg-lv_var   1.9G  140M  1.7G   8% /var

/dev/mapper/rootvg-lv_tmp   961M   22M  890M   3% /tmp

/dev/mapper/rootvg-lv_system186M  7.9M  169M   5% /system

/dev/mapper/rootvg-lv_usr   1.9G  663M  1.2G  37% /usr

/dev/mapper/rootvg-lv_cft251496M  430M   41M  92% /exec/products/cft

/dev/mapper/rootvg-lv_bases 79G   19G   57G  25% /bases

/dev/mapper/rootvg-lv_nbu  1008M  361M  597M  38% 
/exec/products/netbackup

/dev/mapper/rootvg-lv_pat  1008M  194M  764M  21% /exec/products/patrol

/dev/mapper/rootvg-lv_bladelogic992M  187M  755M  20% 
/exec/products/bladelogic


I have removed some log.x files from 
/opt/proxy/HostedDirectoryLDAPMultiMaster/instances/LdapServers_1/var/openldap-data
 which are not in use. But still the same error persist while executing slapcat 
command.

Then I restarted the slapd process. After that I start facing ldaperror 80 with 
additional info "index generation failed" error while adding, deleting or 
modifying any entry along in ldap DB.

Could somebody help us to understand:


1.   Why there was "Logging region out of memory; you may need to increase 
its size" error. How to resolve it?

2.   Why after slapd restart, I got "index generation failed" error. How to 
resolve it?


PS: DB_CONFIG was not present in /var/openldap-data directory and slapcat was 
used to work properly before this issue.
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."


Logging region out of memory; you may need to increase its size

2011-10-24 Thread Frank Bonnet

Hello

I have a problem when trying to perform the command : slapcat -l toto.ldif

I get this error message

bdb_db_open: database dc=,dc=fr: unclean shutdown detected; 
attempting recovery.
bdb_db_open: database dc=,dc=fr: recovery skipped in read-only 
mode. Run manual recovery if errors are encountered.
bdb(dc=,dc=fr): Logging region out of memory; you may need to 
increase its size
bdb_db_open: database dc=,dc=fr: 
db_open(/var/db/openldap-data/id2entry.bdb) failed: Cannot allocate 
memory (12).
backend_startup_one (type=bdb, suffix=dc=,dc=fr): bi_db_open 
failed! (12)

slap_startup failed

I use berkeley DB 4.6 on a FreeBSD 8.1 system

Thanks for any info