# syslog-ng:Cannot assign requested address

**URL:** <https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170>\
**Category:** SLES Configure-Administer\
**Created:** [February 23, 2014, 4:50pm UTC](https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170 "2014-02-23T16:50:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo1769815](https://avatars.discourse-cdn.com/v4/letter/w/e56c9b/32.png) [@wo1769815](https://forums.suse.com/u/wo1769815)\
**Post date:** [February 23, 2014, 4:50pm UTC](https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170/1 "2014-02-23T16:50:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [February 24, 2014, 12:01am UTC](https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170/2 "2014-02-24T00:01:40Z")

</div>

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](http://www.piaohong.tk/newsgroup)

---

<div class="post-metadata">

**Author:** ![wo1769815](https://avatars.discourse-cdn.com/v4/letter/w/e56c9b/32.png) [@wo1769815](https://forums.suse.com/u/wo1769815)\
**Post date:** [February 24, 2014, 2:55am UTC](https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170/3 "2014-02-24T02:55:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [February 24, 2014, 12:26pm UTC](https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170/4 "2014-02-24T12:26:32Z")

</div>

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 … ? 😉  
[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.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 24, 2014, 2:33pm UTC](https://forums.suse.com/t/syslog-ng-cannot-assign-requested-address/25170/5 "2014-02-24T14:33:30Z")

</div>

Hi wo1769815,

> [@wo1769815;19495](#):
>
> This is a reformed SLES.I’ve got the reason.Thanks!

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
