[syslog-ng]error "Cannot assign requested address"

Matthew Bassili syslog-ng@lists.balabit.hu
Fri, 28 Nov 2003 08:53:32 +1100


List members,

I am trying to setup syslog-ng (Red Hat9, syslog build 1.6.0rc4) with the
following syslog-ng.conf file:

###############################################################
# First, set some global options
#
options {
	keep_hostname(yes);
	long_hostnames(off); 
	sync(0); 
    	log_fifo_size(1024);
    	log_msg_size(8192);
    };
###############################################################
#
#
source local
  { unix-dgram("/dev/log"); internal(); pipe("/proc/kmsg"
log_prefix("kernel: "));
  };

#source nocpix
#  { udp(ip("172.31.30.2") port(514)); 
#  };
source nocpix-out
  { udp(ip("147.76.127.44") port(514)); 
  };

#source mb2-pix
#  { udp(ip("172.18.1.6") port(514));  
#  };

source other
  { udp();  
  };
#
#
###############################################################
#
#
destination local         {
file("/var/log/syslog-ng/local/local.$YEAR.$MONTH.$DAY"); };
destination other         {
file("/var/log/syslog-ng/other/other.$YEAR.$MONTH.$DAY"); };
destination nocpix         {
file("/var/log/syslog-ng/nocpix/nocpix.$YEAR.$MONTH.$DAY"); };
#destination mb2            {
file("/var/log/syslog-ng/mb2/mb2.$YEAR.$MONTH.$DAY");  };
#
#
###############################################################
#
#
filter      f_auth         { facility(auth, authpriv); };
filter      f_authpriv     { facility(authpriv); }; 
filter      f_cron         { facility(cron); };
filter      f_daemon       { facility(daemon); };
filter      f_kern         { facility(kern); };
filter      f_local1       { facility(local1); };
filter      f_local2       { facility(local2); };
filter      f_local3       { facility(local3); };
filter      f_local4       { facility(local4); };
filter      f_local5       { facility(local5); };
filter      f_local6       { facility(local6); };
filter      f_local7       { facility(local7); };
filter      f_lpr          { facility(lpr); };
filter      f_mail         { facility(mail); };
filter      f_messages     { facility(daemon, kern, user); };
filter      f_news         { facility(news); };
filter      f_spooler      { facility(uucp,news) and level(crit); };
filter      f_syslog       { not facility(auth, authpriv) and not
facility(mail); };
filter      f_user         { facility(user); };
#
#
###############################################################
#
#
log { source(local); destination(local);};
#log { source(nocpix); destination(nocpix);};
log { source(nocpix-out); destination(nocpix);};
#log { source(mb2-pix); destination(mb2);};
log { source(other); destination(other);};

& I get the following error message on startup:
"Starting syslog-ng: io.c: bind_inet_socket() bind failed 147.76.127.44:514
Cannot assign requested address"

When I comment out the line " source nocpix-out { udp(ip("147.76.127.44")
port(514)); };"
Everything works fine using udp();, but I really want to separate the
sources so I can direct the log files to a different directory.

Any help would be GREATLY appreciated.

Matthew Bassili
Senior Network Engineer
NEC Business Solutions P/L
649 Springvale Rd
Mulgarve, 3170
AUSTRALIA
e-mail: matthew.bassili@nec.com.au