No internet in the container

I have a Ubuntu container created, not I am trying to update the repository but it giving error ,failed to fetch the packages, where as there is internet connection in my installed browser.
36 Replies
Asterisk
Asterisk3y ago
what's the output of ping 1.1.1.1 and ping google.com in the container
Mrugendra Kulkarni
ping command not found
ping command not found
this is the output for install iputils-ping
Mrugendra Kulkarni
I have attached txt
Asterisk
Asterisk3y ago
I think something's wrong with the container's DNS resolver can you curl 1.1.1.1
Mrugendra Kulkarni
The same issue is happening for new container (ubuntu).Output for
ping google.com
ping google.com
ping: google.com: Name or service not known
ping: google.com: Name or service not known
ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=8.02 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=54 time=9.72 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=54 time=9.30 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=54 time=8.18 ms
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 8.021/8.805/9.722/0.721 ms
ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=54 time=8.02 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=54 time=9.72 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=54 time=9.30 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=54 time=8.18 ms
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 8.021/8.805/9.722/0.721 ms
Valkyrja
Valkyrja3y ago
@Mrugendra Kulkarni, you've gained the level 1
Asterisk
Asterisk3y ago
yup it's a DNS issue
Zephyr
Zephyr3y ago
Someone else had a similar issue recently, do you remember if/how they solved it?
Asterisk
Asterisk3y ago
can you show the container's /etc/resolv.conf?
Mrugendra Kulkarni
cat /etc/resolv.conf
# Generated by NetworkManager
cat /etc/resolv.conf
# Generated by NetworkManager
This is third time now third container
Asterisk
Asterisk3y ago
can you run nmtui in the container?
Mrugendra Kulkarni
Nope not found
Asterisk
Asterisk3y ago
and run resolvectl status
Mrugendra Kulkarni
sd_bus_open_system: No such file or directory
sd_bus_open_system: No such file or directory
Asterisk
Asterisk3y ago
damn run it on your host
Mrugendra Kulkarni
Getting some output different than above like link1, link2 etc
Asterisk
Asterisk3y ago
yeah send it
Mrugendra Kulkarni
Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1
Fallback DNS Servers: 1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net 8.8.8.8#dns.google
2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net
2001:4860:4860::8888#dns.google

Link 2 (wlp0s20f3)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1

Link 3 (waydroid0)
Current Scopes: LLMNR/IPv4 LLMNR/IPv6 mDNS/IPv4 mDNS/IPv6
Protocols: -DefaultRoute +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (vethS2mOWl)
Current Scopes: LLMNR/IPv6 mDNS/IPv6
Protocols: -DefaultRoute +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1
Fallback DNS Servers: 1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net 8.8.8.8#dns.google
2606:4700:4700::1111#cloudflare-dns.com 2620:fe::9#dns.quad9.net
2001:4860:4860::8888#dns.google

Link 2 (wlp0s20f3)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1

Link 3 (waydroid0)
Current Scopes: LLMNR/IPv4 LLMNR/IPv6 mDNS/IPv4 mDNS/IPv6
Protocols: -DefaultRoute +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 4 (vethS2mOWl)
Current Scopes: LLMNR/IPv6 mDNS/IPv6
Protocols: -DefaultRoute +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
Asterisk
Asterisk3y ago
so stuff on your main container works *your host
Mrugendra Kulkarni
Yes
Asterisk
Asterisk3y ago
yeah @Zephyr I can't find what they did
Zephyr
Zephyr3y ago
Did you try with a non-Ubuntu container? If not, can you?
Mrugendra Kulkarni
Sure Done ping is workin in arch container But now the problem is this
$ sudo pacman -Syy
bash: sudo: command not found
$ su
Password:
su: Authentication failure
[mrugendra@arch ~]$
$ sudo pacman -Syy
bash: sudo: command not found
$ su
Password:
su: Authentication failure
[mrugendra@arch ~]$
So now I have to install packages from terminal (host)? Output on host
$ sudo pacman.arch -Syy
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
$ sudo pacman.arch -Syy
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
Zephyr
Zephyr3y ago
Sudo not found on your arch container is..weird? You can use podman in host to check the logs of your Ubuntu and arch container to see if there are any issue maybe?
Mrugendra Kulkarni
How to do that? Please help me, I had created new debian container and at first it had internet access, but after restarting it was unable to connect.
Gris
Gris3y ago
I have the same problem here, did you find a solution?
Mrugendra Kulkarni
No bro not yet The internet is working fine in container but after a restart it just stop working
Zephyr
Zephyr3y ago
I haven't been able to recreate this issue, so all I can say is try to provide as many details as possible (especially podman logs for the container) Does it only happen to containers created prior to the current boot, or all containers? (if you create a new instance of the same distro that you can't get internet on, does it work in the new one?) Does it only work before the first time you restart blendOS, and then never again after that, or did it work for some restarts and then stop working?
Mrugendra Kulkarni
At the beginning, it works flawlessly, but after reboot it stops working, after creating new container, it also get same issue, can you send e docs for podman to get logs . Creating new container of same distro get internet at beginning but then same issue occurs ( sorry for my bad English)
Mrugendra Kulkarni
This is the output I am getting
No description
Mrugendra Kulkarni
Internet started working after kill and start of the container but why it is occurring at first ? UPDATE: Internet on the container is still not working, but after restarting them with podman, it works fine Why this is occurring ?
Zephyr
Zephyr3y ago
Interesting, good to know that restarting them with podman is a temporary fix, though 🤷‍♂️
Mrugendra Kulkarni
Yes but what should be permanent fix?
Zephyr
Zephyr3y ago
I don't know. I'll create an issue on the github for this if one doesn't exist, so we can track it, and figure out where the problem comes from. It could be a misconfiguration by blendOS, or simply a bug in podman container autostart behavior.
Mrugendra Kulkarni
Ok thanks
Zephyr
Zephyr3y ago
https://github.com/containers/podman/issues/8047 I'll check if the podman version running in blend has this issue fixed or not
GitHub
podman run --restart=always loses networking on restart · Issue #8...
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line) /kind bug Description When a restart policy to restart a container if it exits is applied (e.g. with podman run --restart=a...

Did you find this page helpful?