How do I fix my problem with hostnamectl command. It cannot connect to dbus

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am running Debian 9.4. hostname works.



$ sudo strace -f hostnamectl
...snipped...
connect(3, sa_family=AF_UNIX, sun_path="/var/run/dbus/system_bus_socket", 33) = -1 ENOENT (No such file or directory)
...

Failed to create bus connection: No such file or directory


UPDATE: here are more information:



$ sudo systemctl status dbus.service dbus.socket
Unit dbus.service could not be found.
Unit dbus.socket could not be found.

$ ps -p 1
PID TTY TIME CMD
1 ? 00:00:47 systemd

$ sudo systemctl list-unit-files --state=running
0 unit files listed.

$ sudo systemctl list-unit-files --state=enabled
...snipped...
26 unit files listed.









share|improve this question























  • Have you tried restarting dbus
    – Rui F Ribeiro
    Sep 7 at 20:37






  • 2




    What does sudo systemctl status dbus.service dbus.socket show?
    – sourcejedi
    Sep 7 at 20:38














up vote
1
down vote

favorite












I am running Debian 9.4. hostname works.



$ sudo strace -f hostnamectl
...snipped...
connect(3, sa_family=AF_UNIX, sun_path="/var/run/dbus/system_bus_socket", 33) = -1 ENOENT (No such file or directory)
...

Failed to create bus connection: No such file or directory


UPDATE: here are more information:



$ sudo systemctl status dbus.service dbus.socket
Unit dbus.service could not be found.
Unit dbus.socket could not be found.

$ ps -p 1
PID TTY TIME CMD
1 ? 00:00:47 systemd

$ sudo systemctl list-unit-files --state=running
0 unit files listed.

$ sudo systemctl list-unit-files --state=enabled
...snipped...
26 unit files listed.









share|improve this question























  • Have you tried restarting dbus
    – Rui F Ribeiro
    Sep 7 at 20:37






  • 2




    What does sudo systemctl status dbus.service dbus.socket show?
    – sourcejedi
    Sep 7 at 20:38












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am running Debian 9.4. hostname works.



$ sudo strace -f hostnamectl
...snipped...
connect(3, sa_family=AF_UNIX, sun_path="/var/run/dbus/system_bus_socket", 33) = -1 ENOENT (No such file or directory)
...

Failed to create bus connection: No such file or directory


UPDATE: here are more information:



$ sudo systemctl status dbus.service dbus.socket
Unit dbus.service could not be found.
Unit dbus.socket could not be found.

$ ps -p 1
PID TTY TIME CMD
1 ? 00:00:47 systemd

$ sudo systemctl list-unit-files --state=running
0 unit files listed.

$ sudo systemctl list-unit-files --state=enabled
...snipped...
26 unit files listed.









share|improve this question















I am running Debian 9.4. hostname works.



$ sudo strace -f hostnamectl
...snipped...
connect(3, sa_family=AF_UNIX, sun_path="/var/run/dbus/system_bus_socket", 33) = -1 ENOENT (No such file or directory)
...

Failed to create bus connection: No such file or directory


UPDATE: here are more information:



$ sudo systemctl status dbus.service dbus.socket
Unit dbus.service could not be found.
Unit dbus.socket could not be found.

$ ps -p 1
PID TTY TIME CMD
1 ? 00:00:47 systemd

$ sudo systemctl list-unit-files --state=running
0 unit files listed.

$ sudo systemctl list-unit-files --state=enabled
...snipped...
26 unit files listed.






debian systemd hostname d-bus






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 8 at 2:29









Jeff Schaller

33.1k849111




33.1k849111










asked Sep 7 at 20:21









Bon Ami

3081410




3081410











  • Have you tried restarting dbus
    – Rui F Ribeiro
    Sep 7 at 20:37






  • 2




    What does sudo systemctl status dbus.service dbus.socket show?
    – sourcejedi
    Sep 7 at 20:38
















  • Have you tried restarting dbus
    – Rui F Ribeiro
    Sep 7 at 20:37






  • 2




    What does sudo systemctl status dbus.service dbus.socket show?
    – sourcejedi
    Sep 7 at 20:38















Have you tried restarting dbus
– Rui F Ribeiro
Sep 7 at 20:37




Have you tried restarting dbus
– Rui F Ribeiro
Sep 7 at 20:37




2




2




What does sudo systemctl status dbus.service dbus.socket show?
– sourcejedi
Sep 7 at 20:38




What does sudo systemctl status dbus.service dbus.socket show?
– sourcejedi
Sep 7 at 20:38










1 Answer
1






active

oldest

votes

















up vote
0
down vote













It looks like dbus package is missing.



Check if dbus package is installed or not using below command:



$ sudo dpkg -l | grep dbus
ii dbus 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (daemon and utilities)
ii libdbus-1-3:amd64 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (library)


If dbus package is installed you will get output as above.



If output is blank then dbus package is missing. You can install the package using below command:



$ sudo apt-get install dbus


After installing the package you can check the status:



$ sudo systemctl status dbus.service dbus.socket
● dbus.service - D-Bus System Message Bus
Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
Docs: man:dbus-daemon(1)
Main PID: 451 (dbus-daemon)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/dbus.service
└─451 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

● dbus.socket - D-Bus System Message Bus Socket
Loaded: loaded (/lib/systemd/system/dbus.socket; static; vendor preset: enabled)
Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
Listen: /var/run/dbus/system_bus_socket (Stream)





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f467618%2fhow-do-i-fix-my-problem-with-hostnamectl-command-it-cannot-connect-to-dbus%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    It looks like dbus package is missing.



    Check if dbus package is installed or not using below command:



    $ sudo dpkg -l | grep dbus
    ii dbus 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (daemon and utilities)
    ii libdbus-1-3:amd64 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (library)


    If dbus package is installed you will get output as above.



    If output is blank then dbus package is missing. You can install the package using below command:



    $ sudo apt-get install dbus


    After installing the package you can check the status:



    $ sudo systemctl status dbus.service dbus.socket
    ● dbus.service - D-Bus System Message Bus
    Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
    Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
    Docs: man:dbus-daemon(1)
    Main PID: 451 (dbus-daemon)
    Tasks: 1 (limit: 4915)
    CGroup: /system.slice/dbus.service
    └─451 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

    ● dbus.socket - D-Bus System Message Bus Socket
    Loaded: loaded (/lib/systemd/system/dbus.socket; static; vendor preset: enabled)
    Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
    Listen: /var/run/dbus/system_bus_socket (Stream)





    share|improve this answer
























      up vote
      0
      down vote













      It looks like dbus package is missing.



      Check if dbus package is installed or not using below command:



      $ sudo dpkg -l | grep dbus
      ii dbus 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (daemon and utilities)
      ii libdbus-1-3:amd64 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (library)


      If dbus package is installed you will get output as above.



      If output is blank then dbus package is missing. You can install the package using below command:



      $ sudo apt-get install dbus


      After installing the package you can check the status:



      $ sudo systemctl status dbus.service dbus.socket
      ● dbus.service - D-Bus System Message Bus
      Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
      Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
      Docs: man:dbus-daemon(1)
      Main PID: 451 (dbus-daemon)
      Tasks: 1 (limit: 4915)
      CGroup: /system.slice/dbus.service
      └─451 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

      ● dbus.socket - D-Bus System Message Bus Socket
      Loaded: loaded (/lib/systemd/system/dbus.socket; static; vendor preset: enabled)
      Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
      Listen: /var/run/dbus/system_bus_socket (Stream)





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        It looks like dbus package is missing.



        Check if dbus package is installed or not using below command:



        $ sudo dpkg -l | grep dbus
        ii dbus 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (daemon and utilities)
        ii libdbus-1-3:amd64 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (library)


        If dbus package is installed you will get output as above.



        If output is blank then dbus package is missing. You can install the package using below command:



        $ sudo apt-get install dbus


        After installing the package you can check the status:



        $ sudo systemctl status dbus.service dbus.socket
        ● dbus.service - D-Bus System Message Bus
        Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
        Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
        Docs: man:dbus-daemon(1)
        Main PID: 451 (dbus-daemon)
        Tasks: 1 (limit: 4915)
        CGroup: /system.slice/dbus.service
        └─451 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

        ● dbus.socket - D-Bus System Message Bus Socket
        Loaded: loaded (/lib/systemd/system/dbus.socket; static; vendor preset: enabled)
        Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
        Listen: /var/run/dbus/system_bus_socket (Stream)





        share|improve this answer












        It looks like dbus package is missing.



        Check if dbus package is installed or not using below command:



        $ sudo dpkg -l | grep dbus
        ii dbus 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (daemon and utilities)
        ii libdbus-1-3:amd64 1.10.26-0+deb9u1 amd64 simple interprocess messaging system (library)


        If dbus package is installed you will get output as above.



        If output is blank then dbus package is missing. You can install the package using below command:



        $ sudo apt-get install dbus


        After installing the package you can check the status:



        $ sudo systemctl status dbus.service dbus.socket
        ● dbus.service - D-Bus System Message Bus
        Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
        Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
        Docs: man:dbus-daemon(1)
        Main PID: 451 (dbus-daemon)
        Tasks: 1 (limit: 4915)
        CGroup: /system.slice/dbus.service
        └─451 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

        ● dbus.socket - D-Bus System Message Bus Socket
        Loaded: loaded (/lib/systemd/system/dbus.socket; static; vendor preset: enabled)
        Active: active (running) since Fri 2018-09-07 23:39:14 EDT; 10s ago
        Listen: /var/run/dbus/system_bus_socket (Stream)






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 8 at 3:40









        Ram

        441




        441



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f467618%2fhow-do-i-fix-my-problem-with-hostnamectl-command-it-cannot-connect-to-dbus%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)