[OpenSIPS-Users] siptrace db connection now fails
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Mar 10 20:21:48 CET 2009
HI Jeff,
you get the 2003 error code:
Error: 2003 (CR_CONN_HOST_ERROR)
Message: Can't connect to MySQL server on '%s' (%d)
which means the client cannot connect to host..So, you need to
investigate a bit around the network and mysql server.
Regards,
Bogdan
Jeff Pyle wrote:
> Hi Bogdan,
>
> The db error happened again. Here's what the logs showed:
>
> ERROR:db_mysql:db_mysql_new_connection: driver error(2003): Can't connect
> to MySQL server on 'ww.xx.yy.zz' (4)
> ERROR:core:db_do_init: could not add connection to the pool
> ERROR:siptrace:child_init: unable to connect database
> ERROR:core:init_mod_child: failed to initializing module siptrace, rank 2
> ERROR:core:main_loop: init_child failed for UDP listener
> ERROR:db_mysql:db_mysql_new_connection: driver error(2003): Can't connect
> to MySQL server on 'ww.xx.yy.zz' (4)
> ERROR:core:db_do_init: could not add connection to the pool
> ERROR:siptrace:child_init: unable to connect database
> ERROR:core:init_mod_child: failed to initializing module siptrace, rank 0
> ERROR:core:main_loop: error in init_child for PROC_MAIN
>
> Upon restarting opensips again, it connected okay.
>
>
> - Jeff
>
>
>
> On 3/9/09 10:22 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>
>
>> Hi Jeff,
>>
>> The info is also reported on the ERR level, so you will get it.
>>
>> Thanks and regards,
>> Bogdan
>>
>> Jeff Pyle wrote:
>>
>>> Hi Bogdan,
>>>
>>> It happened once again. So I updated from svn, recompiled, and reinstalled.
>>> Then of course it didn't happen. But if the trends hold, it will soon. Is
>>> there any particular debug level I need to be running to see the error
>>> number?
>>>
>>>
>>> - Jeff
>>>
>>>
>>>
>>> On 3/9/09 7:32 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>>>
>>>
>>>
>>>> Hi Jeff,
>>>>
>>>> really strange, but I still suspect something related to the server. I
>>>> made a small improvement in the error loging, so next time when it will
>>>> happen, we get the error number also and this will help the identify the
>>>> error (the error string is a bit unclear).
>>>>
>>>> So, just update from SVN and report if it happen again.
>>>>
>>>> Thanks and regards,
>>>> Bogdan
>>>>
>>>> Jeff Pyle wrote:
>>>>
>>>>
>>>>> Hi Bogdan,
>>>>>
>>>>> 1.5. But, I discovered I had the same problem on a 1.4.3 instance as well.
>>>>> I was just about to report to the list that I solved the issue by
>>>>> restarting
>>>>> the mysql server daemon.
>>>>>
>>>>> Still odd, though. The mysql server instance itself is running on CentOS
>>>>> 64bit, with mysql's RPMs (i.e. MySQL-server-community-5.1.30-0.rhel5).
>>>>> Even
>>>>> when Opensips couldn't connect, I could still connect from the opensips 1.5
>>>>> machine using the mysql command line client. That machine has
>>>>> /usr/lib/libmysqlclient.so.16.0.0 on it from the
>>>>> MySQL-Cluster-gpl-client-6.3.20-0.rhel5 RPM direct from mysql's site.
>>>>>
>>>>> The good news is the problem has gone away. The bad news is I have no idea
>>>>> what caused it, or how to recreate it.
>>>>>
>>>>>
>>>>>
>>>>> - Jeff
>>>>>
>>>>>
>>>>>
>>>>> On 3/5/09 12:37 PM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi Jeff,
>>>>>>
>>>>>> Is this 1.4.4 or 1.5 ?
>>>>>>
>>>>>> Regards,
>>>>>> Bogdan
>>>>>>
>>>>>> Jeff Pyle wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Until recently siptrace (running on opensips svn) was able to connect
>>>>>>> without a problem via mysql to its database. Now, it fails will the
>>>>>>> following error 2 seconds after startup:
>>>>>>>
>>>>>>> ERROR:db_mysql:db_mysql_new_connection: driver error: Can't connect to
>>>>>>> MySQL
>>>>>>> server on '207.xx.xx.xx' (4)
>>>>>>> ERROR:db_mysql:db_mysql_new_connection: driver error: Can't connect to
>>>>>>> MySQL
>>>>>>> server on '207.xx.xx.xx' (4)
>>>>>>> ERROR:core:db_do_init: could not add connection to the pool
>>>>>>> ERROR:core:db_do_init: could not add connection to the pool
>>>>>>> ERROR:siptrace:child_init: unable to connect database
>>>>>>> ERROR:siptrace:child_init: unable to connect database
>>>>>>> ERROR:core:init_mod_child: failed to initializing module siptrace, rank 1
>>>>>>> ERROR:core:main_loop: init_child failed for UDP listener
>>>>>>> ERROR:core:init_mod_child: failed to initializing module siptrace, rank 4
>>>>>>> ERROR:core:main_loop: init_child failed for UDP listener
>>>>>>>
>>>>>>>
>>>>>>> But a network capture shows the server answered correctly. Here's an
>>>>>>> excerpt of the messaging:
>>>>>>>
>>>>>>> MySQL Login Request user=opensips_up1 db=theshow
>>>>>>> MySQL Response OK
>>>>>>> MySQL Server Greeting proto=10 version=5.1.30-community-log
>>>>>>> ... after this opensips tears down the connections with [FIN, ACK]
>>>>>>> tagged
>>>>>>> packets.
>>>>>>>
>>>>>>> I'm not sure at what point it stopped working. We haven't done any
>>>>>>> updates
>>>>>>> on the mysql server, and only svn updates with opensips. Here's the
>>>>>>> siptrace config from opensips.cfg:
>>>>>>>
>>>>>>> loadmodule "siptrace.so"
>>>>>>> modparam("siptrace", "db_url",
>>>>>>> "mysql://opensips_up1:password@207.xx.xx.xx/theshow")
>>>>>>> #modparam("siptrace", "trace_flag", 7)
>>>>>>> modparam("siptrace", "trace_on", 1)
>>>>>>>
>>>>>>> I'm not sure where to start debugging this, since the DB server appears
>>>>>>> to
>>>>>>> answer okay. I tried updating to the most recent svn revsion, 5394, but
>>>>>>> no
>>>>>>> change. Any suggestions?
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Jeff
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Users mailing list
>>>>>>> Users at lists.opensips.org
>>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
>
More information about the Users
mailing list