Closed steve-lad closed 3 years ago
The Stable branch will not fix errors in the user configuration.
The Develop branch should do this. The install error that you are seeing is caused by the fact that FreePbx Doctrine cannot parse correctly the files that it creates (unfortunately)
The Doctrine output has been corrected in the latest Develop branch (it may take some time for GitHub to propagate it to the snapshot).
Please try again in a few hours and confirm that this has been fixed.
Got same error during install. Link I used https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip
The error is not the same but the result is. Please paste the exact contents of the exception in the top left box - the command looks good
@vaDrn In module admin, before trying to install this module, check for FreePBX module updates for your already installed modules, and apply any that are found
updated all FreePBX modules. Still error during install
Text of the exception:
An exception occurred while executing 'CREATE TABLE sccpbuttonconfig (ref VARCHAR(15) DEFAULT '' NOT NULL, reftype VARCHAR(15) DEFAULT 'sccpdevice' NOT NULL, instance TINYINT(1) DEFAULT '0' NOT NULL, buttontype VARCHAR(255) DEFAULT 'line' NOT NULL, name VARCHAR(36) DEFAULT NULL, options VARCHAR(100) DEFAULT NULL, INDEX ref (ref, reftype), PRIMARY KEY(ref, reftype, instance, buttontype)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
@vaDrn That command executes perfectly on Mariadb - what database are you using?
Are you familiar with accessing the database directly? If so can you run
SHOW TABLE STATUS WHERE NAME LIKE 'sccp%';
and paste the output here
I think that the issue is that you have run the mysql-enum as indicated in the old wiki instructions. This step is no longer necessary and in fact creates problems like this.
It's database that goes preinstalled on FreePBX iso. I thought it was mariadb. Here is the version command output:
here is the table status output:
I followed this instructions: https://github.com/chan-sccp/chan-sccp/wiki/FreePBX_SCCP-modules
it was last updated 7 days ago.
I can reinstall everything from scratch and skip mysql -p asterisk < /usr/src/chan-sccp/conf/mysql-v5_enum.sql
part. Shouldn't take too long.
so no any sccp tables.
still got error during install
An exception occurred while executing 'CREATE TABLE sccpbuttonconfig (ref VARCHAR(15) DEFAULT '' NOT NULL, reftype VARCHAR(15) DEFAULT 'sccpdevice' NOT NULL, instance TINYINT(1) DEFAULT '0' NOT NULL, buttontype VARCHAR(255) DEFAULT 'line' NOT NULL, name VARCHAR(36) DEFAULT NULL, options VARCHAR(100) DEFAULT NULL, INDEX ref (ref, reftype), PRIMARY KEY(ref, reftype, instance, buttontype)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
@vaDrn No need - there are no conflicts in your tables. I have a fix (I think), but would really like to understand why this is failing on your machine and not on any others
can you do an
apt-get update; apt-get upgrade;
(or the equivalent on your machine) to see if there are any update packages for MariaDb
FreePBX based on CentOS I think. yum update
yum upgrade
was the fist thing I made.
tried to install stable
one again, no errors during install. Table status command output:
no realtime config tho
@vaDrn There is an error in your database now, and it will prove fatal at some stage. You are mixing encodings in the view.
Can you do the following.
Uninstall and remove Stable Download and install Develop (until it hangs)
In the database, run
SHOW TABLE STATUS WHERE NAME LIKE 'sccp%';
and paste the output again.
i'm not mixing anything - it's created purely by stabe
release installation.
I removed stable
release and installed develop
one. No error during install. Here is the status output:
also sccp module info:
yep, fatal it is
@vaDrn Are you using CENTOS 5 or 7?
It's 7...?
hmm
@vaDrn OK Lets fix this. You need to update MariaDb and I will show you how to.
Logout and close FreePBX window
rm -r /var/www/html/admin/modules/sccp_manager/
run this in the Database
Drop table sccpbuttonconfig; drop table sccpuser; drop view sccpdeviceconfig;
Let me know when done
done only sccpdevice, sccpdevmodel, sccpline and sccpsettings tables left
cd /etc/yum.repos.d/
using your favourite editor create a file called MariaDB.repo
and paste the following into it:
# MariaDB 10.5 CentOS repository list - created 2021-06-12 13:57 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Save the file
let me know when done
done
yum install MariaDB-server MariaDB-client
done
got error from firewall Firewall was unable to connect to MySQL after 30 seconds.
mysql -V
now it's spams it constantly
mysql Ver 15.1 Distrib 10.5.10-MariaDB, for Linux (x86_64) using readline 5.1
Firewall messages stopped?
nope. still going
dirty but a reboot is probably required
it's dead after reboot
bunch of errors after mariadb startup
Have you tried running mysql_upgrade?
after mysql_upgrade
Does FreePBX load?
nope. FreePBX won't load. MariaDB and asterisk won't start after reload. I can start them manually after systemctl daemon-reload
command. FreePBX won't run at all
Are you on a VM?
yes. I have snapshots before db update
So ---- rollback. Sorry but FreePBX are !!!! about their distros. Keep a snapshot of the present though and I will look into it more
Once you have done, let me know what tables you have for sccp
sorry, I was wrong. I only have snapshots before sccp manager installs. So there are no sccp tables in db.
No pb
Download Develop and install (wait for the error)
Sorry - do not install
cd /var/www/html/admin/modules/sccp_manager
done
OK I think that I have seen the issue
In your favourite editor, edit module.xml and go to line 128
<field name="buttontype" type="string" default="line" primarykey="true"/>
change to
<field name="buttontype" type="string" length="192" default="line" primarykey="true"/>
and save
done
Now try running install
error:
An exception occurred while executing 'CREATE TABLE sccpbuttonconfig (ref VARCHAR(15) DEFAULT '' NOT NULL, reftype VARCHAR(15) DEFAULT 'sccpdevice' NOT NULL, instance TINYINT(1) DEFAULT '0' NOT NULL, buttontype VARCHAR(192) DEFAULT 'line' NOT NULL, name VARCHAR(36) DEFAULT NULL, options VARCHAR(100) DEFAULT NULL, INDEX ref (ref, reftype), PRIMARY KEY(ref, reftype, instance, buttontype)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
chan-sccp/chan-sccp#572