Comments (13)
Please provide the full quadlet file and run systcemctl cat unifi_network_application.service
to see the full podman command to check if quadlet may have generated something incorrectly.
Also if you use RHEL please contact RHEL support as upstream really only supports the lastest version or try if you can reproduce with podman 5.
from podman.
Here the full quadlet file:
Description=Unifi Network Application
After=local-fs.target
[Container]
Image=lscr.io/linuxserver/unifi-network-application:latest
ContainerName=unifi_network_application
AutoUpdate=registry
Environment=PUID=${PODMAN_PUID}
Environment=PGID=${PODMAN_PGID}
Environment=TZ=Europe/Amsterdam
Environment=MONGO_USER=unifi
Environment=MONGO_HOST=192.168.1.116
Environment=MONGO_PORT=27017
Environment=MONGO_DBNAME=unifi
Secret=unifi_mongodb_unifi_password,type=env,target=MONGO_PASS
PublishPort=3478:3478/udp
PublishPort=8080:8080
PublishPort=8443:8443
PublishPort=8843:8843
PublishPort=8880:8880
PublishPort=10001:10001/udp
Volume=${CONFIG_DIR}/unifi_network_application:/config:Z
User=$(id -u):$(id -g)
UserNS=keep-id
HealthStartPeriod=2m
HealthCmd=CMD-SHELL curl -f --insecure https://localhost:8443 || exit 1
HealthInterval=30s
HealthRetries=2
HealthOnFailure=kill
[Service]
Restart=on-failure
[Install]
WantedBy=multi-user.target default.target
Here the full podman command from systemctl status:
ExecStart=/usr/bin/podman run --name=unifi_network_application --cidfile=/run/user/1002/unifi_network_application.cid --replace --rm --cgroups=split --sdnotify=conmon -d --user $(id -u):$(id -g) --userns keep-id -v ${CONFIG_DIR}/unifi_network_application:/config:Z --label io.containers.autoupdate=registry --publish 3478:3478/udp --publish 8080:8080 --publish 8443:8443 --publish 8843:8843 --publish 8880:8880 --publish 10001:10001/udp --env MONGO_DBNAME=unifi --env MONGO_HOST=192.168.1.116 --env MONGO_PORT=27017 --env MONGO_USER=unifi --env PGID=${PODMAN_PGID} --env PUID=${PODMAN_PUID} --env TZ=Europe/Amsterdam --secret unifi_mongodb_unifi_password,type=env,target=MONGO_PASS --health-cmd CMD-SHELL curl -f --insecure https://localhost:8443 || exit 1 --health-interval 30s --health-on-failure kill --health-retries 2 --health-start-period 2m lscr.io/linuxserver/unifi-network-application:latest (code=exited, status=125)
from podman.
please show the systcemctl cat
output, seeing the actual quoting is really important
from podman.
This is the output:
[podman@homeserver ~]$ systemctl --user cat unifi_network_application.service
# /run/user/1002/systemd/generator/unifi_network_application.service
# Automatically generated by /usr/lib/systemd/user-generators/podman-user-generator
#
[Unit]
Description=Unifi Network Application
After=local-fs.target
SourcePath=/home/podman/.config/containers/systemd/unifi_network_application.container
RequiresMountsFor=%t/containers
[X-Container]
Image=lscr.io/linuxserver/unifi-network-application:latest
ContainerName=unifi_network_application
AutoUpdate=registry
Environment=PUID=${PODMAN_PUID}
Environment=PGID=${PODMAN_PGID}
Environment=TZ=Europe/Amsterdam
Environment=MONGO_USER=unifi
Environment=MONGO_HOST=192.168.1.116
Environment=MONGO_PORT=27017
Environment=MONGO_DBNAME=unifi
Secret=unifi_mongodb_unifi_password,type=env,target=MONGO_PASS
PublishPort=3478:3478/udp
PublishPort=8080:8080
PublishPort=8443:8443
PublishPort=8843:8843
PublishPort=8880:8880
PublishPort=10001:10001/udp
Volume=${CONFIG_DIR}/unifi_network_application:/config:Z
User=$(id -u):$(id -g)
UserNS=keep-id
HealthStartPeriod=2m
HealthCmd=CMD-SHELL curl -f --insecure https://localhost:8443 || exit 1
HealthInterval=30s
HealthRetries=2
HealthOnFailure=kill
[Service]
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
KillMode=mixed
ExecStop=/usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid
ExecStopPost=-/usr/bin/podman rm -v -f -i --cidfile=%t/%N.cid
Delegate=yes
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
ExecStart=/usr/bin/podman run --name=unifi_network_application --cidfile=%t/%N.cid --replace --rm --cgroups=split --sdnotify=conmon -d --user "$(id -u):$(id -g)" --userns keep-id -v ${CONFIG_DIR}/unifi_network_application:/config:Z --label io.containers.autoupdate=registry --publish 3478:3478/udp --publish 8080:8080 --publish 8443:8443 --publish 8843:8843 --publish 8880:8880 --publish 10001:10001/udp --env MONGO_DBNAME=unifi --env MONGO_HOST=192.168.1.116 --env MONGO_PORT=27017 --env MONGO_USER=unifi --env PGID=${PODMAN_PGID} --env PUID=${PODMAN_PUID} --env TZ=Europe/Amsterdam --secret unifi_mongodb_unifi_password,type=env,target=MONGO_PASS --health-cmd "CMD-SHELL curl -f --insecure https://localhost:8443 || exit 1" --health-interval 30s --health-on-failure kill --health-retries 2 --health-start-period 2m lscr.io/linuxserver/unifi-network-application:latest
[Install]
WantedBy=multi-user.target default.target
from podman.
setting something like "$(id -u):$(id -g)"
is not possible systemd does not run the command through your shell so even if the pull works this will not get expanded and is invalid syntax for the --user option so I don't see how this ever would have worked even before the update.
To be clear my assumption is that the cli args are wrong somehow, because pulling lscr.io/linuxserver/unifi-network-application:latest
will not result in such error rather something like a extra space somewhere, i.e.
podman run --rm -p 8080 8080 lscr.io/linuxserver/unifi-network-application:latest
This it would assume 8080 is the image name although I don't see such case in you command right now.
from podman.
About that "$(id -u):$(id -g)"
: I got crazy for like 4 months and that small change immediately did the trick as my directories mounted inside the container no longer change user/group. It did work, but do not ask me why ;)
Indeed pulling the image works with podman pull ...
.
I'm pretty sure it comes from the last podman update has the issue arose immediately after the system reboot.
from podman.
I just downgraded to podman version 4.6.1 and all of my containers do work as expected.
I didn't have to do anything, just a reboot of the system (after the downgrade) and they came back running on their own.
from podman.
Can you do another systemctl cat
to see if there are any differences between the generated units
from podman.
For sure:
[podman@homeserver ~]$ systemctl --user cat unifi_network_application.service > output.txt
[podman@homeserver ~]$ cat output.txt
# /run/user/1002/systemd/generator/unifi_network_application.service
# Automatically generated by /usr/lib/systemd/user-generators/podman-user-generator
#
[Unit]
Description=Unifi Network Application
After=local-fs.target
SourcePath=/home/podman/.config/containers/systemd/unifi_network_application.container
RequiresMountsFor=%t/containers
[X-Container]
Image=lscr.io/linuxserver/unifi-network-application:latest
ContainerName=unifi_network_application
AutoUpdate=registry
Environment=PUID=${PODMAN_PUID}
Environment=PGID=${PODMAN_PGID}
Environment=TZ=Europe/Amsterdam
Environment=MONGO_USER=unifi
Environment=MONGO_HOST=192.168.1.116
Environment=MONGO_PORT=27017
Environment=MONGO_DBNAME=unifi
Secret=unifi_mongodb_unifi_password,type=env,target=MONGO_PASS
PublishPort=3478:3478/udp
PublishPort=8080:8080
PublishPort=8443:8443
PublishPort=8843:8843
PublishPort=8880:8880
PublishPort=10001:10001/udp
Volume=${CONFIG_DIR}/unifi_network_application:/config:Z
User=$(id -u):$(id -g)
UserNS=keep-id
HealthStartPeriod=2m
HealthCmd=CMD-SHELL curl -f --insecure https://localhost:8443 || exit 1
HealthInterval=30s
HealthRetries=2
HealthOnFailure=kill
[Service]
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
KillMode=mixed
ExecStop=/usr/bin/podman rm -f -i --cidfile=%t/%N.cid
ExecStopPost=-/usr/bin/podman rm -f -i --cidfile=%t/%N.cid
Delegate=yes
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
ExecStart=/usr/bin/podman run --name=unifi_network_application --cidfile=%t/%N.cid --replace --rm --cgroups=split --sdnotify=conmon -d --user 0 --userns keep-id -v ${CONFIG_DIR}/unifi_network_application:/config:Z --label io.containers.autoupdate=registry --publish 3478:3478/udp --publish 8080:8080 --publish 8443:8443 --publish 8843:8843 --publish 8880:8880 --publish 10001:10001/udp --env MONGO_DBNAME=unifi --env MONGO_HOST=192.168.1.116 --env MONGO_PORT=27017 --env MONGO_USER=unifi --env PGID=${PODMAN_PGID} --env PUID=${PODMAN_PUID} --env TZ=Europe/Amsterdam --secret unifi_mongodb_unifi_password,type=env,target=MONGO_PASS --health-cmd "CMD-SHELL curl -f --insecure https://localhost:8443 || exit 1" --health-interval 30s --health-on-failure kill --health-retries 2 --health-start-period 2m lscr.io/linuxserver/unifi-network-application:latest
[Install]
WantedBy=multi-user.target default.target
from podman.
As I suspected the difference is --user "$(id -u):$(id -g)" vs --user 0 (working one)
from podman.
Yeah indeed, just noticed the same!
What would it be the correct syntax then to not have podman changing the ownership of mounted directories inside containers?
Thanks a lot for your time btw!
from podman.
Well if --user 0 worked for you then I suggest you set User=0
in your quadlet file.
from podman.
Upgraded again to 4.9.1 and changed to User=0 in the quadlet file fixed the issue. Thanks a lot for you help @Luap99!
from podman.
Related Issues (20)
- Windows: Starting container in pod that publishes ports prints `Error: starting some containers: internal libpod error` HOT 7
- Running podman inside a docker container with gpu support HOT 3
- podman exec [mandatory command?] HOT 7
- 'podman stop' does not thoroughly clean up, resulting in 'the container name \"autotests\" is already in use' HOT 3
- Podman Kube Play with --userns=auto - How to chown volumes? HOT 5
- MongoDB warns that vm.max_map_count is too low
- Quay.io images are lagging behind HOT 7
- podman 5.x and pasta gateway crashes fedora40 completely when virtualbox 7.0.18 is running HOT 9
- podman kube play unhealthy does not restart container
- `podman container runlabel` instead of `podman runlabel`
- Templated quadlet container name does not escape invalid characters HOT 6
- Podman on windows looks in too many (wrong) places for configuration files HOT 5
- Windows: systemd podman-restart.service cannot be enabled as user in rootless setup HOT 1
- unable to replace "host-gateway" of host entry "host.docker.internal:host-gateway" HOT 1
- [RFE] Load multi-arch images with `podman load` HOT 1
- HealthCmd interval in quadlet not being followed + transient timers not cleaned up HOT 9
- SHA digests for *.pkg files are missing from shasums file in 5.1.0 release HOT 3
- podman pull does not use https_proxy when using podman machine, but will use on linux HOT 11
- /etc/hosts becomes empty after checkpoint and restore HOT 1
- Build errors when copying files with extended attributes between stages HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podman.