Mailing List Archive

what does error -2077 trying to add listener mean
Hi,

I've configured rsyslog to use relp as transport protocol.
sw version: rsyslog-relp-3.21.3-4 and rsyslog-3.21.3-4.

in the log I see these messages:
2009-03-16T16:12:10.769408+01:00 zeus-log01-2 rsyslogd: [origin
software="rsyslogd" swVersion="3.21.3" x-pid="3239"
x-info="http://www.rsyslog.com"] restart
2009-03-16T16:12:10.769447+01:00 zeus-log01-2 rsyslogd: error -2077
trying to add listener
2009-03-16T16:12:10.769458+01:00 zeus-log01-2 rsyslogd: the last error
occured in /data/etc/rsyslog/rsyslog.conf, line 6
2009-03-16T16:12:10.769470+01:00 zeus-log01-2 rsyslogd: the last error
occured in /data/etc/rsyslog/rsyslog.conf, line 7

The config line in question read:

------snip
# Global
$ModLoad imudp.so
$ModLoad imtcp.so
$ModLoad imrelp.so
$UDPServerRun 514
$InputTCPServerRun 514 <-- line 6
$InputRELPServerRun 2514 <-- line 7

$DirCreateMode 0755

-------snap

netstat -an| grep 514 shows all configured udp and tcp ports open.

So where can I find a description of error -2077?

Thanks in advance

Thomas
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: what does error -2077 trying to add listener mean [ In reply to ]
There should be informtion on that error on the web, but 2077 is "could not
bind to port". A short reference can be found in git in file
./runtime/rsyslog.h

Not sure where it orginates from in this case...

Rainer


> -----Original Message-----
> From: rsyslog-bounces@lists.adiscon.com [mailto:rsyslog-
> bounces@lists.adiscon.com] On Behalf Of Thomas Mieslinger
> Sent: Monday, March 16, 2009 4:34 PM
> To: rsyslog-users
> Subject: [rsyslog] what does error -2077 trying to add listener mean
>
> Hi,
>
> I've configured rsyslog to use relp as transport protocol.
> sw version: rsyslog-relp-3.21.3-4 and rsyslog-3.21.3-4.
>
> in the log I see these messages:
> 2009-03-16T16:12:10.769408+01:00 zeus-log01-2 rsyslogd: [origin
> software="rsyslogd" swVersion="3.21.3" x-pid="3239"
> x-info="http://www.rsyslog.com"] restart
> 2009-03-16T16:12:10.769447+01:00 zeus-log01-2 rsyslogd: error -2077
> trying to add listener
> 2009-03-16T16:12:10.769458+01:00 zeus-log01-2 rsyslogd: the last error
> occured in /data/etc/rsyslog/rsyslog.conf, line 6
> 2009-03-16T16:12:10.769470+01:00 zeus-log01-2 rsyslogd: the last error
> occured in /data/etc/rsyslog/rsyslog.conf, line 7
>
> The config line in question read:
>
> ------snip
> # Global
> $ModLoad imudp.so
> $ModLoad imtcp.so
> $ModLoad imrelp.so
> $UDPServerRun 514
> $InputTCPServerRun 514 <-- line 6
> $InputRELPServerRun 2514 <-- line 7
>
> $DirCreateMode 0755
>
> -------snap
>
> netstat -an| grep 514 shows all configured udp and tcp ports open.
>
> So where can I find a description of error -2077?
>
> Thanks in advance
>
> Thomas
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: what does error -2077 trying to add listener mean [ In reply to ]
Hi Rainer,

there is only one place where RS_RET_COULD_NOT_BIND is returned:

runtime/nsd_ptcp.c

numSocks = 0; /* num of sockets counter at start of array */
for(r = res; r != NULL ; r = r->ai_next) {
sock = socket(r->ai_family, r->ai_socktype, r->ai_protocol);

[ lots of magic ]

}

if(numSocks == 0) {
dbgprintf("No TCP listen sockets could successfully be
initialized");
ABORT_FINALIZE(RS_RET_COULD_NOT_BIND);
}

I have no idea why the OS reports the Sockets open and messages get
received, maybe there is a minor problem in the code, but somehow it
works...

Thomas
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com
Re: what does error -2077 trying to add listener mean [ In reply to ]
This sounds like some quirk with IPv6...

> -----Original Message-----
> From: rsyslog-bounces@lists.adiscon.com [mailto:rsyslog-
> bounces@lists.adiscon.com] On Behalf Of Thomas Mieslinger
> Sent: Monday, March 16, 2009 4:57 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] what does error -2077 trying to add listener
> mean
>
> Hi Rainer,
>
> there is only one place where RS_RET_COULD_NOT_BIND is returned:
>
> runtime/nsd_ptcp.c
>
> numSocks = 0; /* num of sockets counter at start of array */
> for(r = res; r != NULL ; r = r->ai_next) {
> sock = socket(r->ai_family, r->ai_socktype, r-
> >ai_protocol);
>
> [ lots of magic ]
>
> }
>
> if(numSocks == 0) {
> dbgprintf("No TCP listen sockets could successfully be
> initialized");
> ABORT_FINALIZE(RS_RET_COULD_NOT_BIND);
> }
>
> I have no idea why the OS reports the Sockets open and messages get
> received, maybe there is a minor problem in the code, but somehow it
> works...
>
> Thomas
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com