[syslog-ng] connecting to mongodb

Gergely Nagy algernon at balabit.hu
Thu Feb 3 10:13:43 CET 2011


On Thu, 2011-02-03 at 09:38 +0100, Peter Czanik wrote:
> On 02/02/2011 03:45 PM, Peter Czanik wrote:
> > Hello,
> >
> > When I try to use mongodb, I receive the following error message:
> >
> > Feb  2 15:33:54 linux-8k4b syslog-ng[9403]: syslog-ng starting up;
> > version='3.3.0alpha0'
> > Feb  2 15:33:54 linux-8k4b syslog-ng[9403]: Error connecting to MongoDB;
> > Feb  2 15:33:54 linux-8k4b syslog-ng[9403]: Error connecting to MongoDB;
> > Feb  2 15:33:54 linux-8k4b syslog-ng[9403]: Network error while
> > inserting into MongoDB; time_reopen='60'
> >   
> Workaround: when I use IP address (127.0.0.1) instead of hostname
> (localhost) in the config, it works.

D'oh. I should've spotted that: the mongodb driver is using inet_addr(),
and that only accepts IPv4 dot notation.

I'll fix that once I get there, so it will accept host names, IPv4 and
IPv6 addresses alike.

Thanks for spotting this!

-- 
|8]




More information about the syslog-ng mailing list