Useless nm_dbus_manager_init_bus error messages fill log

1

1

My system runs fine, but /var/log/messages repeats this message every few seconds, filling up my log directory:

Oct 13 09:10:57 barry NetworkManager: <WARN> 
nm_dbus_manager_init_bus(): Could not get the system bus.  Make sure 
the message bus daemon is running!  Message: Failed to connect to 
socket /var/run/dbus/system_bus_socket: Connection refused 

Is there an easy way to stop this? I'm on Fedora 11, but am hoping this is a fairly generic fix. Thoughts:

  • I could turn off rsyslog entirely, but that's overkill.

  • I could tweak /etc/rsyslog.conf to not print this message, but how do I do that w/o turning off other important messages?

  • I realize I could start the bus daemon, but I'm not sure what it does for me, if anything.

EDIT: Thanks, haimg. I tried your suggestion, and this happened:

# service messagebus start
Starting system message bus: Failed to start message bus: The pid file "/var/run/messagebus.pid" exists, if the message bus is not running, remove this file
                                                           [FAILED]
# pgrep bus | xargs ps -wwwl
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY        TIME CMD
1 S   500  3568     1  0  80   0 -   831 poll_s pts/7      0:00 dbus-launch --autolaunch 443adbc9baaf7a04103739c04abbc618 --binary-syntax --close-stderr
1 S   500  3569     1  0  80   0 -   697 poll_s ?          0:00 /bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session

so there might be some more serious badness occurring here.

barrycarter

Posted 2011-10-13T15:37:38.370

Reputation: 695

Answers

2

Option 1: Make rsyslog ignore this message

Just shut off this specific message. Add this to the top of your rsyslog.conf

:msg, startswith, "NetworkManager: <WARN> nm_dbus_manager_init_bus(): Could not get the system bus"       ~

Note the tilde (~) at the end of the line. Copy & paste the beginning of the message you want to ignore, and be as selective as you want. Any message that starts with this prefix will be ignored.

Option 2: Fix the underlying issue

As far as I know, NetworkManager needs D-Bus for proper operation. D-Bus (Desktop Bus) is a simple inter-process communication system for software applications to communicate with one another. So, if you need/use NetworkManager, maybe just start the D-Bus daemon:

chkconfig messagebus on ; service messagebus start

D-Bus is also used by other desktop components, and it is rather lighweight and inobtrusive. I suggest you just start it.

If you don't need the NetworkManager at all, you can just stop and disable it:

chkconfig NetworkManager off ; service NetworkManager stop

haimg

Posted 2011-10-13T15:37:38.370

Reputation: 19 503

Thanks! OK, what does dbus do for me? My network and everything else appears to be working fine without it? I definitely need NetworkManager (I lose my DHCP IP if I stop that), but I'm not experiencing any issues despite the error message. – barrycarter – 2011-10-13T15:53:43.320

Added an explanation to my answer. – haimg – 2011-10-13T16:00:39.057

OK, shutting off the message as you suggested above worked, so "problem solved" :) – barrycarter – 2011-10-13T16:03:20.997