Wednesday, October 26, 2011

Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Problem:
X windows does not start on runlevel 5.

In RedHat RHEL 6.1, you get this message in system log (in /var/log/messages, by default):
Oct 26 15:41:15 testserver1 kernel: readahead-collector: sorting
Oct 26 15:41:15 testserver1 kernel: readahead-collector: finished
Oct 26 15:54:05 testserver1 abrtd: Error requesting DBus name com.redhat.abrt, possible reasons: abrt run by non-root; dbus config is incorrect; or dbus daemon needs to be restarted to reload dbus config
Oct 26 15:54:06 testserver1 init: start-ttys main process (4086) terminated with status 1
Oct 26 15:55:20 testserver1 ck-xinit-session: error connecting to console-kit
Oct 26 15:55:21 testserver1 gnome-session[4164]: devkit-power-gobject-WARNING: Couldn't connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Oct 26 15:55:21 testserver1 gnome-session[4164]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Oct 26 15:55:21 testserver1 gnome-session[4164]: WARNING: Could not connect to ConsoleKit: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Oct 26 15:55:22 testserver1 kernel: fuse init (API version 7.13)
Oct 26 15:55:22 testserver1 pulseaudio[4213]: core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Oct 26 15:55:22 testserver1 pulseaudio[4213]: core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory


Solution:
Check if messagebus service is turned on:
chkconfig --list messagebus

If messagebus is turned off, turn it on:
chkconfig messagebus on

Now it should look something like this:
chkconfig --list messagebus
messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Then just reboot your server:
shutdown -r now


Reference:
http://fixunix.com/mandriva/397862-dbus-error.html

Tuesday, October 18, 2011

Warning: RPMDB altered outside of yum

Problem:
On RedHat you get this message:
Warning: RPMDB altered outside of yum.


Example:
[root@test ~]# yum install screen
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package screen.x86_64 0:4.0.3-16.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
screen x86_64 4.0.3-16.el6 rhel-x86_64-server-6 494 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 494 k
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : screen-4.0.3-16.el6.x86_64 1/1
duration: 182(ms)
Installed products updated.

Installed:
screen.x86_64 0:4.0.3-16.el6

Complete!


Solution:
Run "yum clean all"