[Bug 1317920] Re: update-notifier does not user configured system proxy when downloading files with package-data-downloader

Kari Hurtta hurtta+launchpad.net at siilo.fmi.fi
Wed Jul 9 14:20:04 UTC 2014


> The cronjob is run from cron; cron is configured via /etc/pam.d/cron to use pam_env.so by default, which reads
 > /etc/environment. Why is this not working on your system?

Same happens also Ubuntu 12.04.4 LTS

Note that this is NOT cron !!!

Date: Tue, 8 Jul 2014 07:48:29 +0300
From: Anacron <root at ......fi>
To: root at .......fi

/etc/cron.daily/update-notifier-common:
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 234, in process_download_requests
    dest_file = urllib.urlretrieve(files[i])[0]
  File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 239, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
IOError: [Errno socket error] [Errno 101] Network is unreachable
flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.378.orig.tar.gz


See /etc/crontab -- cron does not run these when /usr/sbin/anacron is installed:

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

/ Kari Hurtta

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

Title:
  update-notifier does not user configured system proxy when downloading
  files with package-data-downloader

Status in “update-notifier” package in Ubuntu:
  Incomplete

Bug description:
  The script /etc/cron.daily/update-notifier-common fails trying to
  download extra files with package-data-downloader when called by cron.

  /etc/cron.daily/update-notifier-common:
  Traceback (most recent call last):
    File "/usr/lib/update-notifier/package-data-downloader", line 239, in process_download_requests
      dest_file = urllib.urlretrieve(files[i])[0]
    File "/usr/lib/python2.7/urllib.py", line 94, in urlretrieve
      return _urlopener.retrieve(url, filename, reporthook, data)
    File "/usr/lib/python2.7/urllib.py", line 240, in retrieve
      fp = self.open(url, data)
    File "/usr/lib/python2.7/urllib.py", line 208, in open
      return getattr(self, name)(url)
    File "/usr/lib/python2.7/urllib.py", line 345, in open_http
      h.endheaders(data)
    File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
      self._send_output(message_body)
    File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
      self.send(msg)
    File "/usr/lib/python2.7/httplib.py", line 791, in send
      self.connect()
    File "/usr/lib/python2.7/httplib.py", line 772, in connect
      self.timeout, self.source_address)
    File "/usr/lib/python2.7/socket.py", line 571, in create_connection
      raise err
  IOError: [Errno socket error] [Errno 101] Network is unreachable
  flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.356.orig.tar.gz

  Update-notifier-common works wenn called from the terminal. The system
  proxy is correctly set in /etc/environment and /etc/apt/apt.conf. The
  problem is fixed by adding the following 2 lines at the start of
  /etc/cron.daily/update-notifier-common:

  . /etc/environment
  export http_proxy

  Peter

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: update-notifier 0.154.1
  ProcVersionSignature: Ubuntu 3.13.0-24.47-generic 3.13.9
  Uname: Linux 3.13.0-24-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri May  9 15:37:41 2014
  InstallationDate: Installed on 2014-04-29 (9 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=de_DE.UTF-8
   SHELL=/bin/bash
  SourcePackage: update-notifier
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1317920/+subscriptions



More information about the foundations-bugs mailing list