Database issue in Cluster

All installation and configuration problems and questions

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

Database issue in Cluster

Postby hansg » Tue Feb 09, 2021 4:47 pm

Good Evening,

I have just installed a new cluster setup consisting of 3 servers:

1 DB, 1 WEB, 1 DIALER

They are cloud servers (not virtual) and they will be accessed through a public IP. My host allows me to setup a private network which I have done and all of my servers have been added to that. I followed the vicibox9 installation manual and received no errors during installation. I am also using the latest release of vicibox9. However, when I login to my webserver the database doesn't look as if it is connected.

Image

What can be causing this issue and how do I fix this?
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Database issue in Cluster

Postby carpenox » Tue Feb 09, 2021 7:49 pm

it doesnt seem like its syncing properly, check which asterisk sockets you have running on the DB server by using "screen -ls" and that you have the keepalive script being run in crontab.
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: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Database issue in Cluster

Postby hansg » Wed Feb 10, 2021 6:57 am

Hi, thanks for your reply.

Code: Select all
DBX:~ # screen -ls
There are screens on:
        4776.ASTVDadapt (Detached)
        1660.ASTemail   (Detached)
        1658.ASTVDadFILL        (Detached)
3 Sockets in /run/screens/S-root.


Code: Select all
DBX:~ # asterisk -r
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)


Started asterisk service as it was not running.
Code: Select all
DBX:~ # service asterisk start
DBX:~ # asterisk -r
[Feb 10 11:50:41] Asterisk 13.34.0-vici, Copyright (C) 1999 - 2014, Digium, Inc. and others.
[Feb 10 11:50:41] Created by Mark Spencer <markster@digium.com>
[Feb 10 11:50:41] Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
[Feb 10 11:50:41] This is free software, with components licensed under the GNU General Public
[Feb 10 11:50:41] License version 2 and other licenses; you are welcome to redistribute it under
[Feb 10 11:50:41] certain conditions. Type 'core show license' for details.
[Feb 10 11:50:41] =========================================================================
[Feb 10 11:50:41] Connected to Asterisk 13.34.0-vici currently running on DBX (pid = 19697)
DBX*CLI>


CRONTAB
Code: Select all
### keepalive script for astguiclient processes
* * * * * /usr/share/astguiclient/ADMIN_keepalive_ALL.pl


Asterrisk is now running but still no sync with webserver.

I created a list using the webserver and checked the database server to see if it was created and it was successful. Just doesn't seem to be syncing back the other direction.

EDIT:

Just to add that I have since ran the following and got an error. However, it did update the time for the database server when viewing from the webserver like in the image above. It then does not stay updated and the database server entry turns RED.

Code: Select all
DBX:~ # /usr/share/astguiclient/AST_update.pl
SHOW CHANNELS format: 1
LOOKING FOR Zap/DAHDI clients assigned to this server:
LOOKING FOR IAX2 clients assigned to this server:
LOOKING FOR SIP clients assigned to this server:
Zap Clients:  |
IAX2 Clients: |
SIP Clients:  |
pattern match timed-out at /usr/share/astguiclient/AST_update.pl line 470
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Database issue in Cluster

Postby hansg » Wed Feb 10, 2021 10:20 am

UPDATE:

I THINK I have managed to fix the issue! (Thanks to Carpenox's blog actually)

I had to update my /usr/share/astguiclient/AST_update.pl file with the following:

Two places, near line 470 and near line 534 replace:

Code: Select all
$t->waitfor(‘/[0123]\n$/’);
with
$t->waitfor(‘/[0123456789]\n$/’);


This then let me run perl /usr/share/astguiclient/AST_update.pl and my database time is now updating.

Will I have to manually start asterisk and run this perl script every time I reboot?

Also, Screen -LS is still only showing 3 screens

Code: Select all
DBX:~ # screen -ls
There are screens on:
        1691.ASTemail   (Detached)
        1689.ASTVDadFILL        (Detached)
        1687.ASTVDadapt (Detached)
3 Sockets in /run/screens/S-root.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Database issue in Cluster

Postby carpenox » Wed Feb 10, 2021 12:25 pm

ok, so your telnet manager seems to be off, run this cmd: ss -ltnu

check if port 5038 is running, if not then start your asterisk service and run the keepalive script manually and then check in reports page to see if its synced right away. If it goes green and then eventually turn red which i feel is your issue then manager.conf may have some issue or else, we can go from there, msg me on skype if u want and you can report the fix back here after i help you debug it
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: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Database issue in Cluster

Postby hansg » Thu Feb 11, 2021 7:43 am

Update:

For future, the issue was the correct screens were not running on DB server and I had to install them by running perl install.pl and add the screens manually and then enable Dahdi.
Dual Core - 4GB DDR3 - 80GB SSD
Vicibox 9
VERSION: 2.14-751a
BUILD: 200425-0949
SSL Installed
hansg
 
Posts: 129
Joined: Wed May 11, 2016 8:56 pm

Re: Database issue in Cluster

Postby carpenox » Thu Feb 11, 2021 4:08 pm

glad to have helped
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: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL


Return to Support

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 98 guests