Skip Menu |

This queue is for tickets about the App-Docker-Client CPAN distribution.

Report information
The Basics
Id: 125529
Status: open
Priority: 0/
Queue: App-Docker-Client

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.010300
Fixed in: (no value)



Subject: Can't open socket /var/run/docker.sock: Permission denied
t/03-socket.t fails on some of my smokers: ... at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300-0/blib/lib/App/Docker/Client.pm line 362. App::Docker::Client::_error_code(App::Docker::Client=HASH(0x55831d71da20), 500, "Can't open socket /var/run/docker.sock: Permission denied", "Can't open socket /var/run/docker.sock: Permission denied at "...) called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300-0/blib/lib/App/Docker/Client.pm line 347 App::Docker::Client::_hande_response(App::Docker::Client=HASH(0x55831d71da20), HTTP::Response=HASH(0x55831e135718)) called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300-0/blib/lib/App/Docker/Client.pm line 221 App::Docker::Client::get(App::Docker::Client=HASH(0x55831d71da20), "/containers/json") called at t/03-socket.t line 19 FAILURE: 500 - Can't open socket /var/run/docker.sock: Permission denied Can't open socket /var/run/docker.sock: Permission denied at /opt/perl-5.28.0-RC2/lib/site_perl/5.28.0/LWP/Protocol/http/SocketUnixAlt.pm line 27. at t/03-socket.t line 19. # Looks like your test exited with 13 just after 1. t/03-socket.t ..... Dubious, test returned 13 (wstat 3328, 0xd00) Failed 1/2 subtests ... I think this happens if docker is actually installed but the current user has no permissions to use docker (i.e. he's not member of the group, and he's not root).
On Sat Jun 09 03:17:52 2018, SREZIC wrote: Show quoted text
> t/03-socket.t fails on some of my smokers: > > ... > at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300- > 0/blib/lib/App/Docker/Client.pm line 362. > App::Docker::Client::_error_code(App::Docker::Client=HASH(0x55831d71da20), > 500, "Can't open socket /var/run/docker.sock: Permission denied", > "Can't open socket /var/run/docker.sock: Permission denied at "...) > called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client- > 0.010300-0/blib/lib/App/Docker/Client.pm line 347 > App::Docker::Client::_hande_response(App::Docker::Client=HASH(0x55831d71da20), > HTTP::Response=HASH(0x55831e135718)) called at > /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300- > 0/blib/lib/App/Docker/Client.pm line 221 > App::Docker::Client::get(App::Docker::Client=HASH(0x55831d71da20), > "/containers/json") called at t/03-socket.t line 19 > FAILURE: 500 - Can't open socket /var/run/docker.sock: Permission > denied > Can't open socket /var/run/docker.sock: Permission denied at > /opt/perl-5.28.0- > RC2/lib/site_perl/5.28.0/LWP/Protocol/http/SocketUnixAlt.pm line 27. > at t/03-socket.t line 19. > # Looks like your test exited with 13 just after 1. > t/03-socket.t ..... > Dubious, test returned 13 (wstat 3328, 0xd00) > Failed 1/2 subtests > ... > > > I think this happens if docker is actually installed but the current > user has no permissions to use docker (i.e. he's not member of the > group, and he's not root).
This correct and also documented on the docker site. https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-convenience-script "If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker your-user Remember to log out and back in for this to take effect!"
On 2018-06-09 04:22:36, MZIESCHA wrote: Show quoted text
> On Sat Jun 09 03:17:52 2018, SREZIC wrote:
> > t/03-socket.t fails on some of my smokers: > > > > ... > > at /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300- > > 0/blib/lib/App/Docker/Client.pm line 362. > > App::Docker::Client::_error_code(App::Docker::Client=HASH(0x55831d71da20), > > 500, "Can't open socket /var/run/docker.sock: Permission denied", > > "Can't open socket /var/run/docker.sock: Permission denied at "...) > > called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client- > > 0.010300-0/blib/lib/App/Docker/Client.pm line 347 > > App::Docker::Client::_hande_response(App::Docker::Client=HASH(0x55831d71da20), > > HTTP::Response=HASH(0x55831e135718)) called at > > /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300- > > 0/blib/lib/App/Docker/Client.pm line 221 > > App::Docker::Client::get(App::Docker::Client=HASH(0x55831d71da20), > > "/containers/json") called at t/03-socket.t line 19 > > FAILURE: 500 - Can't open socket /var/run/docker.sock: Permission > > denied > > Can't open socket /var/run/docker.sock: Permission denied at > > /opt/perl-5.28.0- > > RC2/lib/site_perl/5.28.0/LWP/Protocol/http/SocketUnixAlt.pm line 27. > > at t/03-socket.t line 19. > > # Looks like your test exited with 13 just after 1. > > t/03-socket.t ..... > > Dubious, test returned 13 (wstat 3328, 0xd00) > > Failed 1/2 subtests > > ... > > > > > > I think this happens if docker is actually installed but the current > > user has no permissions to use docker (i.e. he's not member of the > > group, and he's not root).
> > This correct and also documented on the docker site. > https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using- > the-convenience-script > > "If you would like to use Docker as a non-root user, you should now > consider > adding your user to the "docker" group with something like: > > sudo usermod -aG docker your-user > > Remember to log out and back in for this to take effect!"
But what can be done to avoid unnecessary test failures? See http://matrix.cpantesters.org/?dist=App-Docker-Client+0.010300 The great amount of "green" on the matrix page suggests that you skip tests if docker is not available at all. Maybe you can also check if docker cannot be run because of missing permissions, and skip tests, too?
On Sat Jun 09 06:48:04 2018, SREZIC wrote: Show quoted text
> On 2018-06-09 04:22:36, MZIESCHA wrote:
> > On Sat Jun 09 03:17:52 2018, SREZIC wrote:
> > > t/03-socket.t fails on some of my smokers: > > > > > > ... > > > at /home/cpansand/.cpan/build/2018060718/App-Docker-Client- > > > 0.010300- > > > 0/blib/lib/App/Docker/Client.pm line 362. > > > App::Docker::Client::_error_code(App::Docker::Client=HASH(0x55831d71da20), > > > 500, "Can't open socket /var/run/docker.sock: Permission denied", > > > "Can't open socket /var/run/docker.sock: Permission denied at "...) > > > called at /home/cpansand/.cpan/build/2018060718/App-Docker-Client- > > > 0.010300-0/blib/lib/App/Docker/Client.pm line 347 > > > App::Docker::Client::_hande_response(App::Docker::Client=HASH(0x55831d71da20), > > > HTTP::Response=HASH(0x55831e135718)) called at > > > /home/cpansand/.cpan/build/2018060718/App-Docker-Client-0.010300- > > > 0/blib/lib/App/Docker/Client.pm line 221 > > > App::Docker::Client::get(App::Docker::Client=HASH(0x55831d71da20), > > > "/containers/json") called at t/03-socket.t line 19 > > > FAILURE: 500 - Can't open socket /var/run/docker.sock: Permission > > > denied > > > Can't open socket /var/run/docker.sock: Permission denied at > > > /opt/perl-5.28.0- > > > RC2/lib/site_perl/5.28.0/LWP/Protocol/http/SocketUnixAlt.pm line > > > 27. > > > at t/03-socket.t line 19. > > > # Looks like your test exited with 13 just after 1. > > > t/03-socket.t ..... > > > Dubious, test returned 13 (wstat 3328, 0xd00) > > > Failed 1/2 subtests > > > ... > > > > > > > > > I think this happens if docker is actually installed but the > > > current > > > user has no permissions to use docker (i.e. he's not member of the > > > group, and he's not root).
> > > > This correct and also documented on the docker site. > > https://docs.docker.com/install/linux/docker-ce/ubuntu/#install- > > using- > > the-convenience-script > > > > "If you would like to use Docker as a non-root user, you should now > > consider > > adding your user to the "docker" group with something like: > > > > sudo usermod -aG docker your-user > > > > Remember to log out and back in for this to take effect!"
> > But what can be done to avoid unnecessary test failures? See > http://matrix.cpantesters.org/?dist=App-Docker-Client+0.010300 > The great amount of "green" on the matrix page suggests that you skip > tests if docker is not available at all. Maybe you can also check if > docker cannot be run because of missing permissions, and skip tests, > too?
I'm on it. Thanks for that advise.