Unable to migrate working vicidial box to separate mysql ser

General and Support topics relating to ViciDialNow and GoAutoDial ISO installers

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

Unable to migrate working vicidial box to separate mysql ser

Postby raasdnil » Sat Aug 09, 2008 9:56 am

Hi all.

I have a vicidial server that works.

Unfortunately the load is getting unacceptable and to mitigate this, I want to move the MySQL server off to a separate server. After reading the docs, reading through the scratch install, I figure it should be the following procedure:

1) Install MySQL on new server & set old_passwords in my.cnf
2) Shut down astguiclient scripts
3) Dump the asterisk db
4) Restor the asterisk db
5) Make a cron user on the new MySQL server with identical password
6) Grant access to the asterisk database per the current setup
7) Edit /etc/astguiclient.conf to point to the new MySQL server
8) Ensure I can log in from the vicidial server using the manual mysql client
9) Fire up the astguiclient scripts
10) Edit the phones DBx and DBy settings to point to new server
11) Go bathe in the beauty of sub 1 loads again.

However, following the above results in the following:

Can log in using the username and phone ID ok.
Can still make calls manually through the asterisk box.
Can view all admin pages and update anything needed.

But the conferencing part for the client does not work.

Ie, you go into a campaign, and vicidial doesn't call the agent telling them they are the only one in the conference.

Looking at log files brings up

LOGGED INTO MYSQL SERVER ON 1 CONNECTION||
LISTENER DEAD STOPPING PROGRAM... ATTEMPTING TO START keepalive SCRIPT||
LISTENER DEAD STOPPING PROGRAM... ATTEMPTING TO START keepalive SCRIPT||
CLOSING DB CONNECTION||

And then it repeats every minute.

The mysql server shows several connections into the asterisk database from the cron user from the right address.

I'm stumped on this one.


Ideas?

Mikel
raasdnil
 
Posts: 5
Joined: Sat Aug 09, 2008 9:07 am

Postby mflorell » Sat Aug 09, 2008 9:26 pm

Are all of the server_ip fields in the database set to the IP address of the Asterisk server?

Please post the top half of your astguiclient.conf along with the ifconfig of your two servers.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby raasdnil » Sat Aug 09, 2008 10:15 pm

Thanks for your reply Matt,

The box in question is a vicidial now box. Part of getting the DB out onto a different server is so that I can then start phasing in several self installed vicidial boxes in... the vicidial now box was a proof of concept that is working out well. But has outgrown it's usefullness.

> Are all the server_ip fields in the db set to the IP of the Asterisk server?

I believe so. After I moved the DB (which was a dump and restore) I then ran the ADMIN_update_server_ip.pl command. Looking through the tables manually found a few entries that were empty. Thinking that was the problem, I updated each of these manually on the server to match the vicidial server setting. I did this for every table that is accessed by ADMIN_update_server_ip.pl

Then, trying again (after a restart) same symptoms.

The confusing thing is that the MySQL server shows connections and activities from the vicidial box on the cron username (selects, updates and deletes). So it doesn't seem to be a communications issue with the database. However, doing a screen -r on the asterisk console shows no communication from the astguiclient to the asterisk box - this I think is more of the issue. I keep getting:

Noone is in your session: 8600051
_Go Back_
Call Agent Again

Now, if I call 8600051 manually from the phone, I get through to the asterisk box and get the "You are the only on in this conference, [beep]"

I am also thinking it might be a firewall or the like on the vicidialnow box. But there is no /etc/sysconfig/iptables file, so not quite sure where else to look. I am googling around on this bit now.

Here is the stuff you wanted:

/etc/astguiclient.conf - top half
----------------------------------------------------------------
# cat /etc/astguiclient.conf
# astguiclient.conf - configuration elements for the astguiclient package
# this is the astguiclient configuration file
# all comments will be lost if you run install.pl again

# Paths used by astGUIclient
PATHhome => /usr/share/astguiclient
PATHlogs => /var/log/astguiclient
PATHagi => /var/lib/asterisk/agi-bin
PATHweb => /var/www/html
PATHsounds => /var/lib/asterisk/sounds
PATHmonitor => /var/spool/asterisk/monitor


# The IP address of this machine
VARserver_ip => 10.0.0.251

# Database connection information
VARDB_server => 10.0.0.161
VARDB_database => asterisk
VARDB_user => cron
VARDB_pass => 1234
VARDB_port => 3306
----------------------------------------------------------------

IF Config on vicidial box:


# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0B:CD:93:C8:3F
inet addr:10.0.0.251 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::20b:cdff:fe93:c83f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24675 errors:0 dropped:0 overruns:0 frame:0
TX packets:3145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4869511 (4.6 MiB) TX bytes:779854 (761.5 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:347265 errors:0 dropped:0 overruns:0 frame:0
TX packets:347265 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:74945817 (71.4 MiB) TX bytes:74945817 (71.4 MiB)


----------------------------------------------------------------
ip config on NT 2003 Server running MySQL (remote DB server)

C:\>ipconfig
Windows IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.0.0.161
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.254

----------------------------------------------------------------

I thought I would give you some more data:

Vicidial box:

# uname -a
Linux 10.0.0.251 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 i686 i386 GNU/Linux

# cat /usr/src/astguiclient/version
2.0.3

# apachectl -v
Server version: Apache/2.2.3
Server built: Mar 21 2007 19:10:36

MySQL version 5.0.22 (this is the one being depreciated and is off now)

I can also do this from the command line:

# mysql -h 10.0.0.161 -u cron -p asterisk
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6197 to server version: 5.0.51b-community-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select server_id, server_ip from servers;
+------------+--------------+
| server_id | server_ip |
+------------+--------------+
| Vicidial01 | 10.0.0.251 |
+------------+--------------+
1 row in set (0.00 sec)


----------------------------------------------------------------

MS Server box:

Version: 2003

MySQL Server version: 5.0.51b

----------------------------------------------------------------

The backup and restore from old Mysql server to new mysql server was done through the MySQL admin interface, with a lock tables full backup and then a restore to the new database.

The user table was then duplicated.

Mikel
raasdnil
 
Posts: 5
Joined: Sat Aug 09, 2008 9:07 am

Postby mflorell » Sat Aug 09, 2008 11:16 pm

Is your database server set to use ntp?

The database server and asterisk/VICIDIAL server MUST be on exactly the same time.

It has been years since I used a MySQL server on Windows for a VICIDIAL database server. I know it can be done, but I'm not sure what issues you may run into using it.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby raasdnil » Sat Aug 09, 2008 11:41 pm

Yes, both are using NTP. They are both syncing off a common NTP server and are within a mili-second of each other.

I'll try it on a linux box later today/tonight and see if that fixes it.

Mikel
raasdnil
 
Posts: 5
Joined: Sat Aug 09, 2008 9:07 am

Postby raasdnil » Sun Aug 10, 2008 3:47 am

OK, it's working.

Took me exactly 23 minutes to install mysql on a linux box, config my.cnf, shut down vicidial, backup database, shutdown database on vicidial, restore database on new server, create user, assign permissions, edit astguiclient and restart vicidial.

All good.

Moral of the story?

Windows is evil :evil:

Thanks for your help Matt :)

Mikel
raasdnil
 
Posts: 5
Joined: Sat Aug 09, 2008 9:07 am


Return to ViciDialNow - GoAutoDial

Who is online

Users browsing this forum: No registered users and 33 guests