Mysql failed Vicibox 9

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Mysql failed Vicibox 9

Postby syedfahim786 » Thu May 11, 2023 8:15 pm

Hello all,
While running this script /usr/share/astguiclient/ADMIN_keepalive_ALL.pl on crontab entry as well as manually. I am getting the following errors:

DBD::mysql::db do failed: Table 'asterisk.vicidial_agent_notifications' doesn't exist at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 5178.
DBD::mysql::db do failed: Table 'asterisk.vicidial_agent_notifications' doesn't exist at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 5181.
DBD::mysql::db do failed: Table 'asterisk.vicidial_agent_notifications_queue' doesn't exist at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 5184.
You have new mail in /var/spool/mail/root

It is just happening with the new installs. Existing scratch installs are working just fine. Please advise how to solve this issue.

--
Centos 7 Scratch Install | vicibox 9 | Version: 2.14b0.5 | SVN Version: 3721 | DB Schema Version: 1682
System Configuration: Hardware CPU Intel Xeon E3-1230v6 - 4c/8t - 3.5 GHz/3.9 GHz | RAM 32 GB ECC 2133 MHz | Data disks 2×450 GB SSD NVMe Soft RAID
syedfahim786
 
Posts: 17
Joined: Tue May 18, 2021 3:39 am

Re: Mysql failed Vicibox 9

Postby martinch » Fri May 12, 2023 11:19 am

Hey,

What's your DB schema version? Those tables were introduced in DB schema version 1679.

You could try running the mySQL upgrade command manually;

Code: Select all
mysql -h localhost -u root asterisk -f < /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql

Hope this helps,
Martin.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Mysql failed Vicibox 9

Postby carpenox » Sat May 13, 2023 8:54 pm

Vicibox 9 doesn't work anymore, use v10 or do a scratch
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2418
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Mysql failed Vicibox 9

Postby RBecker » Sat May 13, 2023 10:22 pm

carpenox wrote:Vicibox 9 doesn't work anymore, use v10 or do a scratch


I've got 12 servers in my cluster running v9 that would love to disagree with you :D
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm

Re: Mysql failed Vicibox 9

Postby syedfahim786 » Sun May 14, 2023 10:39 am

martinch wrote:Hey,

What's your DB schema version? Those tables were introduced in DB schema version 1679.

You could try running the mySQL upgrade command manually;

Code: Select all
mysql -h localhost -u root asterisk -f < /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql

Hope this helps,
Martin.


Hello Martin,

I tried your suggestion but the issue still exists. It's a scratch install on Centos 7. DB schema version is: 1682
syedfahim786
 
Posts: 17
Joined: Tue May 18, 2021 3:39 am

Re: Mysql failed Vicibox 9

Postby martinch » Mon May 15, 2023 7:18 am

syedfahim786 wrote:
martinch wrote:Hey,

What's your DB schema version? Those tables were introduced in DB schema version 1679.

You could try running the mySQL upgrade command manually;

Code: Select all
mysql -h localhost -u root asterisk -f < /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql

Hope this helps,
Martin.


Hello Martin,

I tried your suggestion but the issue still exists. It's a scratch install on Centos 7. DB schema version is: 1682


Hello there syed,

You're running DB schema 1682 but those tables were introduced in 1679. That means the schema hasn't been applied properly or the astguiclient isn't pointing to the right database server / IP / or bad username or password.

Can you give me the output of this command please;

Code: Select all
tail /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql


Thank you syed. Feel free to jump into ##vicidial chat on IRC if you'd like realtime support with this. :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Mysql failed Vicibox 9

Postby syedfahim786 » Mon May 15, 2023 10:59 am

martinch wrote:
syedfahim786 wrote:
martinch wrote:Hey,

What's your DB schema version? Those tables were introduced in DB schema version 1679.

You could try running the mySQL upgrade command manually;

Code: Select all
mysql -h localhost -u root asterisk -f < /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql

Hope this helps,
Martin.


Hello Martin,

I tried your suggestion but the issue still exists. It's a scratch install on Centos 7. DB schema version is: 1682


Hello there syed,

You're running DB schema 1682 but those tables were introduced in 1679. That means the schema hasn't been applied properly or the astguiclient isn't pointing to the right database server / IP / or bad username or password.

Can you give me the output of this command please;

Code: Select all
tail /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql


Thank you syed. Feel free to jump into ##vicidial chat on IRC if you'd like realtime support with this. :)



Here you go!! Sure, DM me!!

index (log_date)
) ENGINE=MyISAM;

CREATE TABLE vicidial_agent_latency_log_archive LIKE vicidial_agent_latency_log;
CREATE UNIQUE INDEX vdalla on vicidial_agent_latency_log_archive (user,log_date);

CREATE TABLE vicidial_agent_latency_summary_log_archive LIKE vicidial_agent_latency_summary_log;
CREATE UNIQUE INDEX vdalsla on vicidial_agent_latency_summary_log_archive (user,log_date,web_ip);

UPDATE system_settings SET db_schema_version='1682',db_schema_update_date=NOW() where db_schema_version < 1682;
syedfahim786
 
Posts: 17
Joined: Tue May 18, 2021 3:39 am

Re: Mysql failed Vicibox 9

Postby martinch » Wed May 17, 2023 6:47 am

Hey syed,

I believe I've found the problem here. I'm not aware of which version of MariaDB / mySQL is running on ViCiBox 9...I don't have a ViCiBox 9 ISO to hand...potentially another user may be able to provide that information.

Essentially, this line from upgrade_2.14.sql won't run on older versions of mySQL;

Code: Select all
queue_date DATETIME DEFAULT current_timestamp()


Code: Select all
ERROR 1067 (42000) at line 2177: Invalid default value for 'entry_date'


current_timestamp() wasn't supported for DATETIME datatypes until mySQL version 5.6.5 / some MariaDB version 10.x or so I read. Here's the link the source I found the information from: https://stackoverflow.com/questions/900 ... -dateadded

To fix this, I would replace current_timestamp() with NOW() and try rerunning the migration file as suggested.

Hope this helps :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Mysql failed Vicibox 9

Postby carpenox » Sat May 27, 2023 11:08 pm

As a new install, it doesn't work RBecker, my apologies for not clarifying
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2418
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Mysql failed Vicibox 9

Postby martinch » Fri Jun 02, 2023 6:40 am

On fresh installs not updated to the latest ViCiDial version as I think those two queries mentioned are not compatible (some recent SQL migrations introduced like in 2023)...if you fudge the queries though you can get the latest ViCi version running on ViCiBox 9 though it's not too difficult to do that.

As part of the install though...I think Kumba does fetch the latest SVN trunk code though...so yeah...just unplug your network cable when installing the distro I guess is one workaround :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Mysql failed Vicibox 9

Postby martinch » Fri Jun 02, 2023 6:40 am

On fresh installs not updated to the latest ViCiDial version as I think those two queries mentioned are not compatible (some recent SQL migrations introduced like in 2023)...if you fudge the queries though you can get the latest ViCi version running on ViCiBox 9 though it's not too difficult to do that.

As part of the install though...I think Kumba does fetch the latest SVN trunk code though...so yeah...just unplug your network cable when installing the distro I guess is one workaround :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 36 guests