› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Error when running hcidbdump -r
[0:_hcidbdump_] readBlockChain: Error: (6)
[0:_hcidbdump_] [0.0.62313020] Unable to read msg data chain.
I can’t say I know the cause but if I was faced with that error message and did not want to initialize the database, I would first try the following from the AIX command prompt in my case:
keybuild rlog; dchain rlog
keybuild elog; dchain elog
Russ Ross
RussRoss318@gmail.com
Can this command be run while the hostserver, lock manager and processes are running?
To run the re-build commands, I believe you will need to have the processes down and the lock manager stopped.
Jim Cobane
Henry Ford Health
Thats what I thought, thanks for the information.
Sorry sometimes I assume things and thus forget to mention an added detail.
I always have the site shtudown (all processes, lock manager, and montior deamon) when I run this command.
I don’t know what is necessary so I just play it safe when in doubt.
To me it makes sense to have the database idle whenever doing soemthing like this.
Russ Ross
RussRoss318@gmail.com
I always like to check to be sure, sometimes someone has information about how things can be done that I am not aware of.
We recently had our AIX server with Cloverleaf 5.8.5 go down due to a hardware issue and had “Unable to read msg data chain” errors on recovery DB for several sites. Our troubleshooting directs us to basically follow the same process that Russ indicated (though it also includes an initial removal of rdm.taf from the etc/database folder). After doing this our doc inicates to check hcidbdump -r to see if the error is still present, and if so to basically re-initialize the DB.
I would love more information on how this error occurs and how to correct it without having to re-initialize the database when
keybuild rlog; dchain rlog
keybuild elog; dchain elog
does not resolve the error. Failing that, it would be nice to have information on how to extract what is in the recovery DB (in an easy fashion) before having to re-initialize the DB (and then how to easily resend what was extracted from recovery).
Good luck!
I was thinking you wanted to try and not blow away messages currently in your database.
If you are totaly stuck and willing to reinitialize the database then here is our clear_db.ksh script that I use for those situations:
#!/usr/bin/ksh
# here are some other usefule database commands
#———————————————-
#
# lmclear -u TEST -mp (if the user locks the database by doing ctrl-c during a hcidbdump -r
#
# lmclear -s -mp (that gives you a list of active database users)
#
# hcilmclear -p ris (if the ris process hangs the database)
#
# from clovertech post: http://clovertech.infor.com/viewtopic.php?t=3783
#
# Another handy flag is U (username)
#
# hcidbdump -r -D -U MIKE
#
# This way if you do control-c, you don’t hose the engine’s TEST user name.
# If you control-c with user MIKE on accident, then use user JANE next time.
# Ah Michael: you made my day!!
# I now use this -U option to use a different user and also lmclear this user first when running the script.
# Works like a charm. Fro example:
#
# lmclear -u RUSS -mp
# hcidbdump -r -U RUSS
# ctrl-c or whatever
# lmclear -u RUSS -mp
if [[ -d $HCISITEDIR/exec/databases ]]; then
cd $HCISITEDIR/exec/databases
hcisitectl -k l
rm -f *.log
rm -f lm_*
rm -f vista.taf
rm -f rdm.taf
rm -f mid.ctr
hcidbinit -ACi
keybuild rlog; dchain rlog
keybuild elog; dchain elog
fi
Russ Ross
RussRoss318@gmail.com
We don’t want to loose messages in the recovery DB. The problem using
keybuild rlog; dchain rlog
keybuild elog; dchain elog
did not correct the “Unable to read msg data chain” errors in the DB and we don’t know of any other way (short of totally blowing away the DB) to clear the “Unable to read msg data chain” errors.
Of course, if there are no other messages in the recovery DB then re-initializing the DB isn’t a problem. However we’ve seen the case where the recovery DB had several hundred other valid messages. But since these could be for multiple threads it’s hard to extract these messages to a file for later resending.
So, what is the best way to address the issue of “Unable to read msg data chain” errors when the above code does not do the trick?
Thanks much!
Back in topic 5900, I asked about unloading a reloading a db_vista database. I wanted to do this because I was getting a db_vista error and I wanted to save recovery (and to a lesser extent, error) before initializing the database. It seemed like (I’m probably exagerating) all anyone wanted to tell me was that reinitializing my database would fix the db_vista error I was getting.
The last post at the end of topic 5900 discusses using the hcidbdump command. But I think this won’t run because of the same db_vista error, which is what I was trying to fix in the first place. So I felt like I was struggling to get people to understand that I both, had a db_vista error, and that I wanted to unload the database so I wouldn’t lose anything.
What I’ve done…. when I’ve had a db error of -902… where keybuild and dchain didn’t save the bacon……… is wipe out the recovery database.
After initalizing the database and getting everything running again..
We then, go back to a point of when the error occured – and resent the previous 15 minutes data (it was ADTs….. so this was deemed safer than losing data)……
After the data is sent, allow queued messages from the source system into cloverleaf again.