Koozali.org: home of the SME Server

Installation error on 3.1.0-116

Offline compsos

  • *
  • 472
  • +0/-0
Installation error on 3.1.0-116
« on: June 01, 2011, 11:45:25 AM »
Hi Jeff

Asterisk18
Sail 3.1.0-116
SME ver 8.06B

I think I have a corrupted DB, even after testing and building on another platform. Keep getting the error
Code: [Select]
DBD::SQLite::db prepare failed: no such column: UNDOONOFF(1) at dbdimp.c line 271 at /opt/sark/perl/modules/sark/SarkSubs.pm line 1201.
Is there a way to test or rebuild the db file? I suspect it is due to the old system having ext length =4 and the new one is on 3 but the pci card configuration is trying to use 4000, 4001 etc.

Thanks
Regards

Gordon............

Offline compsos

  • *
  • 472
  • +0/-0
Re: Installation error on 3.1.0-116
« Reply #1 on: June 01, 2011, 01:38:20 PM »
Ok redid the db and that solved most of the issues but still having the fight over extlen. Set it to 4 then copied in the the converted DB (sail2x to 3x). So now have Screen showing ExtLen=3 , extensions using 4 (ie) 5000, 5001 ext which work, Analogue calls in and out but no VOIP ext to Analogue. Can not ring internally to analogue extensions.

TDM/403defaultAnalogFXSN/AAnalogueN/ANDRJ11
TDM/404defaultAnalogFXSN/AAnalogueN/ANDRJ11
Is there a way to 'rejoin" the analogue extensions to the rest of the extensions?

Thanks
Regards

Gordon............

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Installation error on 3.1.0-116
« Reply #2 on: June 11, 2011, 02:56:25 PM »
Hi Gordon

I think that there are two issues here; the database state and the extension lengths....

The SARK database is always installed at release 1.0.0, irespective of which sail release you put up.  There is a directory (/opt/sark/amacs)  which contains all of the database updates from each release (they are in files named rnnnn where nnnn is the svn commit number).   It should be safe to apply the updates to the database at any time.  Each time you install a release of sail the updates will be automatically applied, however, if you revert to a backup from an older release then you should manually apply them by doing

Code: [Select]
sh /opt/sark/scripts/update_db.sh
This should bring your database into line with your release.

The analogue extensions are generated in sark by parsing /etc/dahdi-channels.conf (which gets generated by a Digium routine called dahdi_genconf).  dahdi_genconf is controlled by the settings in /etc/dahdi/genconf_parameters (which you can access through the PCI Card panel in sark).  One of the parameters in there controls the extension start number for creating analogue extensions (the default is 4000).   By setting that and doing a regen (in PCI Cards)  you should be able to achieve the desired objective.

Kind Regards

S

Offline compsos

  • *
  • 472
  • +0/-0
Re: Installation error on 3.1.0-116
« Reply #3 on: June 12, 2011, 03:46:41 AM »
Thanks S

The command produced sh /opt/sark/scripts/update_db.sh
Is it just noise?

Code: [Select]
Applying amacs /opt/sark/amacs/r1353 to the DB
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1397 to the DB
SQL error: duplicate column name: channel
Applying amacs /opt/sark/amacs/r1401 to the DB
SQL error: duplicate column name: ASTDLIM
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1404 to the DB
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1421 to the DB
Applying amacs /opt/sark/amacs/r1440 to the DB
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1445 to the DB
Applying amacs /opt/sark/amacs/r1446 to the DB
SQL error: duplicate column name: XMPP
SQL error: duplicate column name: XMPPSERV
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1465 to the DB
SQL error: duplicate column name: CLUSTER
SQL error: duplicate column name: dialstring
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1482 to the DB
Applying amacs /opt/sark/amacs/r1484 to the DB
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1490 to the DB
SQL error: duplicate column name: orideclosed
SQL error: duplicate column name: orideopen
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1495 to the DB
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1496 to the DB
Applying amacs /opt/sark/amacs/r1501 to the DB
Applying amacs /opt/sark/amacs/r1524 to the DB
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1526 to the DB
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1533 to the DB
Applying amacs /opt/sark/amacs/r1539 to the DB
SQL error: duplicate column name: trunkname
SQL error: duplicate column name: UNDOONOFF
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1556 to the DB
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1558 to the DB
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1561 to the DB
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: duplicate column name: openfirewall
SQL error: duplicate column name: openfirewall
SQL error: duplicate column name: subnet
SQL error: duplicate column name: subnet1
SQL error: duplicate column name: subnet2
SQL error: duplicate column name: subnetstr
SQL error: duplicate column name: subnet1str
SQL error: duplicate column name: subnet2str
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: duplicate column name: callprogress
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1577 to the DB
SQL error: duplicate column name: HAUSECLUSTER
SQL error: duplicate column name: RHINOSPF
SQL error: column pkey is not unique
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1581 to the DB
Applying amacs /opt/sark/amacs/r1600 to the DB
Applying amacs /opt/sark/amacs/r1609 to the DB
SQL error: column pkey is not unique
Applying amacs /opt/sark/amacs/r1619 to the DB
Applying amacs /opt/sark/amacs/r1620 to the DB
SQL error: duplicate column name: SIPMULTICAST
SQL error: duplicate column name: ZTP
SQL error: column pkey is not unique
SQL error: column pkey is not unique
SQL error: table Device has 7 columns but 8 values were supplied
SQL error: table Device has 7 columns but 8 values were supplied
SQL error: table Device has 7 columns but 8 values were supplied
SQL error: table Device has 7 columns but 8 values were supplied
Regards

Gordon............

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Installation error on 3.1.0-116
« Reply #4 on: June 12, 2011, 11:53:07 AM »
Yes it is just noise :)

Most of the SQL consists of inserts which will fail if the row is already present, and that's fine.

Best

S