D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open “/var/lib/dbus/machine-id”

A simple fix for once. I usually see this problem when I’ve installed a barebones / headless system and then wanted to add xorg to it later.

This particular time, this error cropped up when trying to run Eclipse Memory Analyzer over a X11 Forwarding session using SSH. Eclipse would throw this error and fail to start.

process 3104: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace
JVMDUMP006I Processing dump event "abort", detail "" - please wait.
JVMDUMP032I JVM requested System dump using '/root/mem/mat/core.20111216.145922.3104.0001.dmp' in response to an event
JVMDUMP010I System dump written to /root/mem/mat/core.20111216.145922.3104.0001.dmp
JVMDUMP032I JVM requested Java dump using '/root/mem/mat/javacore.20111216.145922.3104.0002.txt' in response to an event
JVMDUMP010I Java dump written to /root/mem/mat/javacore.20111216.145922.3104.0002.txt
JVMDUMP032I JVM requested Snap dump using '/root/mem/mat/Snap.20111216.145922.3104.0003.trc' in response to an event
JVMDUMP010I Snap dump written to /root/mem/mat/Snap.20111216.145922.3104.0003.trc
JVMDUMP013I Processed dump event "abort", detail "".

To fix it, run

dbus-uuidgen > /var/lib/dbus/machine-id

If you don’t have dbus-uuidgen , it’s in the dbus package, which can be installed by issuing yum install dbus (of course!).

Happy weekend!

This entry was posted in tip. Bookmark the permalink.

25 Responses to D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open “/var/lib/dbus/machine-id”

  1. Pingback: D-Bus library appears to be incorrectly set up; failed to read machine uuid: “/etc/machine-id” is not a regular file See the manual page for dbus-uuidgen to correct this issue. D-Bus not built with -rdynamic so unable to print a backtrace Abor

  2. Aas says:

    Thank you. This has been a quick solution thanks to you.
    Thank you 3rd time 😉

  3. eerieN says:

    Thank you!

  4. ronald says:

    Sir you are a genius thanks

  5. JackOfAllTrades says:

    holy cow. i did not expect this one to be that easy. thanks!

  6. Great. Worked like a charm.

    Thanks for sharing

  7. higkoo says:

    Thanks , Just do it will be ok !

  8. mkhalil says:

    When I run

    ” dbus-uuidgen > /var/lib/dbus/machine-id”

    I keep getting

    ” bash: /var/lib/dbus/machine-id: Permission denied”

    Help pleae

  9. Graham says:

    Hi ,

    Try, “sudo dbus-uuidgen > /var/lib/dbus/machine-id”

    Cheers,

    Graham.

  10. mkhalil says:

    I did try

    “sudo dbus-uuidgen > /var/lib/dbus/machine-id”

    same result

    ” bash: /var/lib/dbus/machine-id: Permission denied”

    Best Regards

  11. sander says:

    sudo dbus-uuidgen –ensure

  12. Ha says:

    Thankks !! you save me !

  13. KJ says:

    Thanks for the quick solution!

    @mkhalil: I had the same problem too, I ended up creating the file manually and copying the generated ID into it:

    sudo touch /var/lib/dbus/machine-id
    dbus-uuidgen
    #copy the generated ID
    sudo vim /var/lib/dbus/machine-id
    #paste it in and save

  14. Rolle says:

    This solved the problem here as well. Needed this to start headless skype + bitlbee. Thanks a lot!

  15. Larry says:

    Thanks for sharing this! My exact problem and solution.

  16. Edward says:

    I hunted for quite a while to find this solution. Thank you for such a clear and concise answer.

  17. Gary says:

    Like KJ I had to create the machine-id file myself in the /etc/ folder . I am using FreeBSD 10.2 … but thank you, Firefox works now! 🙂

  18. Letang says:

    you ROCK G!

  19. Ryan Park says:

    Thank you, it was great help

  20. Abdel says:

    Thanks a lot this saved me a week of debbuging

  21. Areeb says:

    Thanks Graham this did the trick. I don’t know why the package wouldn’t generate an ID by default.

  22. James says:

    for me this happened running spyder in Windows Subsystem for Linux. The location expected was actually /etc/machine-id and the command above got permission denied even with sudo, so I just called dbus-uuidgen by itself, copied the id, then did sudo nano /etc/machine-id and pasted the id, and saved/exited. Then spyder worked (of course I already installed xming)

  23. Sam says:

    This fixed a bug in Firefox for me on FreeBSD! Thank you!

  24. Cody says:

    Fantastic. This worked for me as well thanks so much.
    Running on Docker CentOS7.

Leave a Reply

Your email address will not be published. Required fields are marked *