Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to connect to container's attach socket #10011

Closed
mfleader opened this issue Apr 13, 2021 · 10 comments
Closed

Failure to connect to container's attach socket #10011

mfleader opened this issue Apr 13, 2021 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. rootless stale-issue

Comments

@mfleader
Copy link

mfleader commented Apr 13, 2021

I am an intern working on a dashboard application for the OpenShift Performance and Scale team. I use podman for containerized development and deployment. This issue has come up for me before now, but appeared to be resolved by upgrading podman from 2.x to 3.0.0.

Steps to reproduce the issue:

  1. podman -it run node

Describe the results you received:

Error: failed to connect to container's attach socket: /run/user/1000/snap.code/libpod/tmp/socket/0bfea2ffb6974989ab5d39809cb5188ee524de858cd9c6c3714ef5fc113fe5a5/attach: no such file or directory

Describe the results you expected:

A container running some version of NodeJS.

Additional information you deem important (e.g. issue happens only occasionally):

I have installed snap, and vscode through snap. The snap.code directory seems to come up in situations where those two co-occur.

Output of podman version:

Version:      3.1.0
API Version:  3.1.0
Go Version:   go1.16
Built:        Mon Apr  5 10:37:55 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.20.0
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.27-1.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.11.13-300.fc34.x86_64
  linkmode: dynamic
  memFree: 22658531328
  memTotal: 33436647424
  ociRuntime:
    name: crun
    package: crun-0.19-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.19
      commit: e67a75672412975916dac6b87f8346f870e4b99a
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    selinuxEnabled: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.9-1.fc34.x86_64
    version: |-
      slirp4netns version 1.1.8+dev
      commit: 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 25379725312
  swapTotal: 25379725312
  uptime: 7m 6.34s
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/mleader/.config/containers/storage.conf
  containerStore:
    number: 11
    paused: 0
    running: 0
    stopped: 11
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.2
        fuse-overlayfs: version 1.5
        FUSE library version 3.10.2
        using FUSE kernel interface version 7.31
  graphRoot: /home/mleader/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 192
  runRoot: /run/user/1000/snap.code/containers
  volumePath: /home/mleader/.local/share/containers/storage/volumes
version:
  APIVersion: 3.1.0
  Built: 1617633475
  BuiltTime: Mon Apr  5 10:37:55 2021
  GitCommit: ""
  GoVersion: go1.16
  OsArch: linux/amd64
  Version: 3.1.0

Package info (e.g. output of rpm -q podman or apt list podman):

podman-3.1.0-2.fc34.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

physical, Lenovo Thinkpad T490s, i7

@mheon
Copy link
Member

mheon commented Apr 13, 2021

conmon-2.0.27-1.fc34.x86_64 and Podman 3.1.0 - this should have the fixes in both Podman and Conmon.

@haircommander @giuseppe Any ideas here? Per the report, we regressed on this since 3.0.0, but I don't see any changes that would have done that.

@mheon mheon added kind/bug Categorizes issue or PR as related to a bug. rootless labels Apr 13, 2021
@haircommander
Copy link
Collaborator

hm this is unexpected...

@haircommander
Copy link
Collaborator

wait is the XDG_RUNTIME_DIR being changed by snap? I would not expect snap.code to be in that path

@mfleader
Copy link
Author

mfleader commented Apr 13, 2021

since @haircommander mentioned XDG_RUNTIME_DIR, I found this issue made on vscode. Maybe it's a snap packaging thing? Is this helpful?

My system shows this:

> echo $XDG_RUNTIME_DIR
/run/user/1000

@haircommander
Copy link
Collaborator

did this work around help you microsoft/vscode#95384 (comment)

@mfleader
Copy link
Author

@haircommander Do you mean trying this?

> export XDG_RUNTIME_DIR=/run/user/1000/snap.code
> podman run -it --rm node
Error: sd-bus call: Permission denied: OCI permission denied

@mfleader
Copy link
Author

mfleader commented Apr 15, 2021

> export XDG_RUNTIME_DIR=/run/user/1000
> podman run -it --rm node
Error: failed to connect to container's attach socket: /run/user/1000/snap.code/libpod/tmp/socket/a752790ad4b1ca700969f830d15d264f21d7d2422cf1a8115d24042439e4789e/attach: no such file or directory

socket filename: a752790ad4b1ca700969f830d15d264f21d7d2422cf1a8115d24042439e4789e

> ls /run/user/1000/snap.code/libpod/tmp/socket
a752790ad4b1ca700969f830d15d264f21d7d2422cf1a8115d24042439e4789

Does the socket filename being short by the last letter affect anything?

@haircommander
Copy link
Collaborator

ah! that should be fixed by #8979 (which I have not had the cycles to push through)

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented May 17, 2021

Since that PR has merged, I am going to assume this is fixed.

@rhatdan rhatdan closed this as completed May 17, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. rootless stale-issue
Projects
None yet
Development

No branches or pull requests

4 participants