podman: Podman socket (user) not working
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Podman socket activation not working as advertised.
Steps to reproduce the issue:
-
Enable (–user) podman.socket
-
Try to connect
-
Doesn’t work
Describe the results you received:
➜ ~ systemctl --user status podman.socket
● podman.socket - Podman API Socket
Loaded: loaded (/home/jreimann/.config/systemd/user/podman.socket; enabled; vendor preset: disabled)
Active: active (listening) since Tue 2021-11-16 13:42:34 CET; 2 weeks 2 days ago
Triggers: ● podman.service
Docs: man:podman-api(1)
Listen: /run/user/110147/podman/podman.sock (Stream)
CGroup: /user.slice/user-110147.slice/user@110147.service/app.slice/podman.socket
Nov 16 13:42:34 brocken systemd[2272]: Listening on Podman API Socket.
➜ ~ ls /run/user/110147/podman/podman.sock
ls: cannot access '/run/user/110147/podman/podman.sock': No such file or directory
➜ ~ curl -v --unix-socket $XDG_RUNTIME_DIR/podman/podman.sock http://localhost/version
* Trying /run/user/110147/podman/podman.sock:0...
* Immediate connect fail for /run/user/110147/podman/podman.sock: No such file or directory
* Closing connection 0
curl: (7) Couldn't connect to server
Describe the results you expected:
Works.
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version: 3.4.1
API Version: 3.4.1
Go Version: go1.16.8
Built: Wed Oct 20 16:31:56 2021
OS/Arch: linux/amd64
Output of podman info --debug:
host:
arch: amd64
buildahVersion: 1.23.1
cgroupControllers:
- cpu
- io
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.0.30-2.fc35.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.0.30, commit: '
cpus: 24
distribution:
distribution: fedora
variant: kde
version: "35"
eventLogger: journald
hostname: brocken
idMappings:
gidmap:
- container_id: 0
host_id: 110147
size: 1
- container_id: 1
host_id: 120000
size: 165536
uidmap:
- container_id: 0
host_id: 110147
size: 1
- container_id: 1
host_id: 120000
size: 165536
kernel: 5.14.17-301.fc35.x86_64
linkmode: dynamic
logDriver: journald
memFree: 4176601088
memTotal: 67328249856
ociRuntime:
name: crun
package: crun-1.3-1.fc35.x86_64
path: /usr/bin/crun
version: |-
crun version 1.3
commit: 8e5757a4e68590326dafe8a8b1b4a584b10a1370
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
remoteSocket:
path: /run/user/110147/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
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.1.12-2.fc35.x86_64
version: |-
slirp4netns version 1.1.12
commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
libslirp: 4.6.1
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.5.3
swapFree: 40213344256
swapTotal: 42366656512
uptime: 403h 37m 21.7s (Approximately 16.79 days)
plugins:
log:
- k8s-file
- none
- journald
network:
- bridge
- macvlan
volume:
- local
registries:
search:
- registry.fedoraproject.org
- registry.access.redhat.com
- docker.io
- quay.io
store:
configFile: /home/jreimann/.config/containers/storage.conf
containerStore:
number: 3
paused: 0
running: 0
stopped: 3
graphDriverName: overlay
graphOptions: {}
graphRoot: /home/jreimann/.local/share/containers/storage
graphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 1773
runRoot: /run/user/110147/containers
volumePath: /home/jreimann/.local/share/containers/storage/volumes
version:
APIVersion: 3.4.1
Built: 1634740316
BuiltTime: Wed Oct 20 16:31:56 2021
GitCommit: ""
GoVersion: go1.16.8
OsArch: linux/amd64
Version: 3.4.1
Package info (e.g. output of rpm -q podman or apt list podman):
podman-3.4.1-1.fc35.x86_64
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Move podman socket This patch creates special podman socket for sensubility purposes on /var/lib instead of /run as it is tmpfs and so permission changes would perish after reboot. This patch also r... — committed to openstack/tripleo-heat-templates by paramite 2 years ago
- Update git submodules * Update tripleo-heat-templates from branch 'master' to cd1b47e47d1507c5a6e3526720ee6cad8f9a3fd3 - Merge "Move podman socket" - Move podman socket This patch crea... — committed to openstack/openstack by deleted user 2 years ago
- Move podman socket This patch creates special podman socket for sensubility purposes on /var/lib instead of /run as it is tmpfs and so permission changes would perish after reboot. This patch also r... — committed to openstack/tripleo-heat-templates by paramite 2 years ago
- Move podman socket This patch creates special podman socket for sensubility purposes on /var/lib instead of /run as it is tmpfs and so permission changes would perish after reboot. This patch also r... — committed to openstack/tripleo-heat-templates by paramite 2 years ago
Ok, I played a bit more with that. And got it resolved by:
In the original file (under /home/user) the service (not the socket) unit was different than the one under
/usr/lib/. By deleting and re-creating it, systemd created a symlink (instead of making a copy) to the one under/usr/lib. Which might have changed over time, I don’t know.Turns out, the issue is resolved! One only needs to ensure that there are no stale .socket AND .service files.
I’m sorry should have been socket. systemctl status --user podman.socket
What does
systemctl status --user podman.sockshow?