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
This 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
add a comment |
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
This 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
add a comment |
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
This 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
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
This 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
18.04 docker
asked 7 hours ago
BD Bear
10813
10813
add a comment |
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
answered 7 hours ago
BD Bear
10813
10813
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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