Re: [asterisk-users] odbc error - server is gone

2011-05-02 Thread virendra bhati
Isql is a process by which you can test your ODBC connection without calling
to asterisk. Just one line command to test the ODBC connectivity.

**echo select 1 | isql -v *asterisk-connector*

 here asterisk-connector is your OBDC connection name.


On Sun, May 1, 2011 at 12:10 PM, Rizwan Hisham rizwanhas...@gmail.comwrote:

 isql?


 On Sat, Apr 30, 2011 at 6:18 PM, Pezhman Lali l...@lopl.net wrote:

 check your odbc connection with isql

 best



 On Fri, Apr 29, 2011 at 9:33 PM, Warren Selby wcse...@selbytech.comwrote:

 You're using 1.4.2. Why not try upgrading to a more recent release of 1.4
 (I believe 1.4.41 is current) and see if your issue has been resolved.

 Thanks,
 --Warren Selby, dCAP

 On Apr 29, 2011, at 7:32 AM, Rizwan Hisham rizwanhas...@gmail.com
 wrote:

 Yes I have it there, here the content of the file:

 i think the code is buggy,

 here is a comment from the function which generated the error
 (ast_odbc_smart_execute in res_odbc.c line 155 )

 /* This is a really bad method of trying to correct a dead connection.
 It
  * only ever really worked with MySQL.  It will not work with any other
  * database, since most databases prepare their statements on the server,
  * and if you disconnect, you invalidate the statement handle.  Hence, if
  * you disconnect, you're going to fail anyway, whether you try to
 execute
  * a second time or not.
  */

 This function is used all over.

 On Fri, Apr 29, 2011 at 12:23 AM, Sherwood McGowan 
 sherwood.mcgo...@gmail.com
 sherwood.mcgo...@gmail.com wrote:

 On Thu, Apr 28, 2011 at 11:09 AM, Rizwan Hisham rizwanhas...@gmail.com
 rizwanhas...@gmail.com wrote:

 Hi list,
 yesterday I converted my voicemail.conf to realtime voicemail and also
 configured to store the voicemessages in a database using odbc as 
 described
 here http://www.voip-info.org/wiki/view/Asterisk+RealTime+Voicemailand
 herehttp://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage
 .
 I am using asterisk 1.4.2 with mysql. I also installed the proper odbc
 driver for mysql on the server. I successfully completed the conversion 
 of a
 lot of voicemail users into db yesterday. But today on the CLI thsi error
 was showing;

 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147
 ast_odbc_smart_execute: SQL Execute returned an error -1: 08S01:
 [MySQL][ODBC 3.51 Driver][mysqld-5.0.68-log]MySQL server has gone away 
 (70)
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147
 ast_odbc_smart_execute: SQL Execute returned an error -1: 08S01:
 [MySQL][ODBC 3.51 Driver][mysqld-5.0.68-log]MySQL server has gone away 
 (70)
 [Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL
 Execute error!
 [SELECT COUNT(*) FROM voicemessages WHERE dir =
 '/var/spool/asterisk/voicemail/default/1757XXX/INBOX']

 I know that the error is caused due to stale odbc connection with
 mysql. But i want to find out if there is a cure for it. Why the 
 connection
 went stale in the first place also.

 Any ideas?

 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.comrizwanhas...@gmail.com
 W: http://www.axvoice.com/www.axvoice.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users



 do you have sanitysql = select 1 configured in res_odbc.ini?

 --
 Sherwood McGowan
 Telecommunications and VOIP Consultant


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.comrizwanhas...@gmail.com
 W: http://www.axvoice.com/www.axvoice.com

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users


 --

Re: [asterisk-users] odbc error - server is gone

2011-05-01 Thread Rizwan Hisham
isql?

On Sat, Apr 30, 2011 at 6:18 PM, Pezhman Lali l...@lopl.net wrote:

 check your odbc connection with isql

 best



 On Fri, Apr 29, 2011 at 9:33 PM, Warren Selby wcse...@selbytech.comwrote:

 You're using 1.4.2. Why not try upgrading to a more recent release of 1.4
 (I believe 1.4.41 is current) and see if your issue has been resolved.

 Thanks,
 --Warren Selby, dCAP

 On Apr 29, 2011, at 7:32 AM, Rizwan Hisham rizwanhas...@gmail.com
 wrote:

 Yes I have it there, here the content of the file:

 i think the code is buggy,

 here is a comment from the function which generated the error
 (ast_odbc_smart_execute in res_odbc.c line 155 )

 /* This is a really bad method of trying to correct a dead connection.  It
  * only ever really worked with MySQL.  It will not work with any other
  * database, since most databases prepare their statements on the server,
  * and if you disconnect, you invalidate the statement handle.  Hence, if
  * you disconnect, you're going to fail anyway, whether you try to execute
  * a second time or not.
  */

 This function is used all over.

 On Fri, Apr 29, 2011 at 12:23 AM, Sherwood McGowan 
 sherwood.mcgo...@gmail.com
 sherwood.mcgo...@gmail.com wrote:

 On Thu, Apr 28, 2011 at 11:09 AM, Rizwan Hisham rizwanhas...@gmail.com
 rizwanhas...@gmail.com wrote:

 Hi list,
 yesterday I converted my voicemail.conf to realtime voicemail and also
 configured to store the voicemessages in a database using odbc as described
 here http://www.voip-info.org/wiki/view/Asterisk+RealTime+Voicemailand
 herehttp://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage
 .
 I am using asterisk 1.4.2 with mysql. I also installed the proper odbc
 driver for mysql on the server. I successfully completed the conversion of 
 a
 lot of voicemail users into db yesterday. But today on the CLI thsi error
 was showing;

 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL
 Execute error!
 [SELECT COUNT(*) FROM voicemessages WHERE dir =
 '/var/spool/asterisk/voicemail/default/1757XXX/INBOX']

 I know that the error is caused due to stale odbc connection with mysql.
 But i want to find out if there is a cure for it. Why the connection went
 stale in the first place also.

 Any ideas?

 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.comrizwanhas...@gmail.com
 W: http://www.axvoice.com/www.axvoice.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users



 do you have sanitysql = select 1 configured in res_odbc.ini?

 --
 Sherwood McGowan
 Telecommunications and VOIP Consultant


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.comrizwanhas...@gmail.com
 W: http://www.axvoice.com/www.axvoice.com

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   

Re: [asterisk-users] odbc error - server is gone

2011-04-30 Thread Pezhman Lali
check your odbc connection with isql

best


On Fri, Apr 29, 2011 at 9:33 PM, Warren Selby wcse...@selbytech.com wrote:

 You're using 1.4.2. Why not try upgrading to a more recent release of 1.4
 (I believe 1.4.41 is current) and see if your issue has been resolved.

 Thanks,
 --Warren Selby, dCAP

 On Apr 29, 2011, at 7:32 AM, Rizwan Hisham rizwanhas...@gmail.com wrote:

 Yes I have it there, here the content of the file:

 i think the code is buggy,

 here is a comment from the function which generated the error
 (ast_odbc_smart_execute in res_odbc.c line 155 )

 /* This is a really bad method of trying to correct a dead connection.  It
  * only ever really worked with MySQL.  It will not work with any other
  * database, since most databases prepare their statements on the server,
  * and if you disconnect, you invalidate the statement handle.  Hence, if
  * you disconnect, you're going to fail anyway, whether you try to execute
  * a second time or not.
  */

 This function is used all over.

 On Fri, Apr 29, 2011 at 12:23 AM, Sherwood McGowan 
 sherwood.mcgo...@gmail.com
 sherwood.mcgo...@gmail.com wrote:

 On Thu, Apr 28, 2011 at 11:09 AM, Rizwan Hisham rizwanhas...@gmail.com
 rizwanhas...@gmail.com wrote:

 Hi list,
 yesterday I converted my voicemail.conf to realtime voicemail and also
 configured to store the voicemessages in a database using odbc as described
 here http://www.voip-info.org/wiki/view/Asterisk+RealTime+Voicemailand
 herehttp://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage
 .
 I am using asterisk 1.4.2 with mysql. I also installed the proper odbc
 driver for mysql on the server. I successfully completed the conversion of a
 lot of voicemail users into db yesterday. But today on the CLI thsi error
 was showing;

 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL
 Execute error!
 [SELECT COUNT(*) FROM voicemessages WHERE dir =
 '/var/spool/asterisk/voicemail/default/1757XXX/INBOX']

 I know that the error is caused due to stale odbc connection with mysql.
 But i want to find out if there is a cure for it. Why the connection went
 stale in the first place also.

 Any ideas?

 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.comrizwanhas...@gmail.com
 W: http://www.axvoice.com/www.axvoice.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users



 do you have sanitysql = select 1 configured in res_odbc.ini?

 --
 Sherwood McGowan
 Telecommunications and VOIP Consultant


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.comrizwanhas...@gmail.com
 W: http://www.axvoice.com/www.axvoice.com

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--

Re: [asterisk-users] odbc error - server is gone

2011-04-29 Thread Rizwan Hisham
Yes I have it there, here the content of the file:

i think the code is buggy,

here is a comment from the function which generated the error
(ast_odbc_smart_execute in res_odbc.c line 155 )

/* This is a really bad method of trying to correct a dead connection.  It
 * only ever really worked with MySQL.  It will not work with any other
 * database, since most databases prepare their statements on the server,
 * and if you disconnect, you invalidate the statement handle.  Hence, if
 * you disconnect, you're going to fail anyway, whether you try to execute
 * a second time or not.
 */

This function is used all over.

On Fri, Apr 29, 2011 at 12:23 AM, Sherwood McGowan 
sherwood.mcgo...@gmail.com wrote:

 On Thu, Apr 28, 2011 at 11:09 AM, Rizwan Hisham rizwanhas...@gmail.comwrote:

 Hi list,
 yesterday I converted my voicemail.conf to realtime voicemail and also
 configured to store the voicemessages in a database using odbc as described
 here http://www.voip-info.org/wiki/view/Asterisk+RealTime+Voicemail and
 here http://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage
 .
 I am using asterisk 1.4.2 with mysql. I also installed the proper odbc
 driver for mysql on the server. I successfully completed the conversion of a
 lot of voicemail users into db yesterday. But today on the CLI thsi error
 was showing;

 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL
 Execute error!
 [SELECT COUNT(*) FROM voicemessages WHERE dir =
 '/var/spool/asterisk/voicemail/default/1757XXX/INBOX']

 I know that the error is caused due to stale odbc connection with mysql.
 But i want to find out if there is a cure for it. Why the connection went
 stale in the first place also.

 Any ideas?

 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.com
 W: www.axvoice.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



 do you have sanitysql = select 1 configured in res_odbc.ini?

 --
 Sherwood McGowan
 Telecommunications and VOIP Consultant


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Best Ragards
Rizwan Qureshi
VoIP/Asterisk Engineer
Axvoice Inc.

V: +92 (0)  6767 26
E: rizwanhas...@gmail.com
W: www.axvoice.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] odbc error - server is gone

2011-04-29 Thread Warren Selby
You're using 1.4.2. Why not try upgrading to a more recent release of 1.4 (I 
believe 1.4.41 is current) and see if your issue has been resolved. 

Thanks,
--Warren Selby, dCAP

On Apr 29, 2011, at 7:32 AM, Rizwan Hisham rizwanhas...@gmail.com wrote:

 Yes I have it there, here the content of the file:
 
 i think the code is buggy,
 
 here is a comment from the function which generated the error 
 (ast_odbc_smart_execute in res_odbc.c line 155 )
 
 /* This is a really bad method of trying to correct a dead connection.  It
  * only ever really worked with MySQL.  It will not work with any other
  * database, since most databases prepare their statements on the server,
  * and if you disconnect, you invalidate the statement handle.  Hence, if
  * you disconnect, you're going to fail anyway, whether you try to execute
  * a second time or not.
  */
 
 This function is used all over.
 
 On Fri, Apr 29, 2011 at 12:23 AM, Sherwood McGowan 
 sherwood.mcgo...@gmail.com wrote:
 On Thu, Apr 28, 2011 at 11:09 AM, Rizwan Hisham rizwanhas...@gmail.com 
 wrote:
 Hi list,
 yesterday I converted my voicemail.conf to realtime voicemail and also 
 configured to store the voicemessages in a database using odbc as described 
 here and here.
 I am using asterisk 1.4.2 with mysql. I also installed the proper odbc driver 
 for mysql on the server. I successfully completed the conversion of a lot of 
 voicemail users into db yesterday. But today on the CLI thsi error was 
 showing;
 
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute: SQL 
 Execute returned an error -1: 08S01: [MySQL][ODBC 3.51 
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute: SQL 
 Execute returned an error -1: 08S01: [MySQL][ODBC 3.51 
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL 
 Execute error!
 [SELECT COUNT(*) FROM voicemessages WHERE dir = 
 '/var/spool/asterisk/voicemail/default/1757XXX/INBOX']
 
 I know that the error is caused due to stale odbc connection with mysql. But 
 i want to find out if there is a cure for it. Why the connection went stale 
 in the first place also.
 
 Any ideas?
 
 -- 
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.
 
 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.com
 W: www.axvoice.com
 
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 do you have sanitysql = select 1 configured in res_odbc.ini?
 
 -- 
 Sherwood McGowan
 Telecommunications and VOIP Consultant
 
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 
 -- 
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.
 
 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.com
 W: www.axvoice.com
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] odbc error - server is gone

2011-04-28 Thread Rizwan Hisham
Hi list,
yesterday I converted my voicemail.conf to realtime voicemail and also
configured to store the voicemessages in a database using odbc as described
here http://www.voip-info.org/wiki/view/Asterisk+RealTime+Voicemail and
here http://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage.
I am using asterisk 1.4.2 with mysql. I also installed the proper odbc
driver for mysql on the server. I successfully completed the conversion of a
lot of voicemail users into db yesterday. But today on the CLI thsi error
was showing;

[Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute: SQL
Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
[Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute: SQL
Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
[Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL
Execute error!
[SELECT COUNT(*) FROM voicemessages WHERE dir =
'/var/spool/asterisk/voicemail/default/1757XXX/INBOX']

I know that the error is caused due to stale odbc connection with mysql. But
i want to find out if there is a cure for it. Why the connection went stale
in the first place also.

Any ideas?

-- 
Best Ragards
Rizwan Qureshi
VoIP/Asterisk Engineer
Axvoice Inc.

V: +92 (0)  6767 26
E: rizwanhas...@gmail.com
W: www.axvoice.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] odbc error - server is gone

2011-04-28 Thread Sherwood McGowan
On Thu, Apr 28, 2011 at 11:09 AM, Rizwan Hisham rizwanhas...@gmail.comwrote:

 Hi list,
 yesterday I converted my voicemail.conf to realtime voicemail and also
 configured to store the voicemessages in a database using odbc as described
 here http://www.voip-info.org/wiki/view/Asterisk+RealTime+Voicemail and
 here http://www.voip-info.org/wiki/view/Asterisk+Voicemail+ODBC+storage.
 I am using asterisk 1.4.2 with mysql. I also installed the proper odbc
 driver for mysql on the server. I successfully completed the conversion of a
 lot of voicemail users into db yesterday. But today on the CLI thsi error
 was showing;

 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: res_odbc.c:147 ast_odbc_smart_execute:
 SQL Execute returned an error -1: 08S01: [MySQL][ODBC 3.51
 Driver][mysqld-5.0.68-log]MySQL server has gone away (70)
 [Apr 28 11:40:54] WARNING[24676]: app_voicemail.c:2239 inboxcount: SQL
 Execute error!
 [SELECT COUNT(*) FROM voicemessages WHERE dir =
 '/var/spool/asterisk/voicemail/default/1757XXX/INBOX']

 I know that the error is caused due to stale odbc connection with mysql.
 But i want to find out if there is a cure for it. Why the connection went
 stale in the first place also.

 Any ideas?

 --
 Best Ragards
 Rizwan Qureshi
 VoIP/Asterisk Engineer
 Axvoice Inc.

 V: +92 (0)  6767 26
 E: rizwanhas...@gmail.com
 W: www.axvoice.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



do you have sanitysql = select 1 configured in res_odbc.ini?

-- 
Sherwood McGowan
Telecommunications and VOIP Consultant
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users