Page 1 of 1

Database issue in Cluster

PostPosted: Tue Feb 09, 2021 4:47 pm
by hansg
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?

Re: Database issue in Cluster

PostPosted: Tue Feb 09, 2021 7:49 pm
by carpenox
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.

Re: Database issue in Cluster

PostPosted: Wed Feb 10, 2021 6:57 am
by hansg
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

Re: Database issue in Cluster

PostPosted: Wed Feb 10, 2021 10:20 am
by hansg
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.

Re: Database issue in Cluster

PostPosted: Wed Feb 10, 2021 12:25 pm
by carpenox
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

Re: Database issue in Cluster

PostPosted: Thu Feb 11, 2021 7:43 am
by hansg
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.

Re: Database issue in Cluster

PostPosted: Thu Feb 11, 2021 4:08 pm
by carpenox
glad to have helped