Replies: 2 comments 1 reply
-
|
yes you need to wait until your interface that you link to bindto becomes online. It is a quite common issues that the user session starts before the network is ready. If you use quadlet there should already be a dependency on podman-user-wait-network-online.service which polls the systems network-online.target for readiness. But that also is problemeatic when the system unit is never activated, i.e. #24796 |
Beta Was this translation helpful? Give feedback.
-
Problemsuggested solution below under TLDR Hi! Same problem, same distro, same version. Pasta is only listening on $ ss -ntlp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 [::]:9100 [::]:* users:(("pasta.avx2",pid=1526,fd=8))
$ nc -v 127.0.0.1 9100
nc: connect to 127.0.0.1 port 9100 (tcp) failed: Connection refused
$ nc -v ::1 9100
Connection to ::1 9100 port [tcp/*] succeeded!
PING
HTTP/1.1 400 Bad RequestRestarting the (user rootless Quadlet) container after boot makes it work $ systemctl --user restart nginx.service
$ ss -ntlp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 *:9100 *:* users:(("pasta.avx2",pid=3872,fd=8))
$ nc -v 127.0.0.1 9100
Connection to 127.0.0.1 9100 port [tcp/*] succeeded!
GET / HTTP/1.0
HTTP/1.1 400 Bad RequestThis is a Quadlet that IS waiting on I tried making it wait for ipv4 and 6 addresses to appear (IPv6: SLAAC, IPv4: DHCP, slow) and that didn't work. # journalctl -b0 | grep -E "adding address|leased|Network is"
Dec 29 17:20:35 jade systemd[1]: Reached target network-online.target - Network is Online.
Dec 29 17:20:38 jade ifup[786]: eth0: adding address 2001:0DB8::1/64
Dec 29 17:20:42 jade ifup[786]: eth0: leased 192.0.2.2 for 1800 seconds
# networkctl list
systemd-networkd is not running, output might be incomplete.
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback - unmanaged
2 eth0 ether - unmanaged
TLDRAnyway try swapping to systemd-networkd. Worked for me after one single reboot 🤞 You may also want to make network-online wait for ipv4 and 6 to appear, if like my VPS your DHCPv4 is seconds slower. I didn't try without it, I'm done rebooting to test this for now. # systemctl edit systemd-networkd-wait-online.service[Service]
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online -4 -6 -i eth0Aftermath
(I don't see when systemd logs my IPv6 SLAAC address, but it also existed before 18:04:30) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have not been able to figure out how to get pasta to bind ports of containers on boot. Because I can just restart the container a short time later and it works, I assume pasta is not ready to bind ports when it does.
My setup:
Relevant error messages:
What can I do to address this? Should I be adding a wait period before starting? I did not have this issue when I was on Debian 12, podman version 4.3.1 (when the default network was slirp4netns), but I understand that it's because slirp4netns is slower than pasta, to the point that it can bind ports "on time", so to speak.
Beta Was this translation helpful? Give feedback.
All reactions