Unit dbus-org.freedesktop.NetworkManager.service failed to

其他Linux/Unix/BSD/OSX等发行版讨论
回复
132811
帖子: 194
注册时间: 2010-04-20 21:19
系统: ArchLinux
来自: My gtalk:a132811@
联系:

Unit dbus-org.freedesktop.NetworkManager.service failed to

#1

帖子 132811 » 2012-11-04 19:23

新装的arch系统,遇到点错误:

代码: 全选

$ nm-connection-editor 

** (nm-connection-editor:1293): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.NetworkManager.service' for details.

[hilo@hilo ~]$
 systemctl status dbus-org.freedesktop.NetworkManager.service
dbus-org.freedesktop.NetworkManager.service
	  Loaded: error (Reason: No such file or directory)
	  Active: inactive (dead)
看来是没有启动networkmanager.service,看看系统是否提供了此服务(/usr/lib/systemd/下)networkmanager,(有可能你新更新后,找不到此服务,重启后再看看吧)

代码: 全选

$ systemctl list-units --all|grep -i Network
sys-devices-pci0000:00-0000:00:19.0-net-eth0.device                                       loaded active   plugged       82577LC Gigabit Network Connection
sys-subsystem-net-devices-eth0.device                                                     loaded active   plugged       82577LC Gigabit Network Connection
NetworkManager.service                                                                    loaded active   running       Network Manager
network.target                                                                            loaded active   active        Network
那就开启这项服务吧:

代码: 全选

[hilo@hilo ~]$ sudo systemctl enable NetworkManager.service
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
=====================================
问题来了:你会发现你的网络再也无法启动,不断提示你输入密码.
其实是,系统systemd默认启动了一项服务:net-auto-wireless.service(它会启动名为wpa_supplicant的进程,这个service与networkManger.service是冲突的)

代码: 全选

[hilo@hilo ~]$ ps aux|grep -i network
root       313  0.0  0.0 250268  6916 ?        Ssl  01:14   0:01 /usr/sbin/NetworkManager --no-daemon
root       346  0.1  0.0  32152  1572 ?        Ss   01:14   0:00 wpa_supplicant -B -P /run/wpa_supplicant_wlan0.pid -i wlan0 -D nl80211,wext -c/run/network/wpa.wlan0/wpa.conf -W
好吧,请关闭 net-auto-wireless.service

代码: 全选

[hilo@hilo ~]$ sudo  systemctl disable net-auto-wireless.service
[sudo] password for hilo: 
rm '/etc/systemd/system/multi-user.target.wants/net-auto-wireless.service'
=============
Note:
你可能已经注意到,这些自启动脚本都用systemctl(systemd)来管理了,而非以前的rc.conf中的DAEMONS.
--Refer to Systemd wiki
上次由 132811 在 2012-11-07 23:12,总共编辑 3 次。
http://hilojack.sinaapp.com
i3 M370(2.4G)/500G/8G/OpenGL:Gallium 0.4 on nvidia 3100M
alanfly
帖子: 334
注册时间: 2007-12-19 16:15

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#2

帖子 alanfly » 2012-11-04 19:39

有的。
附件
net.png
132811
帖子: 194
注册时间: 2010-04-20 21:19
系统: ArchLinux
来自: My gtalk:a132811@
联系:

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#3

帖子 132811 » 2012-11-04 20:42

:em20 今天什么情况,关机,回来再开机就有了.

代码: 全选

$ systemctl list-units --all|grep -i Network
sys-devices-pci0000:00-0000:00:19.0-net-eth0.device                                       loaded active   plugged       82577LC Gigabit Network Connection
sys-subsystem-net-devices-eth0.device                                                     loaded active   plugged       82577LC Gigabit Network Connection
NetworkManager.service                                                                    loaded active   running       Network Manager
network.target                                                                            loaded active   active        Network

代码: 全选

[hilo@hilo ~]$ sudo systemctl enable NetworkManager.service
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
ln -s '/usr/lib/systemd/system/NetworkManager.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
这个locate包在哪里呀?居然没有!

代码: 全选

pacman -Qo `which locate`
http://hilojack.sinaapp.com
i3 M370(2.4G)/500G/8G/OpenGL:Gallium 0.4 on nvidia 3100M
alanfly
帖子: 334
注册时间: 2007-12-19 16:15

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#4

帖子 alanfly » 2012-11-04 21:32

core/mlocate
132811
帖子: 194
注册时间: 2010-04-20 21:19
系统: ArchLinux
来自: My gtalk:a132811@
联系:

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#5

帖子 132811 » 2012-11-04 21:49

sudo systemctl enable NetworkManager.service 后就再也连不上wifi了! :em20 :em20

代码: 全选

[hilo@hilo ~]$ sudo wifi-menu
:: Scanning for networks                                               [ DONE ] 
              ┌────────────────────────────────────────────────┐
              │ Select the network you wish to use             │  
              │ Flags description:                             │  
              │  * - handmade profile present                  │  
              │  + - automatically generated profile present   │  
              │  - - no profile present                        │  
              │  ! - active connection present                 │  
              │ ┌────────────────────────────────────────────┐ │  
              │ │   sexy-1205                + wpa     -43   │ │  
              │ │   TP-LINK_2F5DBE           - wpa     -57   │ │  
              │ │   runrun                   - wpa     -61   │ │  
              │ │   D&R                      - wpa     -73   │ │  
              │ │   TP-LINK_PocketAP_2B45A6  - wpa     -75   │ │  
              │ │   lillian                  - wpa2    -79   │ │  
              │ │   kyukou                   - wpa     -79   │ │  
              │ │   TP-LINK_6DEBD8           - wpa     -86   │ │  
              │ │   RUCJD                    - wpa     -87   │ │  
              │ │                                            │ │  
              │ │                                            │ │  
              │ └────────────────────────────────────────────┘ │  
              ├────────────────────────────────────────────────┤  
              │           <  OK  >      <Cancel>               │  
              └────────────────────────────────────────────────┘  
                
:: wlan0-sexy-1205 up                                                  [ BUSY ] 
ctrl_iface exists and seems to be in use - cannot override it
Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

 > wpa_supplicant did not start, possible configuration error
                                                                       [FAILED]
[hilo@hilo ~]$ sudo rm /run/wpa_supplicant/wlan0
rm: cannot remove ‘/run/wpa_supplicant/wlan0’: No such file or directory
[hilo@hilo ~]$ sudo wifi-menu
:: Scanning for networks                                               [ DONE ] 
              ┌────────────────────────────────────────────────┐
              │ Select the network you wish to use             │  
              │ Flags description:                             │  
              │  * - handmade profile present                  │  
              │  + - automatically generated profile present   │  
              │  - - no profile present                        │  
              │  ! - active connection present                 │  
              │ ┌────────────────────────────────────────────┐ │  
              │ │   sexy-1205                + wpa     -44   │ │  
              │ │   TP-LINK_2F5DBE           - wpa     -58   │ │  
              │ │   runrun                   - wpa     -61   │ │  
              │ │   D&R                      - wpa     -72   │ │  
              │ │   TP-LINK_PocketAP_2B45A6  - wpa     -74   │ │  
              │ │   kyukou                   - wpa     -75   │ │  
              │ │   lillian                  - wpa2    -77   │ │  
              │ │                                            │ │  
              │ │                                            │ │  
              │ │                                            │ │  
              │ │                                            │ │  
              │ └────────────────────────────────────────────┘ │  
              ├────────────────────────────────────────────────┤  
              │           <  OK  >      <Cancel>               │  
              └────────────────────────────────────────────────┘  
                
:: wlan0-sexy-1205 up                                                  [ BUSY ] 
 > WPA Authentication/Association Failed
                                                                       [FAILED]
http://hilojack.sinaapp.com
i3 M370(2.4G)/500G/8G/OpenGL:Gallium 0.4 on nvidia 3100M
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#6

帖子 cuihao » 2012-11-04 21:52

NetworkManager 和Arch那个简陋的 network 服务本来就是完成同一工作,只能二选一嘛。
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#7

帖子 cuihao » 2012-11-04 21:54

另 pacman -Q 系列是查本地数据库,没办法查没安装的软件包。
要查询未安装的,请安装 pkgfile

代码: 全选

sudo pacman -S pkgfile
sudo pkgfile -u

代码: 全选

cuihao@cuihao-arch ~ $ pkgfile locate
core/mlocate
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
132811
帖子: 194
注册时间: 2010-04-20 21:19
系统: ArchLinux
来自: My gtalk:a132811@
联系:

Re: Unit dbus-org.freedesktop.NetworkManager.service failed

#8

帖子 132811 » 2012-11-04 22:46

多谢楼上各位,问题已经解决,答案见一楼.
http://hilojack.sinaapp.com
i3 M370(2.4G)/500G/8G/OpenGL:Gallium 0.4 on nvidia 3100M
回复