Após a reconstrução de uma máquina com uma nova instalação do 13.10 Server, vejo os seguintes erros ao tentar executar 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
Parece que wicd
não está em execução. pgrep wicd
não retorna resultados.
A tentativa de iniciá-lo falha:
$ sudo /etc/init.d/wicd start
* Starting Network connection manager wicd [fail]
Se eu tentar executar wicd
diretamente, vejo:
$ 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
A execução de wicd -foe
fornece o mesmo resultado.
Versões exatas do pacote são:
python-wicd 1.7.2.4-4.1
wicd-curses 1.7.2.4-4.1
wicd-daemon 1.7.2.4-4.1
O diretório /var/log/wicd/
está vazio.
Eu tentei reinstalar:
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
No entanto, isso não ajudou. Durante a instalação:
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) ...
Depois disso, a falha é que o comportamento é idêntico ao mostrado acima.
Pesquisando no código Python, um pouco mostra onde o problema está ocorrendo. Da linha 1708 em /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'
A depuração deste código mostra
dest = ../run/resolvconf/resolv.conf
backup_location = /var/lib/wicd/resolv.conf.orig
Eu tentei alterar o bloco except
para capturar os dois OSError
e IOError
. Agora vejo a mensagem de erro error backing up resolv.conf
, mas o daemon parece não iniciar corretamente.
$ sudo wicd
error backing up resolv.conf
$ echo $?
0
$ ps -ef | grep "wi[c]d"
Parece que o arquivo .pid
foi criado e não foi excluído. A tentativa de executar wicd
outra vez dá:
$ 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.
Não está em execução. ps
mostra isso e wicd-curses
apresenta o mesmo erro acima.