[BlueOnyx:09740] Re: 5108R hangs on settings changes

Michael Stauber mstauber at blueonyx.it
Tue Mar 6 12:28:43 -05 2012


Hi Chris,

> I'm working on a 5108R box exhibiting something strange.  Frequently, I 
> will try and delete something such as a site user or a DNS entry and 
> admserv will just hang.  The browser acts like it's doing its thing, but 
> will just continue trying to load indefinitely.  Hours, if you let it.
> 
> If I restart cced.init and admserv and then try again, the system will 
> comply immediately.   But then the next time I need to make a change, it 
> hangs again and I have to restart cced.init and admserv again.
> 
> No clues in the message log or the admserv logs.
> 
> Could something be corrupted in CCE?

Could be. Yeah, the probable cause is a corruption of the CODB database.

Create a shellscript with this code in it and run it:

------------------------------------------------------------------------
#!/bin/bash
LAST=-1
MIN=-1

for X in `ls /usr/sausalito/codb/objects/ | sort -n`
do
  MYNEXT=$(( $LAST + 1 ))
  if [ $MYNEXT -eq $X ]
  then
    LAST=$X
  else
    if [ $LAST -ge 1 ]
    then
      if [ $MIN -eq $LAST ]
      then
        echo -n $LAST,
      else
        echo -n $MIN-$LAST,
      fi
    fi
    LAST=$X
    MIN=$X
  fi
done
if [ $MYNEXT -lt $X ]
then
  echo -n $LAST
else
  echo -n $MIN-$LAST
fi

echo ""
echo "/usr/sausalito/codb/codb.oids reports:"
cat /usr/sausalito/codb/codb.oids
echo ""
------------------------------------------------------------------------

When you run it, it will create output like this:

[root at minimax trunk]# /root/scripts/oidlist.sh
1-185,189-196,204-207,219-229,231-257,260-291,297-305,321-347,353-359,363-367,373-406,408-409,414-440,444-493,495-514,520-545,547-553,556-564,569-597,599-611
/usr/sausalito/codb/codb.oids reports:
1-184,189-196,204-207,219-229,231-257,260-291,297-305,321-347,353-359,363-367,373-406,408-409,414-440,444-493,495-553,556-564,569-597,599-611

The number ranges show which CODB object numbers are in usage (1st line) and 
the 2nd numbered line shows which CODB objects CCE *thinks* are in use.

Whenever CCE tries to create a new object, it checks 
/usr/sausalito/codb/codb.oids and uses the smallest number that's not in use.

In our example above  #185 would be the smallest free object ID.

But as you can see in our example output: CODB itself and 
/usr/sausalito/codb/codb.oids dissagree here.

CODB has #185 already in use, while /usr/sausalito/codb/codb.oids says it's 
available. 

<BANG> -> Instant problem. CCE tries to create object #185, but then realizes 
that there is already something with that ID and then it chokes.

The fix here is this:

Run the script, then stop CCEd. Then edit /usr/sausalito/codb/codb.oids and 
replace everything in it with ALL the data from the first numbered line in the 
script ouput and save the changes.

Then restart CCEd and you're good again.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list