Failed to load listeners: can't create unix socket /var/run/docker.sock: is a directory











up vote
0
down vote

favorite












Ubuntu 18.04



Kernel 4.15.0-39-generic x86_64 GNU/Linux



What i'm trying to archive, is to get docker to open a TCP socket on IP 192.168.2.11.



So i edit the docker configs:



systemctl edit docker


Image of terminalThis is how my /etc/systemd/system/docker.service.d/.#override.conf looks like.



[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://192.168.2.11:2375


Then I run:



systemctl restart docker


I get the following error:



-- Unit docker.service has finished shutting down.
Nov 15 09:45:35 docker systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has begun starting up.
Nov 15 09:45:35 docker dockerd[27753]: Failed to load listeners: can't create unix socket /var/run/docker.sock: is a directory
Nov 15 09:45:35 docker systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 09:45:35 docker systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 15 09:45:35 docker systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit docker.service has failed.
--
-- The result is RESULT.









share|improve this question


























    up vote
    0
    down vote

    favorite












    Ubuntu 18.04



    Kernel 4.15.0-39-generic x86_64 GNU/Linux



    What i'm trying to archive, is to get docker to open a TCP socket on IP 192.168.2.11.



    So i edit the docker configs:



    systemctl edit docker


    Image of terminalThis is how my /etc/systemd/system/docker.service.d/.#override.conf looks like.



    [Service]
    ExecStart=
    ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://192.168.2.11:2375


    Then I run:



    systemctl restart docker


    I get the following error:



    -- Unit docker.service has finished shutting down.
    Nov 15 09:45:35 docker systemd[1]: Starting Docker Application Container Engine...
    -- Subject: Unit docker.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    --
    -- Unit docker.service has begun starting up.
    Nov 15 09:45:35 docker dockerd[27753]: Failed to load listeners: can't create unix socket /var/run/docker.sock: is a directory
    Nov 15 09:45:35 docker systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
    Nov 15 09:45:35 docker systemd[1]: docker.service: Failed with result 'exit-code'.
    Nov 15 09:45:35 docker systemd[1]: Failed to start Docker Application Container Engine.
    -- Subject: Unit docker.service has failed
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    --
    -- Unit docker.service has failed.
    --
    -- The result is RESULT.









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Ubuntu 18.04



      Kernel 4.15.0-39-generic x86_64 GNU/Linux



      What i'm trying to archive, is to get docker to open a TCP socket on IP 192.168.2.11.



      So i edit the docker configs:



      systemctl edit docker


      Image of terminalThis is how my /etc/systemd/system/docker.service.d/.#override.conf looks like.



      [Service]
      ExecStart=
      ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://192.168.2.11:2375


      Then I run:



      systemctl restart docker


      I get the following error:



      -- Unit docker.service has finished shutting down.
      Nov 15 09:45:35 docker systemd[1]: Starting Docker Application Container Engine...
      -- Subject: Unit docker.service has begun start-up
      -- Defined-By: systemd
      -- Support: http://www.ubuntu.com/support
      --
      -- Unit docker.service has begun starting up.
      Nov 15 09:45:35 docker dockerd[27753]: Failed to load listeners: can't create unix socket /var/run/docker.sock: is a directory
      Nov 15 09:45:35 docker systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
      Nov 15 09:45:35 docker systemd[1]: docker.service: Failed with result 'exit-code'.
      Nov 15 09:45:35 docker systemd[1]: Failed to start Docker Application Container Engine.
      -- Subject: Unit docker.service has failed
      -- Defined-By: systemd
      -- Support: http://www.ubuntu.com/support
      --
      -- Unit docker.service has failed.
      --
      -- The result is RESULT.









      share|improve this question













      Ubuntu 18.04



      Kernel 4.15.0-39-generic x86_64 GNU/Linux



      What i'm trying to archive, is to get docker to open a TCP socket on IP 192.168.2.11.



      So i edit the docker configs:



      systemctl edit docker


      Image of terminalThis is how my /etc/systemd/system/docker.service.d/.#override.conf looks like.



      [Service]
      ExecStart=
      ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://192.168.2.11:2375


      Then I run:



      systemctl restart docker


      I get the following error:



      -- Unit docker.service has finished shutting down.
      Nov 15 09:45:35 docker systemd[1]: Starting Docker Application Container Engine...
      -- Subject: Unit docker.service has begun start-up
      -- Defined-By: systemd
      -- Support: http://www.ubuntu.com/support
      --
      -- Unit docker.service has begun starting up.
      Nov 15 09:45:35 docker dockerd[27753]: Failed to load listeners: can't create unix socket /var/run/docker.sock: is a directory
      Nov 15 09:45:35 docker systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
      Nov 15 09:45:35 docker systemd[1]: docker.service: Failed with result 'exit-code'.
      Nov 15 09:45:35 docker systemd[1]: Failed to start Docker Application Container Engine.
      -- Subject: Unit docker.service has failed
      -- Defined-By: systemd
      -- Support: http://www.ubuntu.com/support
      --
      -- Unit docker.service has failed.
      --
      -- The result is RESULT.






      18.04 docker






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 7 hours ago









      BD Bear

      10813




      10813






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I spend about one hour trying to figure out why, and this is totally my own mistake for not reading the error message. the error message clearly states



          can't create unix socket /var/run/docker.sock: is a directory



          the first thing i do, is to enter root. (this is how i prefer to not do this, if you dont like to work this way. just add sudo infront of all the commmands )



          sudo su


          I check the path, using the following command.



          ls -la /var/run/docker.sock


          It shows that, the path is in fact a directory. So i delete the directory



          rm -fr /var/run/docker.sock


          then i restart the docker.service



          systemctl edit docker


          Docker starts, and the output of systemctl status docker is all good.



          Conclution: if you get this error message, and run ls on docker.sock and it does not look like this. then remove the directory and restart docker.



          ls -la /var/run/docker.sock
          srw-rw---- 1 root docker 0 Nov 15 09:47 /var/run/docker.sock





          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093118%2ffailed-to-load-listeners-cant-create-unix-socket-var-run-docker-sock-is-a-di%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            I spend about one hour trying to figure out why, and this is totally my own mistake for not reading the error message. the error message clearly states



            can't create unix socket /var/run/docker.sock: is a directory



            the first thing i do, is to enter root. (this is how i prefer to not do this, if you dont like to work this way. just add sudo infront of all the commmands )



            sudo su


            I check the path, using the following command.



            ls -la /var/run/docker.sock


            It shows that, the path is in fact a directory. So i delete the directory



            rm -fr /var/run/docker.sock


            then i restart the docker.service



            systemctl edit docker


            Docker starts, and the output of systemctl status docker is all good.



            Conclution: if you get this error message, and run ls on docker.sock and it does not look like this. then remove the directory and restart docker.



            ls -la /var/run/docker.sock
            srw-rw---- 1 root docker 0 Nov 15 09:47 /var/run/docker.sock





            share|improve this answer

























              up vote
              0
              down vote













              I spend about one hour trying to figure out why, and this is totally my own mistake for not reading the error message. the error message clearly states



              can't create unix socket /var/run/docker.sock: is a directory



              the first thing i do, is to enter root. (this is how i prefer to not do this, if you dont like to work this way. just add sudo infront of all the commmands )



              sudo su


              I check the path, using the following command.



              ls -la /var/run/docker.sock


              It shows that, the path is in fact a directory. So i delete the directory



              rm -fr /var/run/docker.sock


              then i restart the docker.service



              systemctl edit docker


              Docker starts, and the output of systemctl status docker is all good.



              Conclution: if you get this error message, and run ls on docker.sock and it does not look like this. then remove the directory and restart docker.



              ls -la /var/run/docker.sock
              srw-rw---- 1 root docker 0 Nov 15 09:47 /var/run/docker.sock





              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                I spend about one hour trying to figure out why, and this is totally my own mistake for not reading the error message. the error message clearly states



                can't create unix socket /var/run/docker.sock: is a directory



                the first thing i do, is to enter root. (this is how i prefer to not do this, if you dont like to work this way. just add sudo infront of all the commmands )



                sudo su


                I check the path, using the following command.



                ls -la /var/run/docker.sock


                It shows that, the path is in fact a directory. So i delete the directory



                rm -fr /var/run/docker.sock


                then i restart the docker.service



                systemctl edit docker


                Docker starts, and the output of systemctl status docker is all good.



                Conclution: if you get this error message, and run ls on docker.sock and it does not look like this. then remove the directory and restart docker.



                ls -la /var/run/docker.sock
                srw-rw---- 1 root docker 0 Nov 15 09:47 /var/run/docker.sock





                share|improve this answer












                I spend about one hour trying to figure out why, and this is totally my own mistake for not reading the error message. the error message clearly states



                can't create unix socket /var/run/docker.sock: is a directory



                the first thing i do, is to enter root. (this is how i prefer to not do this, if you dont like to work this way. just add sudo infront of all the commmands )



                sudo su


                I check the path, using the following command.



                ls -la /var/run/docker.sock


                It shows that, the path is in fact a directory. So i delete the directory



                rm -fr /var/run/docker.sock


                then i restart the docker.service



                systemctl edit docker


                Docker starts, and the output of systemctl status docker is all good.



                Conclution: if you get this error message, and run ls on docker.sock and it does not look like this. then remove the directory and restart docker.



                ls -la /var/run/docker.sock
                srw-rw---- 1 root docker 0 Nov 15 09:47 /var/run/docker.sock






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 7 hours ago









                BD Bear

                10813




                10813






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093118%2ffailed-to-load-listeners-cant-create-unix-socket-var-run-docker-sock-is-a-di%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Quarter-circle Tiles

                    build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                    Mont Emei