Re: [asterisk-users] problem with inserting records into cdr

2010-06-05 Thread GlenM
I am sorry I did not get back to you last night - I was so tired!

I don't have such a file, instead I have cdr_mysql.conf which does
connect. same thing I think - perhaps a different flavour of the module.
If you type asterisk -rx show modules | grep mysql at the command prompt, not 
the CLI, do you see the module loaded?


Could you point out which line, I found no line with replic as a search
string.
try adding this to your /etc/mysql/my.cnf file and restart MySQL server. 
Tail the log and see if you see any messages about asterisk connecting or SQL 
statements.

general_log_file= /var/log/mysql/mysql.log
general_log = 1

I know that in the asterisk CLI, if asterisk cannot connect to your 
database, you *may* see a message. I know I did when mine could NOT connect.

I hope these help you out - I am fairly new to Asterisk, and digging for 
information can sometimes be frustrating.

cov...@ccs.covici.com said the following on 6/4/2010 2:46 PM:
 See my comments below.

 GlenM glenmill...@gmail.com wrote:

   
 Interesting that you should mention this:

 I am using Asterisk 1.4x and had the same issue - but fixed it. My issue 
 was a combination of permissions and configuration.

 1. in your cdr_addon_mysql.conf , have you tried connecting to the 
 database using the credentials within ? - start there
 
 I don't have such a file, instead I have cdr_mysql.conf which does
 connect.

   
 2. in your /etc/mysql/my.cnf - there is a line 'Logging and Replication' 
 - do you have that enabled so you can see the SQL queries in the log?
 
 Could you point out which line, I found no line with replic as a search
 string.

   
 3. if you connect to the asterisk cli ( asterisk -rv) do you see any 
 messages regarding the database?
 
 Only when first starting up, default port, etc.

   
 Glen

 cov...@ccs.covici.com said the following on 6/4/2010 11:19 AM:
 
 Most of the time there is no error message at all.

 Tiago Geada tiago.ge...@gmail.com wrote:

   
   
 pasting the error would help

 On 3 June 2010 20:56, cov...@ccs.covici.com wrote:

 
 
 Hi.  For several months now asterisk will mysteriously stop inserting
 records into cdr database.  I am using mysql and the asterisk addons
 1.6.2 to accomplish this.  Sometimes there is a strange error about
 column names, but often there is no error, it just stops.  I just have
 to restart asterisk to get things going again, so I am stumped as to
 what is happening, or even how to troubleshoot.  I usually run in
 verbosity 4, but am not seeing anything of interest.

 Any ideas would be appreciated.

 --
 Your life is like a penny.  You're going to lose it.  The question is:
 How do
 you spend it?

 John Covici
 cov...@ccs.covici.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

   
   
 
 Alternatives:

 
 -- 
 _
 -- 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
 

   

-- 
_
-- 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] problem with inserting records into cdr

2010-06-04 Thread Tiago Geada
pasting the error would help

On 3 June 2010 20:56, cov...@ccs.covici.com wrote:

 Hi.  For several months now asterisk will mysteriously stop inserting
 records into cdr database.  I am using mysql and the asterisk addons
 1.6.2 to accomplish this.  Sometimes there is a strange error about
 column names, but often there is no error, it just stops.  I just have
 to restart asterisk to get things going again, so I am stumped as to
 what is happening, or even how to troubleshoot.  I usually run in
 verbosity 4, but am not seeing anything of interest.

 Any ideas would be appreciated.

 --
 Your life is like a penny.  You're going to lose it.  The question is:
 How do
 you spend it?

 John Covici
 cov...@ccs.covici.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

Re: [asterisk-users] problem with inserting records into cdr

2010-06-04 Thread covici
Most of the time there is no error message at all.

Tiago Geada tiago.ge...@gmail.com wrote:

 pasting the error would help
 
 On 3 June 2010 20:56, cov...@ccs.covici.com wrote:
 
  Hi.  For several months now asterisk will mysteriously stop inserting
  records into cdr database.  I am using mysql and the asterisk addons
  1.6.2 to accomplish this.  Sometimes there is a strange error about
  column names, but often there is no error, it just stops.  I just have
  to restart asterisk to get things going again, so I am stumped as to
  what is happening, or even how to troubleshoot.  I usually run in
  verbosity 4, but am not seeing anything of interest.
 
  Any ideas would be appreciated.
 
  --
  Your life is like a penny.  You're going to lose it.  The question is:
  How do
  you spend it?
 
  John Covici
  cov...@ccs.covici.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
 
 
 
 Alternatives:
 
 
 -- 
 _
 -- 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
-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.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] problem with inserting records into cdr

2010-06-04 Thread GlenM
Interesting that you should mention this:

I am using Asterisk 1.4x and had the same issue - but fixed it. My issue 
was a combination of permissions and configuration.

1. in your cdr_addon_mysql.conf , have you tried connecting to the 
database using the credentials within ? - start there
2. in your /etc/mysql/my.cnf - there is a line 'Logging and Replication' 
- do you have that enabled so you can see the SQL queries in the log?
3. if you connect to the asterisk cli ( asterisk -rv) do you see any 
messages regarding the database?

Glen

cov...@ccs.covici.com said the following on 6/4/2010 11:19 AM:
 Most of the time there is no error message at all.

 Tiago Geada tiago.ge...@gmail.com wrote:

   
 pasting the error would help

 On 3 June 2010 20:56, cov...@ccs.covici.com wrote:

 
 Hi.  For several months now asterisk will mysteriously stop inserting
 records into cdr database.  I am using mysql and the asterisk addons
 1.6.2 to accomplish this.  Sometimes there is a strange error about
 column names, but often there is no error, it just stops.  I just have
 to restart asterisk to get things going again, so I am stumped as to
 what is happening, or even how to troubleshoot.  I usually run in
 verbosity 4, but am not seeing anything of interest.

 Any ideas would be appreciated.

 --
 Your life is like a penny.  You're going to lose it.  The question is:
 How do
 you spend it?

 John Covici
 cov...@ccs.covici.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

   
 
 Alternatives:

 
 -- 
 _
 -- 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


Re: [asterisk-users] problem with inserting records into cdr

2010-06-04 Thread covici
See my comments below.

GlenM glenmill...@gmail.com wrote:

 Interesting that you should mention this:
 
 I am using Asterisk 1.4x and had the same issue - but fixed it. My issue 
 was a combination of permissions and configuration.
 
 1. in your cdr_addon_mysql.conf , have you tried connecting to the 
 database using the credentials within ? - start there
I don't have such a file, instead I have cdr_mysql.conf which does
connect.

 2. in your /etc/mysql/my.cnf - there is a line 'Logging and Replication' 
 - do you have that enabled so you can see the SQL queries in the log?
Could you point out which line, I found no line with replic as a search
string.

 3. if you connect to the asterisk cli ( asterisk -rv) do you see any 
 messages regarding the database?
Only when first starting up, default port, etc.

 
 Glen
 
 cov...@ccs.covici.com said the following on 6/4/2010 11:19 AM:
  Most of the time there is no error message at all.
 
  Tiago Geada tiago.ge...@gmail.com wrote:
 

  pasting the error would help
 
  On 3 June 2010 20:56, cov...@ccs.covici.com wrote:
 
  
  Hi.  For several months now asterisk will mysteriously stop inserting
  records into cdr database.  I am using mysql and the asterisk addons
  1.6.2 to accomplish this.  Sometimes there is a strange error about
  column names, but often there is no error, it just stops.  I just have
  to restart asterisk to get things going again, so I am stumped as to
  what is happening, or even how to troubleshoot.  I usually run in
  verbosity 4, but am not seeing anything of interest.
 
  Any ideas would be appreciated.
 
  --
  Your life is like a penny.  You're going to lose it.  The question is:
  How do
  you spend it?
 
  John Covici
  cov...@ccs.covici.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
 

  
  Alternatives:
 
  
  -- 
  _
  -- 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

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.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] problem with inserting records into cdr

2010-06-04 Thread David Backeberg
On Thu, Jun 3, 2010 at 3:56 PM,  cov...@ccs.covici.com wrote:
 Hi.  For several months now asterisk will mysteriously stop inserting
 records into cdr database.  I am using mysql and the asterisk addons
 1.6.2 to accomplish this.  Sometimes there is a strange error about
 column names, but often there is no error, it just stops.  I just have
 to restart asterisk to get things going again, so I am stumped as to
 what is happening, or even how to troubleshoot.  I usually run in
 verbosity 4, but am not seeing anything of interest.

So... I've seen this before, and I can't decide how exactly the
'problem' should be attacked.

In my case, I was trying to centralize cdrs from multiple systems,
down to a single cohesive cdr repository. This would give me a nice
single log point I could dig through. Especially helpful in situations
where you use multiple asterisks for load balancing, but then want a
cohesive set of logs.

Anyway, in my case, I knew for a fact that my mysql db target was
sometimes flaky. Sometimes the underlying i/o layer would freak out.
Or there would be a network hiccup.

Here's my assessment of how cdr_mysql is behaving...

* asterisk sent a db insert to the mysql database for a particular cdr
* but never got that insert acknowledged
* there is no hard limit on when that insert should time out, so
asterisk blocks on this cdr write attempt, which will now never
complete because of some problem outside the control of asterisk
* then there's a traffic jam of cdrs that never even attempt because
the earlier cdr did not complete, and it seems like there's a design
decision that cdrs should write serially, one after the other

What would I like to see as the solution?

That's an excellent question. The obvious fixes are:
* don't have a flaky i/o subsystem on your db box
* don't have a network hiccup

Barring that, it would be nice if we could set an abort timer on the
cdr_mysql insert attempts. This should be user tunable. For all of my
systems, much less than one second should be the return time, and I'd
want an abort after, say, 10 seconds.

I'd want some kind of logging trap thrown, and the error logged
somewhere in /var/log/asterisk or syslog, etc.

What do people think?

I've known about this issue for years, but I've never seen a
discussion on this. Perhaps this has come up before in Mantis.

-- 
_
-- 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] problem with inserting records into cdr

2010-06-03 Thread covici
Hi.  For several months now asterisk will mysteriously stop inserting
records into cdr database.  I am using mysql and the asterisk addons
1.6.2 to accomplish this.  Sometimes there is a strange error about
column names, but often there is no error, it just stops.  I just have
to restart asterisk to get things going again, so I am stumped as to
what is happening, or even how to troubleshoot.  I usually run in
verbosity 4, but am not seeing anything of interest.

Any ideas would be appreciated.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.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