Thursday, April 19, 2012

Hyperion : openLDAP Service Won't Start [Error]

One stormy day, my Hyperion openLDAP service just won't start.  It's simply corrupt.  Some time ago, before this dreadfull thing happened to my work life as an IT consultant, the production server where my beloved Hyperion 9.3.1 were installed went dead.  It was shutdowned unceremoniously.  My Hyperion which were running smoothly previously (even you can hear it whistling happily) was killed in a tragic way.

[What Really Happened]
Power failure sometimes happened (I know, sh*t do happens - X_X ).  It makes our BerkeleyDB based openLDAP engine goes unsynchronized.  Thus making the openLDAP service won't start.

[Solution]

Recover OpenLDAP by using the following steps:
1. Stop all the services.
2. Take a backup of this folder:
Hyperion\SharedServices\9.3.1\openLDAP\var\openldap-data.
3. Remove/delete all files which do not have extension .bdb from:
Hyperion\SharedServices\9.3.1\openLDAP\var\openldap-data.
4. Copy the 'db_recover.exe' file from the following location:
Hyperion\Sharedservices\9.3.1\openLDAP\bdb
to
Hyperion\SharedServices\9.3\openLDAP\var\openldap-data
and run the db_recover.exe.
5. Start the services

Note by doing this, eventhough the service may start, you may lose the data.  I found that my admin user gone.  I put my .bdb files from my backup back to Hyperion\SharedServices\9.3.1\openLDAP\var\openldap-data.

[Note]
It's wise to keep a frequent backup of those .bdb files in a separate folder.  Make a script and run it monthly if need be.  You won't know when sh*t will happen again.

I heard this kind of thing also happened to Hyperion 11.1.X which still use openLDAP.  The solution to this kind of problem will probably be useful to those version of Hyperion.

[Backup Script Sample]
Here is an example of my LDAP_backup.bat :
rem code to take day month and year
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
SET date=%mm%-%yyyy%

md D:\backupHyperion\LDAP\%date%
D:\Hyperion\SharedServices\9.3.1\server\scripts\backup.bat D:\backupHyperion\LDAP\%date%



No comments:

Post a Comment