[Bug 1209146] Re: anacron jobs run with wrong environment variables
latimerio
1209146 at bugs.launchpad.net
Tue Jul 15 06:28:37 UTC 2014
I administer >100 hosts with 12.04LTS and 14.04LTS and the problem with anacron not respecting proxy settings is very annoying.
I have set the proxy in /etc/apt/apt.d/95proxies in /etc/environment and with gsettings as recommended in http://askubuntu.com/questions/150210/how-do-i-set-systemwide-proxy-servers-in-xubuntu-lubuntu-or-ubuntu-studio but still anacron reports errors from e.g. update-notifier-common that it cannot update the flashplugin
/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.394.orig.tar.gz
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to anacron in Ubuntu.
https://bugs.launchpad.net/bugs/1209146
Title:
anacron jobs run with wrong environment variables
Status in “anacron” package in Ubuntu:
New
Bug description:
In Ubuntu 13.04 (anacron-2.3-19ubuntu2) is started from
/etc/cron.d/anacron like this
start -q anacron
This means anacron itself and its child processes would inherit
environment from init/upstart not from crond. As result all
environment variables defined in /etc/environment won't be set
(upstart does not use pam_env.so). In my case, this leads to debtags
job failed with network unreachable error, because my host is behind a
proxy and http_proxy variable is defined in /etc/environment.
The bug does not affect Debian with Init System V, because invoke-rc.d
would start rc script directly.
I suppose anacron should be either started directly from
/etc/cron.d/anacron or modified so it use pam to properly initialize
session for a job.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/anacron/+bug/1209146/+subscriptions
More information about the foundations-bugs
mailing list