After rebuilding a machine with a fresh install of 13.10 Server, I see the following errors when trying to run wicd-curses
:
$ wicd-curses
Can't connect to the daemon, trying to start it automatically...
Traceback (most recent call last):
File "/usr/share/wicd/curses/wicd-curses.py", line 1043, in <module>
setup_dbus()
File "/usr/share/wicd/curses/wicd-curses.py", line 1031, in setup_dbus
dbus_ifaces = dbusmanager.get_dbus_ifaces()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 36, in get_dbus_ifaces
return DBUS_MANAGER.get_dbus_ifaces()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 62, in get_dbus_ifaces
if not self._dbus_ifaces: connect_to_dbus()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 48, in connect_to_dbus
return DBUS_MANAGER.connect_to_dbus()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 79, in connect_to_dbus
proxy_obj = self._bus.get_object("org.wicd.daemon", '/org/wicd/daemon')
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.wicd.daemon was not provided by any .service files
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 96, in apport_excepthook
dbus_service_unknown_analysis(exc_obj, pr)
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 172, in dbus_service_unknown_analysis
cp = ConfigParser(interpolation=None)
TypeError: __init__() got an unexpected keyword argument 'interpolation'
Original exception was:
Traceback (most recent call last):
File "/usr/share/wicd/curses/wicd-curses.py", line 1043, in <module>
setup_dbus()
File "/usr/share/wicd/curses/wicd-curses.py", line 1031, in setup_dbus
dbus_ifaces = dbusmanager.get_dbus_ifaces()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 36, in get_dbus_ifaces
return DBUS_MANAGER.get_dbus_ifaces()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 62, in get_dbus_ifaces
if not self._dbus_ifaces: connect_to_dbus()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 48, in connect_to_dbus
return DBUS_MANAGER.connect_to_dbus()
File "/usr/lib/python2.7/dist-packages/wicd/dbusmanager.py", line 79, in connect_to_dbus
proxy_obj = self._bus.get_object("org.wicd.daemon", '/org/wicd/daemon')
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.wicd.daemon was not provided by any .service files
It seems that wicd
is not running. pgrep wicd
returns no results.
Attempting to start it fails:
$ sudo /etc/init.d/wicd start
* Starting Network connection manager wicd [fail]
If I attempt to run wicd
directly, I see:
$ sudo wicd
Traceback (most recent call last):
File "/usr/share/wicd/daemon/wicd-daemon.py", line 1859, in <module>
main(sys.argv)
File "/usr/share/wicd/daemon/wicd-daemon.py", line 1708, in main
os.symlink(dest, backup_location)
OSError: [Errno 17] File exists
Running wicd -foe
gives the same output.
Exact package versions are:
python-wicd 1.7.2.4-4.1
wicd-curses 1.7.2.4-4.1
wicd-daemon 1.7.2.4-4.1
The /var/log/wicd/
directory is empty.
I tried reinstalling:
sudo apt-get remove wicd-curses
sudo apt-get autoremove
sudo rm -rf /etc/wicd
sudo rm -rf /var/log/wicd
sudo reboot now
sudo apt-get install wicd-curses
However this didn't help. During the installation:
Get:1 http://gb.archive.ubuntu.com/ubuntu/ saucy/main python-gobject all 3.10.0-1ubuntu1 [2,476 B]
Get:2 http://gb.archive.ubuntu.com/ubuntu/ saucy/universe python-wicd all 1.7.2.4-4.1 [39.3 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu/ saucy/universe wicd-daemon all 1.7.2.4-4.1 [217 kB]
Get:4 http://gb.archive.ubuntu.com/ubuntu/ saucy/universe python-urwid i386 1.1.1-1 [662 kB]
Get:5 http://gb.archive.ubuntu.com/ubuntu/ saucy/main rfkill i386 0.4-2ubuntu1 [9,160 B]
Get:6 http://gb.archive.ubuntu.com/ubuntu/ saucy/universe wicd-curses all 1.7.2.4-4.1 [35.0 kB]
Fetched 964 kB in 0s (1,234 kB/s)
Preconfiguring packages ...
Selecting previously unselected package python-gobject.
(Reading database ... 60265 files and directories currently installed.)
Unpacking python-gobject (from .../python-gobject_3.10.0-1ubuntu1_all.deb) ...
Selecting previously unselected package python-wicd.
Unpacking python-wicd (from .../python-wicd_1.7.2.4-4.1_all.deb) ...
Selecting previously unselected package wicd-daemon.
Unpacking wicd-daemon (from .../wicd-daemon_1.7.2.4-4.1_all.deb) ...
Selecting previously unselected package python-urwid.
Unpacking python-urwid (from .../python-urwid_1.1.1-1_i386.deb) ...
Selecting previously unselected package rfkill.
Unpacking rfkill (from .../rfkill_0.4-2ubuntu1_i386.deb) ...
Selecting previously unselected package wicd-curses.
Unpacking wicd-curses (from .../wicd-curses_1.7.2.4-4.1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up python-gobject (3.10.0-1ubuntu1) ...
Setting up python-wicd (1.7.2.4-4.1) ...
Setting up wicd-daemon (1.7.2.4-4.1) ...
* Restarting Network connection manager wicd [fail]
Setting up python-urwid (1.1.1-1) ...
Setting up rfkill (0.4-2ubuntu1) ...
Setting up wicd-curses (1.7.2.4-4.1) ...
After this the failure is the behaviour is identical to that shown above.
Digging into the Python code a little shows where the problem is occurring. From line 1708 in /usr/share/wicd/daemon/wicd-daemon.py
:
# back up resolv.conf before we do anything else
try:
backup_location = wpath.varlib + 'resolv.conf.orig'
# don't back up if .orig exists, probably there cause
# wicd exploded
if not os.path.exists(backup_location):
if os.path.islink('/etc/resolv.conf'):
dest = os.readlink('/etc/resolv.conf')
os.symlink(dest, backup_location) <--- LINE 1708
else:
shutil.copy2('/etc/resolv.conf', backup_location)
os.chmod(backup_location, 0644)
except IOError:
print 'error backing up resolv.conf'
Debugging this code shows
dest = ../run/resolvconf/resolv.conf
backup_location = /var/lib/wicd/resolv.conf.orig
I attempted changing the except
block to catch both OSError
and IOError
. I now see the error message error backing up resolv.conf
, however the daemon doesn't seem to start properly.
$ sudo wicd
error backing up resolv.conf
$ echo $?
0
$ ps -ef | grep "wi[c]d"
It seems that the .pid
file was created and not deleted. Attempting to run wicd
another time gives:
$ sudo wicd
error backing up resolv.conf
It seems like the daemon is already running.
If it is not, please remove /var/run/wicd/wicd.pid and try again.
It is not running. ps
shows that, and wicd-curses
gives the same error as above.
I finally got this working.
It seems there's a known issue with
wicd
on recent Ubuntu versions related to symlinks to relative paths.Check the status of the link:
If it shows as invalid, remove it:
Then:
I then removed the
pid
file:In all my messing about I'd lost the
/etc/wicd/dhclient.conf.template.default
file, so copied that from another computer.I also changed the
/etc/wicd/manager-settings.conf
file, changingdebug_mode = False
todebug_mode = 0
as I'd read somewhere that this was required.Try starting it again as root:
Finally I was able to run
wicd-curses
after this.