syslog-ng fails to start when using a remote loghost

Bug #533059 reported by Andrew Pollock
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
upstart
New
Undecided
Unassigned
syslog-ng (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: syslog-ng

If syslog-ng is configured to log to a remote syslog server, it fails to start, because of the divergence between the legacy init scripts and the Upstart jobs. The network isn't up when /etc/rc2.d/S10syslog-ng runs, so it can't resolve the remote syslog server and exits.

The solution would seem to be to add an Upstart job.

Tags: glucid
Revision history for this message
Andrew Pollock (apollock) wrote :

This is the upstart job that seems to solve the problem for me:

description "syslog-ng"
author "Andrew Pollock <email address hidden>"

start on (net-device-up IFACE!=lo)
stop on runlevel [!2345]

pre-start script
  if [ ! -e /dev/xconsole ]
  then
    mknod -m 640 /dev/xconsole p
  fi
end script

expect fork
respawn

exec /usr/sbin/syslog-ng

Revision history for this message
Tchesmeli (tchesmeli-serge) wrote :

Same trouble here. We have made an upstart script too:

# syslog-ng - regular background program processing daemon
#

description "Syslog-ng daemon"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]

expect fork
respawn

pre-start script
    test -x /usr/sbin/syslog-ng || { stop; exit 0; }
    mkdir -p -m0755 /var/run/syslog-ng
end script

exec /usr/sbin/syslog-ng -p /var/run/syslog-ng/syslog-ng.pid

Revision history for this message
stchesmeli (stchesmeli-ext) wrote :
Download full text (3.3 KiB)

More info:
it seems that upstart "think" the job is running, but not. syslog-ng doesn't started and send the error:

"Error resolving hostname; host='xxxxxxxxx'
No destination address set;"

(xxx the name of the remote loghost)

"initctl list" show syslog-ng job as started but without pid.

We have a complex network configuration whith VLAN and Direct routing (i have masqued the real public IP adress with XXX_MASQUED_IP_XXX on the lo:243 interface):

eth0 Link encap:Ethernet HWaddr 00:22:64:a2:89:72
          inet6 addr: fe80::222:64ff:fea2:8972/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:1820469 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1178910 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2360570249 (2.3 GB) TX bytes:115768332 (115.7 MB)
          Interrupt:16 Memory:fa000000-fa012800

eth1 Link encap:Ethernet HWaddr 00:22:64:a2:89:82
          inet addr:172.17.153.10 Bcast:172.17.153.63 Mask:255.255.255.192
          inet6 addr: fe80::222:64ff:fea2:8982/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:492 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2479 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31488 (31.4 KB) TX bytes:754743 (754.7 KB)
          Interrupt:16 Memory:f6000000-f6012800

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:4960 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4960 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:793400 (793.4 KB) TX bytes:793400 (793.4 KB)

lo:243 Link encap:Local Loopback
          inet addr:XXX_MASQUED_IP_XXX Mask:255.255.255.255
          UP LOOPBACK RUNNING MTU:16436 Metric:1

vlan200 Link encap:Ethernet HWaddr 00:22:64:a2:89:72
          inet addr:10.234.53.10 Bcast:10.234.53.63 Mask:255.255.255.192
          inet6 addr: fe80::222:64ff:fea2:8972/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:1820475 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1171695 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2320520333 (2.3 GB) TX bytes:103167895 (103.1 MB)

vlan201 Link encap:Ethernet HWaddr 00:22:64:a2:89:72
          inet addr:172.16.153.10 Bcast:172.16.153.63 Mask:255.255.255.192
          inet6 addr: fe80::222:64ff:fea2:8972/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)

We have access to resolver when vlan201 is UP. If i change the "start on" with:

start on (local-filesystems and net-device-up IFACE=vlan201)

job is started. But it's not a solution for us, we are...

Read more...

Revision history for this message
Alexandre BLANC (alexandre-inforeseau) wrote : Make it thicker and firmer

..All bail___Customer

*****************************************************

Customers of «Can ed adia xz nPha om rmacy» onl sbq ine dru gp gst rii ore appreciate the opportunity to save money, quality of pharmaceutical products and speed of delivery when you order with «Can nwv adia ts nPha zi rmacy».

«Can nn adia mx nPha bh rmacy» guar aib antees fast delivery in discreet packaging and confidentiality of your private information. Visit our site to find the product you need, and you will be surprised by our prices. Customer service staff will help you with the initial order.

*****************************************************

It's time to start saving! ... www.bifxpills.ru

*****************************************************

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.