<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 3/30/2012 8:04 AM, Matt James wrote:
    <blockquote
      cite="mid:384771BA-D8A7-44E6-84E6-CC7CD65FFB98@rainstormconsulting.com"
      type="cite">Hi everyone,
      <div><br>
      </div>
      <div>I was recently making an update to our secondary DNS server
        to update existing DnsSlaveZone objects with a new "masters" IP
        value. </div>
      <div><br>
      </div>
      <div>After running the script, I refreshed the Secondary DNS list
        in the GUI to find that none of the records had been updated
        with the new value.  After looking into it, it turned out that
        the code was attempting to create new DnsSlaveZone objects with
        duplicate information to existing objects.  Once I discovered
        that, I decided to clear out all DnsSlaveZone objects and
        re-populate the list from a master list of domains in the
        Primary DNS server.  After running <i>that</i> script, I found
        that one of my Secondary DNS entries remained.</div>
      <div><br>
      </div>
      <div>Now, no matter what I do, I'm unable to make any changes to
        the CCE database even directly through the GUI.  If I attempt to
        edit and save the remaining Secondary DNS record, the GUI hangs
        upon save. </div>
    </blockquote>
    <br>
    Sounds like a corrupt cobalt database...<br>
    <br>
    <blockquote
      cite="mid:384771BA-D8A7-44E6-84E6-CC7CD65FFB98@rainstormconsulting.com"
      type="cite">
      <div> If I attempt to run my script, the script hangs.  If I
        attempt to use the dns cleaner script written in Perl (found
        here <a moz-do-not-send="true"
          href="http://oldonce.gknsonline.com/bq-dnsImport.php">http://oldonce.gknsonline.com/bq-dnsImport.php</a>),
        the script hangs.  If I even attempt to disable DNS in the GUI,
        saving that hangs.</div>
      <div><br>
      </div>
    </blockquote>
    Yep - its pooched.<br>
    <br>
    <blockquote
      cite="mid:384771BA-D8A7-44E6-84E6-CC7CD65FFB98@rainstormconsulting.com"
      type="cite">
      <div>A couple of questions:</div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>1)
        Is there a place where I can get some debug output as to what
        might be causing the issue?</div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>2) Does
        anyone have any recommendations as to the best way to proceed?</div>
      <br>
    </blockquote>
    <br>
    I wrote a script a while back while troubleshooting a similar issue
    for a client... Copy of script below. When you run the script, it
    produces two lists of numbers. If they are NOT the same, your
    database is corrupt.<br>
    <br>
    First line: This is the real list of CODB objects found in the file
    system by the script.<br>
    Second line: This is an index of active CODB objects. This is the
    list that is broken.<br>
    <br>
    Solution:<br>
    <br>
    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 list of numbers in the script output, and
    save the changes.<br>
    <br>
    Then restart CCEd<br>
    <br>
    Hope that helps.<br>
    <br>
    --------------- script starts here -------------<br>
    <br>
    #!/bin/bash<br>
    LAST=-1<br>
    MIN=-1<br>
    <br>
    for X in `ls /usr/sausalito/codb/objects/ | sort -n`<br>
    do<br>
        MYNEXT=$(( $LAST + 1 ))<br>
        if [ $MYNEXT -eq $X ]<br>
        then<br>
            LAST=$X<br>
        else<br>
            if [ $LAST -ge 1 ]<br>
            then<br>
                if [ $MIN -eq $LAST ]<br>
                then<br>
                    echo -n $LAST,<br>
                else<br>
                    echo -n $MIN-$LAST,<br>
                fi<br>
            fi<br>
            LAST=$X<br>
            MIN=$X<br>
        fi<br>
    done<br>
    if [ $MYNEXT -lt $X ]<br>
    then<br>
        echo -n $LAST<br>
    else<br>
        echo -n $MIN-$LAST<br>
    fi<br>
    echo ""<br>
    echo "/usr/sausalito/codb/codb.oids reports:"<br>
    cat /usr/sausalito/codb/codb.oids<br>
    echo ""<br>
    <br>
    <br>
    <br>
  </body>
</html>