[syslog-ng] sql driver does'nt work on RHEL5 syslog-ng 3.0.7
LEBRETON Philippe
philippe.lebreton at cti-paysloire.cnamts.fr
Wed Sep 15 11:58:29 CEST 2010
hello,
When i use the 3306 port it's OK .
For the 4058 port it's a bug ?
Philippe
Le 13/09/2010 16:37, Balazs Scheidler a écrit :
> On Wed, 2010-09-08 at 16:11 +0200, LEBRETON Philippe wrote:
>
>> Hello
>>
>> i want to use mysl driver.
>> My configuration file is :
>>
>> destination d_mysql_drv {
>> sql(type(mysql)
>> host("l1-154901l333sng") port("4058") username("root")
>> password("admin") database("Syslog")
>> table("logs")
>> columns("host", "facility", "priority", "pid", "tag",
>> "datetime", "program", "msg")
>> values( '$HOST', '$FACILITY_NUM', '$LEVEL_NUM', '$PID', '$TAG',
>> '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC',
>> '$PROGRAM', '$MSG' ));
>>
>> };
>>
>> but in system log i have this error :
>>
>> Sep 8 15:54:01 154901l333sng syslog-ng[15030]: Error establishing SQL
>> connection; type='mysql', host='l1-154901l333sng', port='4058',
>> username='root', database='Syslog', error='2003: Can\'t connect to MySQL
>> server on \'l1-154901l333sng\' (111)'
>>
>> on shell prompt, i use :
>> mysql -u admin -p -h l1-154901l333sng -P 4058 Syslog
>> an i can connect to database.
>>
>> Where is the problem?
>> a bug ?
>> a bad configuration?
>>
> Hmm... can you strace the client if it actually tries to connect? I
> vaguely remember problems with libdbi drivers and port numbers, it may
> connect to 3306 instead of 4058 as it is ignoring the port number.
>
> .... I've checked this out, and it seems to have affected only the
> "freetds" (=MSSQL) driver and not mysql.
>
> So I'd definitely try to strace syslog-ng as it tries to connect to
> MySQL to see what the actual problem is behind this error message. If
> (111) is to be interpreted as an OS error number, it is
>
> #define ECONNREFUSED 111 /* Connection refused */
>
>
> Please check if syslog-ng tries to connect to the proper port number and
> if MySQL is listening there and if a firewall doesn't block access.
>
>
*****************************************************
"Le contenu de ce courriel et ses eventuelles pièces jointes sont confidentiels. Ils s'adressent exclusivement à la personne destinataire. Si cet envoi ne vous est pas destiné, ou si vous l'avez reçu par erreur, et afin de ne pas violer le secret des correspondances, vous ne devez pas le transmettre à d'autres personnes ni le reproduire. Merci de le renvoyer à l'émetteur et de le détruire.
Attention : L'Organisme de l'émetteur du message ne pourra être tenu responsable de l'altération du présent courriel. Il appartient au destinataire de vérifier que les messages et pièces jointes reçus ne contiennent pas de virus. Les opinions contenues dans ce courriel et ses éventuelles pièces jointes sont celles de l'émetteur. Elles ne reflètent pas la position de l'Organisme sauf s'il en est disposé autrement dans le présent courriel."
******************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: philippe_lebreton.vcf
Type: text/x-vcard
Size: 259 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20100915/ce3051c6/attachment.vcf
More information about the syslog-ng
mailing list