searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.21k stars 290 forks source link

DNS resolution failure #139

Closed VorpalBlade closed 11 months ago

VorpalBlade commented 1 year ago

As of recently DNS resolution stopped working in my local searxng container. I'm using podman in non-privileged (user) mode.

From what I can tell the issue is that the resolv.conf is wrong inside the searxng container:

search dns.podman
nameserver 10.89.0.1

Where 10.89.0.1 doesn't actually reply to DNS:

$ podman exec -ti vorpal_searxng /bin/sh
# nslookup google.com
nslookup: write to '10.89.0.1': Connection refused
;; connection timed out; no servers could be reached

Here is the docker-compose.yml file I use to start the searxng container, I don't see any obvious issues:

version: '3.9'
services:
  searxng:
    image: docker.io/searxng/searxng
    # Plays poorly with user systemd service, disable it.
    #restart: unless-stopped
    ports:
      - 8080:8080
    volumes:
      - /home/user/containers/searxng/searxng:/etc/searxng:rw
    environment:
      - BASE_URL=http://localhost:8080/
      - INSTANCE_NAME=vorpal-searxng
      - SEARXNG_SECRET=REMOVED_FROM_THIS_BUG_REPORT
    container_name: vorpal_searxng

I then use a user systemd service to start this searxng instance when I log in:

podman generate systemd vorpal_searxng  > ~/.config/systemd/user/searxng_podman.service

However, even if I skip this step and start the container directly I run into the same issue. This started breaking about last week, though I initially worked around it by just adding 1.1.1.1 manually to resolv.conf inside the container. This does not persist across reboots however.

I'm unsure if this is a searxng or podman issue, but other podman user containers are not affected, using working nameservers in their resolv.conf files.

VorpalBlade commented 1 year ago

Apparently the config has changed in this repo since I set up the container many months ago. I cloned this repo and did a pristine setup. Same issue.

makingtheimpact commented 1 year ago

I have been having this same issue. Any fix for it yet?