monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syslog-ng failed, cannot open a connection to UNIX[/dev/log]


From: Aleksandrov Artyom
Subject: Re: syslog-ng failed, cannot open a connection to UNIX[/dev/log]
Date: Sat, 18 Jun 2011 03:31:17 +0400

Hello,

I found the problem. Monit can`t open the socket because it try
another type (sock_steam instead of sock_dgram).

socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_FILE, path="/dev/log"}, 110) = -1 EPROTOTYPE
(Protocol wrong type for socket)
shutdown(4, 2 /* send and receive */)   = 0
close(4)                                = 0
write(2, "'syslog-ng' failed, cannot open "..., 63'syslog-ng' failed,
cannot open a connection to UNIX[/dev/log]

Also there`s bug about this problem (2006 year).
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=384802

I think it will be right if Monit can try open socket both types.

What do you think about it?

Best regards, Artyom


On Mon, May 30, 2011 at 3:41 PM, Aleksandrov Artyom <address@hidden> wrote:
> Hi, Thank you for answer.
>
> I don`t change syslog-ng conf file during update
>
>    source src { unix-dgram("/dev/log"); internal(); };
>
> ~# ls -l /dev/log
> srw-rw-rw- 1 root root 0 May 27 19:37 /dev/log
>
>
> syslog-ng work correctly because monit write to syslog by himself:
>    set logfile syslog facility log_daemon
>
>
>
>
> On Mon, May 30, 2011 at 3:31 PM, Martin Pala <address@hidden> wrote:
>> Hello,
>>
>> is the syslog-ng still configured to listen on /dev/log? If so, there should 
>> be something like unix-stream("/dev/log") in syslog-ng configuration.
>>
>> Can you provide output of "ls -l /dev/log"?
>>
>> Regards,
>> Martin
>>
>>
>> On May 27, 2011, at 2:35 PM, Aleksandrov Artyom wrote:
>>
>>> Hello, I`ve update one of servers from lenny to squeeze yesterday and
>>> after that catching  problem with monitoring syslog-ng.
>>>
>>> I get this error:  "syslog-ng failed, cannot open a connection to
>>> UNIX[/dev/log]"
>>>
>>> my monitrc:
>>>
>>> check process syslog-ng pidfile /var/run/syslog-ng.pid
>>>        start program = "/etc/init.d/syslog-ng start"
>>>        stop program = "/etc/init.d/syslog-ng stop"
>>>        if failed UNIXSOCKET /dev/log then restart
>>>        if 3 restarts within 5 cycles then timeout
>>>
>>> Package: syslog-ng
>>> State: installed
>>> Automatically installed: no
>>> Version: 3.1.3-3
>>>
>>> I tested this on pkg from debian rep and with last version from site 
>>> (5.2.5).
>>>
>>> Package: monit
>>> State: installed
>>> Automatically installed: no
>>> Version: 1:5.1.1-1
>>>
>>> On another server lenny with syslog-ng 2.1.3 all ok.
>>>
>>> Thank you for advices.
>>>
>>> Best regards, Artyom.
>>> С уважением, Артём.
>>>
>>> --
>>> To unsubscribe:
>>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]