syslog-ng:Cannot assign requested address

error:
linux-hzti:/etc/syslog-ng # service syslog restart
Shutting down syslog services done
Re-Starting syslog servicesWarning: Unknown facility message
io.c: bind_inet_socket() bind failed 192.168.0.1:514 Cannot assign requested address
Error initializing configuration, exiting.
startproc: exit status of parent of /sbin/syslog-ng: 1
failed

syslog-ng configuration:

/etc/syslog-ng/syslog-ng.conf: syslog configuration

options {
use_dns(yes);
dns_cache(yes);
use_fqdn(no);
stats(3600);
chain_hostnames(no);
time_reopen(10);
};

source s_local {
internal();
unix-stream("/dev/log" max-connections(100));
file("/proc/kmsg" log_prefix("kernel: "));
};

source s_external {
udp(ip(192.168.0.1));
};

filter f_kernel {
facility(kern);
};

filter f_auth {
facility(auth, authpriv);
};

destination d_kernel {
file("/var/log/$HOST/kernel" create_dirs(yes));
};

destination d_auth {
file("/var/log/$HOST/auth" create_dirs(yes));
};

destination d_messages {
file("/var/log/$HOST/messages" create_dirs(yes));
};

destination d_external {
udp(“192.168.0.2”);
};

log {
source(s_local);
destination(d_external);
};

log {
source(s_local);
source(s_external);
filter(f_kernel);
destination(d_kernel);
};

log {
source(s_local);
source(s_external);
filter(f_auth);
destination(d_auth);
};

SC-1

filter f_SC-1_messages {
host(^SC-1$) and not facility(auth, authpriv) and not match(“RPM_Install”) and not match(“RPM_Uninstall”);
};

log {
source(s_local);
source(s_external);
filter(f_SC-1_messages);
destination(d_messages);
};

SC-2

filter f_SC-2_messages {
host(^SC-2$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_SC-2_messages);
destination(d_messages);
};

PL-3

filter f_PL-3_messages {
host(^PL-3$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-3_messages);
destination(d_messages);
};

PL-4

filter f_PL-4_messages {
host(^PL-4$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-4_messages);
destination(d_messages);
};

PL-5

filter f_PL-5_messages {
host(^PL-5$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-5_messages);
destination(d_messages);
};

PL-6

filter f_PL-6_messages {
host(^PL-6$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-6_messages);
destination(d_messages);
};

#Added by MA Installation
destination d_rpminstallation {
file("/home/dveinstaller/logs/SC-1-install-rpm.log" create_dirs(yes));
};
destination d_rpmuninstallation {
file("/home/dveinstaller/logs/SC-1-uninstall-rpm.log" create_dirs(yes));
};

filter f_rpminstallation {
match(“RPM_Install”);
};
filter f_rpmuninstallation {
match(“RPM_Uninstall”);
};
log {
source(s_local);
filter(f_rpminstallation);
destination(d_rpminstallation);
};

log {
source(s_local);
filter(f_rpmuninstallation);
destination(d_rpmuninstallation);
};
destination d_cron {
file("/var/log/SC-1/cron" create_dirs(yes));
};

filter f_cron_SC-1 {
host(SC-1) and facility(cron);
};

log {
source(s_local);
filter(f_cron_SC-1);
destination(d_cron);
};

filter f_auth_1 { level(info) and facility(auth); };
destination d_auth_1 { udp(“10.213.47.24” port(514));};
log { source(src); filter(f_auth_1); destination(d_auth_1);};
filter f_messages { level(err) and facility(message); };
destination d_message { file("/var/log/msglog" ); };
log { source(src); filter(f_messages); destination(d_message); };

End of file

wo1769815 Wrote in message:
[color=blue]

error:
linux-hzti:/etc/syslog-ng # service syslog restart
Shutting down syslog services
done
Re-Starting syslog servicesWarning: Unknown facility message
io.c: bind_inet_socket() bind failed 192.168.0.1:514 Cannot assign
requested address
Error initializing configuration, exiting.
startproc: exit status of parent of /sbin/syslog-ng: 1

failed

syslog-ng configuration:

/etc/syslog-ng/syslog-ng.conf: syslog configuration

options {
use_dns(yes);
dns_cache(yes);
use_fqdn(no);
stats(3600);
chain_hostnames(no);
time_reopen(10);
};

source s_local {
internal();
unix-stream(“/dev/log” max-connections(100));
file(“/proc/kmsg” log_prefix("kernel: "));
};

source s_external {
udp(ip(192.168.0.1));
};

filter f_kernel {
facility(kern);
};

filter f_auth {
facility(auth, authpriv);
};

destination d_kernel {
file(“/var/log/$HOST/kernel” create_dirs(yes));
};

destination d_auth {
file(“/var/log/$HOST/auth” create_dirs(yes));
};

destination d_messages {
file(“/var/log/$HOST/messages” create_dirs(yes));
};

destination d_external {
udp(“192.168.0.2”);
};

log {
source(s_local);
destination(d_external);
};

log {
source(s_local);
source(s_external);
filter(f_kernel);
destination(d_kernel);
};

log {
source(s_local);
source(s_external);
filter(f_auth);
destination(d_auth);
};

SC-1

filter f_SC-1_messages {
host(^SC-1$) and not facility(auth, authpriv) and not
match(“RPM_Install”) and not match(“RPM_Uninstall”);
};

log {
source(s_local);
source(s_external);
filter(f_SC-1_messages);
destination(d_messages);
};

SC-2

filter f_SC-2_messages {
host(^SC-2$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_SC-2_messages);
destination(d_messages);
};

PL-3

filter f_PL-3_messages {
host(^PL-3$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-3_messages);
destination(d_messages);
};

PL-4

filter f_PL-4_messages {
host(^PL-4$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-4_messages);
destination(d_messages);
};

PL-5

filter f_PL-5_messages {
host(^PL-5$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-5_messages);
destination(d_messages);
};

PL-6

filter f_PL-6_messages {
host(^PL-6$) and not facility(auth, authpriv);
};

log {
source(s_local);
source(s_external);
filter(f_PL-6_messages);
destination(d_messages);
};

#Added by MA Installation
destination d_rpminstallation {
file(“/home/dveinstaller/logs/SC-1-install-rpm.log”
create_dirs(yes));
};
destination d_rpmuninstallation {
file(“/home/dveinstaller/logs/SC-1-uninstall-rpm.log”
create_dirs(yes));
};

filter f_rpminstallation {
match(“RPM_Install”);
};
filter f_rpmuninstallation {
match(“RPM_Uninstall”);
};
log {
source(s_local);
filter(f_rpminstallation);
destination(d_rpminstallation);
};

log {
source(s_local);
filter(f_rpmuninstallation);
destination(d_rpmuninstallation);
};
destination d_cron {
file(“/var/log/SC-1/cron” create_dirs(yes));
};

filter f_cron_SC-1 {
host(SC-1) and facility(cron);
};

log {
source(s_local);
filter(f_cron_SC-1);
destination(d_cron);
};

filter f_auth_1 { level(info) and facility(auth); };
destination d_auth_1 { udp(“10.213.47.24” port(514));};
log { source(src); filter(f_auth_1); destination(d_auth_1);};
filter f_messages { level(err) and facility(message); };
destination d_message { file(“/var/log/msglog” ); };
log { source(src); filter(f_messages); destination(d_message); };

End of file[/color]

Which version of SLES (SUSE Linux Enterprise Server) is this? Or
are you perhaps using openSUSE?

What was changed between Syslog-NG being restarted?

HTH.

Simon
SUSE Knowledge Partner

----Android NewsGroup Reader----
http://www.piaohong.tk/newsgroup

This is a reformed SLES.I’ve got the reason.Thanks!

On 24/02/2014 01:04, wo1769815 wrote:
[color=blue]

This is a reformed SLES.[/color]

Now why do I have visions of a server that’s gone through rehab … ? :wink:
[color=blue]

I’ve got the reason.Thanks![/color]

Which was? Perhaps the reason and/or solution will help others.

Thanks.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

Hi wo1769815,

my guess is that your syslog-ng daemon is running on a machine that has no 192.168.0.1 interface but only has interfaces with IPs in 10.0.0.0/8 - right? Then that “source s_external” statement would be causing the error message you quoted… and the solution would have been to adjust that statement to reflect the IP address of the (syslog-ng daemon machine’s) interface where the remote syslog messages are received.

Regards,
Jens