[Bug 1614976] Re: "logger -n" does not work on ubuntu 14.04.4 LTS

Steve Langasek steve.langasek at canonical.com
Fri Aug 19 19:37:03 UTC 2016


Confirmed this locally.  strace shows:

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("192.168.15.71")}, 16) = 0
[...]
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 1
connect(1, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
sendto(1, "<38>Aug 19 19:31:26 logger: nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn", 69, MSG_NOSIGNAL, NULL, 0) = 69
close(1)                                = 0

So a socket is opened to the designated server, then is not used for
writing the log message.

However, you called this a "regression".  I see the same behavior with
the version of bsdutils in 14.04.0.  This doesn't appear to be a
regression in 14.04, it appears to be functionality that has been broken
for two years since 14.04 released and went unnoticed until now.  So I
disagree with the categorization of "high" and think this is not
something we will fix in SRU.

The bug in question is not present in 16.04 and later, therefore I'm
closing this bug as fix released.

** Changed in: util-linux (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1614976

Title:
  "logger -n" does not work on ubuntu 14.04.4 LTS

Status in util-linux package in Ubuntu:
  Fix Released

Bug description:
  == Comment: #0 - SONG YANG <yangsbj at cn.ibm.com> - 2016-07-26 01:45:14 ==
  ---Problem Description---
  "logger -n" does not work on ubuntu 14.04.4 LTS
   
  Contact Information = yangsbj at cn.ibm.com 
   
  ---uname output---
  Linux c910f03c17k13 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:31:44 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
   
  Machine Type = ppc64le kvm guest  
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   
  root at c910f03c17k13:~# cat /etc/os-release 
  NAME="Ubuntu"
  VERSION="14.04.4 LTS, Trusty Tahr"
  ID=ubuntu
  ID_LIKE=debian
  PRETTY_NAME="Ubuntu 14.04.4 LTS"
  VERSION_ID="14.04"
  HOME_URL="http://www.ubuntu.com/"
  SUPPORT_URL="http://help.ubuntu.com/"
  BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
  root at c910f03c17k13:~# uname -a
  Linux c910f03c17k13 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:31:44 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
  root at c910f03c17k13:~# service rsyslog status
  rsyslog start/running, process 2662
  root at c910f03c17k13:~# logger -n 10.3.17.12 "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"                  

  at the same time, the specified log server 10.3.17.12  received
  nothing:

  
  root at c910f03c17k12:~# ifconfig
  eth1      Link encap:Ethernet  HWaddr 42:94:0a:03:11:0c  
            inet addr:10.3.17.12  Bcast:10.255.255.255  Mask:255.0.0.0
            inet6 addr: fe80::4094:aff:fe03:110c/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:19229222 errors:0 dropped:13 overruns:0 frame:0
            TX packets:7993543 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:6070292795 (6.0 GB)  TX bytes:23352500478 (23.3 GB)

  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:65536  Metric:1
            RX packets:1565234 errors:0 dropped:0 overruns:0 frame:0
            TX packets:1565234 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:6510383999 (6.5 GB)  TX bytes:6510383999 (6.5 GB)

  virbr0    Link encap:Ethernet  HWaddr 86:61:a7:59:05:64  
            inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  root at c910f03c17k12:~# makeconservercf                                        
  root at c910f03c17k12:~# semanage port -l | grep 514
  cluster_port_t                 tcp      5149, 40040, 50006-50008
  cluster_port_t                 udp      5149, 50006-50008
  rsh_port_t                     tcp      514
  syslog_tls_port_t              tcp      6514
  syslog_tls_port_t              udp      6514
  syslogd_port_t                 udp      514
  virt_port_t                    tcp      16509, 16514
  virt_port_t                    udp      16509, 16514
  root at c910f03c17k12:~# ip add show
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host 
         valid_lft forever preferred_lft forever
  2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
      link/ether 42:6b:0a:03:11:0c brd ff:ff:ff:ff:ff:ff
  3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 42:94:0a:03:11:0c brd ff:ff:ff:ff:ff:ff
      inet 10.3.17.12/8 brd 10.255.255.255 scope global eth1
         valid_lft forever preferred_lft forever
      inet6 fe80::4094:aff:fe03:110c/64 scope link 
         valid_lft forever preferred_lft forever
  4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
      link/ether 86:61:a7:59:05:64 brd ff:ff:ff:ff:ff:ff
      inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
         valid_lft forever preferred_lft forever
  root at c910f03c17k12:~# tcpdump -A -i eth1 port 514
  NOTHING

  == Comment: #1 - SONG YANG <yangsbj at cn.ibm.com> - 2016-07-26 01:46:08 ==
  The logger version:
  ii  bsdutils                           1:2.20.1-5.1ubuntu20.7           ppc64el      Basic utilities from 4.4BSD-Lite

  ==

  I do see it works on 14.04.3 :

  root at ubuntu:~# logger -n 127.0.0.1 "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"

  root at ubuntu:~# cat /var/log/syslog
  Aug  2 06:25:02 ubuntu rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="498" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
  Aug  2 06:25:35 ubuntu logger: nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

  
  However, on 16.04, 

  root at Ubuntu-16:~# logger -n 127.0.0.1 "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
  root at Ubuntu-16:~# logger -n 10.0.2.15 "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
  root at Ubuntu-16:~# find /var/log/ -name \* -type f | xargs grep "nnnnnnnnnnnnnnnnnnnnn"
  root at Ubuntu-16:~# 

  Looks like this is a regression.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1614976/+subscriptions



More information about the foundations-bugs mailing list