Skip to content

docker can't access to volume with screen #4822

Closed
@joseluisbz

Description

@joseluisbz
    • I have tried with the latest version of my channel (Stable or Edge)
    • I have uploaded Diagnostics
    • Diagnostics ID: BFD655CF-D206-4905-B5AD-06447A5E3DDF/20200731174034

Expected behavior

Allows to acces by terminal to tty related to docker

Actual behavior

% screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty                
[screen is terminating]
%

Information

  - macOS Version: 10.15.6

Diagnostic logs

 - Docker for Mac: version 2.3.0.4

Steps to reproduce the behavior

  1. open Terminal
  2. screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

Activity

dpkirchner

dpkirchner commented on Aug 24, 2020

@dpkirchner

You can get slightly further if you run chmod 777 ~/Library/Containers/com.docker.docker/Data/vms/0/tty and run screen -m -L ~/Library/Containers/com.docker.docker/Data/vms/0/tty. In that case you'll see this in the screenlog.0 file (created by the -L flag):

/Users/dpk/Library/Containers/com.docker.docker/Data/vms/0/tty: line 1: /dev/ttys001: Permission denied

I haven't figured out how to run screen without the tty to fix the buggy permissions there.

This bug also affects version 2.3.5.0 (edge channel). I uploaded a diagnostic log as well: D7716AFD-F809-46C0-9AB4-2EE25C4697EB/20200824172454

ibalashov

ibalashov commented on Sep 8, 2020

@ibalashov

@dpkirchner I did the command above screen -m -L and got the following:

$ cat screenlog.0
/dev/ttys005

But not sure how to proceed. Docker 2.3.0.4.

dpkirchner

dpkirchner commented on Sep 8, 2020

@dpkirchner

I'm not sure, you got a lot further along than I did. FWIW, I run in to exactly the same bug in 2.3.0.4 as I did in 2.3.5.0.

There's a StackOverflow comment about the issue suggesting a solution that may work for some cases: https://stackoverflow.com/a/60582083 It doesn't work for my specific use case, unfortunately, but it might help you out.

hnkhuy

hnkhuy commented on Sep 13, 2020

@hnkhuy

I met this issue on 2.3.0.4(46911) too. And the log is:
/Users/huyhuynh/Library/Containers/com.docker.docker/Data/vms/0/tty: line 1: /dev/ttys004: Permission denied
I tried chmod 400 , chmod 777 and sudo in front also not work :'(

stevegoossens

stevegoossens commented on Sep 23, 2020

@stevegoossens

Until this is fixed, here are two workaround methods that worked for me: https://stackoverflow.com/a/63595817/1456285

jenildesai25

jenildesai25 commented on Oct 9, 2020

@jenildesai25

I have tried using method 1 from above link -> https://stackoverflow.com/a/63595817/1456285

I did enter into terminal but after that how to navigate?

stevegoossens

stevegoossens commented on Oct 9, 2020

@stevegoossens

Once you have terminal access to the VM, you can find the volume data in the usual place, i.e. /var/lib/docker/volumes, with subfolders for each docker volume, and _data subfolders therein for the actual data, e.g.

docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
/ # ls -lah /var/lib/docker/volumes/
total 72
drwx------   10 root     root        4.0K Aug 27 11:34 .
drwx--x--x   15 root     root        4.0K Oct  9 16:07 ..
drwxr-xr-x    3 root     root        4.0K Aug 26 10:44 14ce94e174839f1947efa6fcbf5ac1fb2ea3b0f0b3f25311fee333ee374576b6
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 34eb2bd80931ff954e1da80c5383beb4def61129d4005432b77080531cd10a5a
drwxr-xr-x    3 root     root        4.0K Aug 27 11:34 830de2ce31519c921b50c448964b54517ca4461d337b56a9fd6e5b354ace3247
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 data-layer_mongo_data
drwxr-xr-x    3 root     root        4.0K Aug 26 11:01 ebb440184703bfad17184bd5ff74b677b50d74b8f0fbdd116506a1fcacfb00cd
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_back-end_log
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_front-end_log
drwxr-xr-x    3 root     root        4.0K Aug 27 11:27 hawakening-services_mongo_data
-rw-------    1 root     root       64.0K Oct  9 16:07 metadata.db
/ # ls -lah /var/lib/docker/volumes/data-layer_mongo_data/_data/
total 1352
drwxr-xr-x    4 999      ping        4.0K Aug 27 11:35 .
drwxr-xr-x    3 root     root        4.0K Aug 25 12:34 ..
-rw-------    1 999      ping          46 Aug 25 12:34 WiredTiger
-rw-------    1 999      ping          21 Aug 25 12:34 WiredTiger.lock
-rw-------    1 999      ping        1.2K Aug 27 11:35 WiredTiger.turtle
-rw-------    1 999      ping       84.0K Aug 27 11:35 WiredTiger.wt
-rw-------    1 999      ping        4.0K Aug 27 11:35 WiredTigerLAS.wt
-rw-------    1 999      ping       20.0K Aug 27 11:35 _mdb_catalog.wt
-rw-------    1 999      ping       20.0K Aug 27 11:35 collection-0--6268495467305357123.wt
-rw-------    1 999      ping      388.0K Aug 25 12:34 collection-10--6268495467305357123.wt
-rw-------    1 999      ping      132.0K Aug 26 10:14 collection-12--6268495467305357123.wt
-rw-------    1 999      ping      264.0K Aug 26 10:14 collection-14--6268495467305357123.wt
-rw-------    1 999      ping       36.0K Aug 27 11:35 collection-2--6268495467305357123.wt
-rw-------    1 999      ping       24.0K Aug 26 10:14 collection-4--6268495467305357123.wt
-rw-------    1 999      ping       28.0K Aug 25 12:34 collection-8--6268495467305357123.wt
drwx------    2 999      ping        4.0K Aug 27 11:35 diagnostic.data
-rw-------    1 999      ping       20.0K Aug 27 11:35 index-1--6268495467305357123.wt
-rw-------    1 999      ping       40.0K Aug 25 12:34 index-11--6268495467305357123.wt
-rw-------    1 999      ping       60.0K Aug 26 10:14 index-13--6268495467305357123.wt
-rw-------    1 999      ping       64.0K Aug 25 13:47 index-15--6268495467305357123.wt
-rw-------    1 999      ping       36.0K Aug 27 11:35 index-3--6268495467305357123.wt
-rw-------    1 999      ping       24.0K Aug 26 10:14 index-5--6268495467305357123.wt
-rw-------    1 999      ping       12.0K Aug 27 11:35 index-6--6268495467305357123.wt
-rw-------    1 999      ping       24.0K Aug 25 12:34 index-9--6268495467305357123.wt
drwx------    2 999      ping        4.0K Aug 26 10:15 journal
-rw-------    1 999      ping           0 Aug 27 11:35 mongod.lock
-rw-------    1 999      ping       36.0K Aug 27 11:35 sizeStorer.wt
-rw-------    1 999      ping         114 Aug 25 12:34 storage.bson
/ # exit
gmbulaba

gmbulaba commented on Oct 15, 2020

@gmbulaba

Hello
am facing a other issue when trying : screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
i have a message saying No such file or directory and [screen is terminating] after

here is the way am running my docker :
docker run -tid --name web -p 8080:80 --mount source=myvolume, target=/usr/share/nginx/html nginx:latest

I don't get why tty is not found. Can someone help me ?

fireinrain

fireinrain commented on Oct 27, 2020

@fireinrain

I also get this issue.
computer: mac
os version 10.14.6
dokcer for mac version 2.4.0.0(48506)
image

when i want to attach into the docker vm, i run the command mentioned in this page. i get the same error.

it warn me that screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty permission denied.

in the early version docker for mac desktop, it can work.

is it a bug, hope to fix, thanks

deepio-oc

deepio-oc commented on Nov 14, 2020

@deepio-oc

I also don't have tty file.

ls -l ~/Library/Containers/com.docker.docker/Data/vms/0/tty 
ls: /Users/xxx/Library/Containers/com.docker.docker/Data/vms/0/tty: No such file or directory

docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.2
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 16:58:31 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46d9d
  Built:            Wed Sep 16 17:07:04 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
sangshuduo

sangshuduo commented on Nov 17, 2020

@sangshuduo

I don't have the tty file too. I'm using latest docker desktop 2.5.0.1 for mac.

Skyler1017

Skyler1017 commented on Nov 18, 2020

@Skyler1017

I don't have the tty file too.

29 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dpkirchner@sangshuduo@prologic@joebnb@xros

        Issue actions

          docker can't access to volume with screen · Issue #4822 · docker/for-mac