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.


Recover OpenLDAP by using the following steps:
1. Stop all the services.
2. Take a backup of this folder:
3. Remove/delete all files which do not have extension .bdb from:
4. Copy the 'db_recover.exe' file from the following location:
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.

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,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%

error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types. [ASP.Net]

One day in my coding life as a consultant I met this error message: "~\file.vb(250): error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types."

If you are compiling an ASP.Net Web Site (Attention: It's not a Web Application,) using the so called command prompt mode:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler -p "C:\WebsiteSourceFolder" -v / C:\WebSiteDestinationFolder

You may found this particular error message.  Thus nothing was generated in the C:\WebSiteDestinationFolder.  Eventhough if you may be able to access the virtual directorized C:\WebsiteSourceFolder through the web browser.

[What Really Happened]
What really happen is I made a copy of file.vb named "copy of file.vb" in side the C:\WebsiteSourceFolder as a backup copy.  I'm trying to keep the original file intact.  What really happened is the compiler found a duplicate class file.  Thus generating the error code.

Take out / remove the backup copy / duplicate file from the Source Folder that you want to compile.  You may want to find a file with the same class name your case isn't creating copies of the offending source code.  Then you will be able to compile the ASP.Net Web Site.