ERROR: [Errno -2] Name or service not known #1886

Closed
opened 2025-11-11 14:55:40 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @zubu007 on GitHub (Aug 26, 2024).

Bug Report

Installation Method

I cloned the git repo and edited the docker-compose.yaml file according to my needs and started with docker compose up

Environment

  • Open WebUI Version: latest from the git repo?

  • Operating System: Ubuntu 20.04

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

The app to start without any problems.

Actual Behavior:

The app shuts down and tries to restart in an infiniely loop. The main line of error is ERROR: [Errno -2] Name or service not known

Description

I am trying to get openwebui running on an apache 2.0 server on ubuntu. I have used reverse proxy to route the app from port 5173 to homepage. I would like to have the authentication use the SSO. So I have configured my side of the authentication as the authentication works for a different app.

To configure the authentication for openwebui, I am forwarding the X-forwarded-email and the X-forwarded-username according to the documentation in the docker-compose.yaml file. I am attaching the contents of the file below as well as the error.

The authentication is done by my university server so only the email and the username is sent to the openwebui and it should receive it without any problems.

Bug Summary:
I am unable to find the actual bug even with - 'GLOBAL_LOG_LEVEL=debug' in the yaml file.

Logs and Screenshots

Docker Container Logs:

open-webui  | Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
open-webui  | Loading WEBUI_SECRET_KEY from .webui_secret_key
open-webui  | /app
open-webui  | INFO:config:GLOBAL_LOG_LEVEL: DEBUG
open-webui  | INFO:config:AUDIO_LOG_LEVEL: DEBUG
open-webui  | INFO:config:COMFYUI_LOG_LEVEL: DEBUG
open-webui  | INFO:config:CONFIG_LOG_LEVEL: DEBUG
open-webui  | INFO:config:DB_LOG_LEVEL: DEBUG
open-webui  | INFO:config:IMAGES_LOG_LEVEL: DEBUG
open-webui  | INFO:config:MAIN_LOG_LEVEL: DEBUG
open-webui  | INFO:config:MODELS_LOG_LEVEL: DEBUG
open-webui  | INFO:config:OLLAMA_LOG_LEVEL: DEBUG
open-webui  | INFO:config:OPENAI_LOG_LEVEL: DEBUG
open-webui  | INFO:config:RAG_LOG_LEVEL: DEBUG
open-webui  | INFO:config:WEBHOOK_LOG_LEVEL: DEBUG
open-webui  | INFO:config:'DEFAULT_LOCALE' loaded from config.json
open-webui  | INFO:config:'DEFAULT_PROMPT_SUGGESTIONS' loaded from config.json
open-webui  | WARNING:config:
open-webui  |
open-webui  | WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
open-webui  |
open-webui  | INFO:config:Embedding model set: sentence-transformers/all-MiniLM-L6-v2
open-webui  | DEBUG:chromadb.config:Starting component System
open-webui  | DEBUG:chromadb.config:Starting component Posthog
open-webui  | DEBUG:chromadb.config:Starting component OpenTelemetryClient
open-webui  | DEBUG:chromadb.config:Starting component SqliteDB
open-webui  | DEBUG:chromadb.config:Starting component QuotaEnforcer
open-webui  | DEBUG:chromadb.config:Starting component LocalSegmentManager
open-webui  | DEBUG:chromadb.config:Starting component SegmentAPI
open-webui  | INFO:apps.webui.internal.wrappers:Connected to SQLite database
open-webui  | INFO:apps.webui.internal.db:Starting migrations
open-webui  | DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" INTEGER NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" DATETIME NOT NULL)', [])
open-webui  | DEBUG:peewee:('SELECT "t1"."id", "t1"."name", "t1"."migrated_at" FROM "migratehistory" AS "t1" ORDER BY "t1"."id"', [])
open-webui  | INFO:apps.webui.internal.db:There is nothing to migrate
open-webui  | DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'>
open-webui  | DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'>
open-webui  | DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'>
open-webui  | INFO:apps.audio.main:whisper_device_type: cpu
open-webui  | WARNING:langchain_community.utils.user_agent:USER_AGENT environment variable not set, consider setting it to identify your requests.
open-webui  | DEBUG:apps.rag.utils:model: sentence-transformers/all-MiniLM-L6-v2
open-webui  | DEBUG:apps.rag.utils:snapshot_kwargs: {'cache_dir': '/app/backend/data/cache/embedding/models', 'local_files_only': True}
open-webui  | DEBUG:apps.rag.utils:model_repo_path: /app/backend/data/cache/embedding/models/models--sentence-transformers--all-MiniLM-L6-v2/snapshots/8b3219a92973c328a8e22fadcfa821b5dc75636a
open-webui  | INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: /app/backend/data/cache/embedding/models/models--sentence-transformers--all-MiniLM-L6-v2/snapshots/8b3219a92973c328a8e22fadcfa821b5dc75636a
open-webui  | /usr/local/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
open-webui  |   warnings.warn(
open-webui  | INFO:     Started server process [1]
open-webui  | INFO:     Waiting for application startup.
open-webui  |
open-webui  |   ___                    __        __   _     _   _ ___
open-webui  |  / _ \ _ __   ___ _ __   \ \      / /__| |__ | | | |_ _|
open-webui  | | | | | '_ \ / _ \ '_ \   \ \ /\ / / _ \ '_ \| | | || |
open-webui  | | |_| | |_) |  __/ | | |   \ V  V /  __/ |_) | |_| || |
open-webui  |  \___/| .__/ \___|_| |_|    \_/\_/ \___|_.__/ \___/|___|
open-webui  |       |_|
open-webui  |
open-webui  |
open-webui  | v0.3.15 - building the best open-source AI user interface.
open-webui  |
open-webui  | https://github.com/open-webui/open-webui
open-webui  |
open-webui  | INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
open-webui  | INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
open-webui  | INFO:     Application startup complete.
open-webui  | ERROR:    [Errno -2] Name or service not known
open-webui  | INFO:     Waiting for application shutdown.
open-webui  | INFO:     Application shutdown complete.
open-webui exited with code 0

** docker-compose.yaml file

services:
  ollama:
    volumes:
      - ollama:/root/.ollama
    container_name: ollama
    pull_policy: always
    tty: true
    restart: unless-stopped
    image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}

  open-webui:
    build:
      context: .
      args:
        OLLAMA_BASE_URL: '/ollama'
      dockerfile: Dockerfile
    image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
    container_name: open-webui
    volumes:
      - open-webui:/app/backend/data
    depends_on:
      - ollama
    ports:
      - ${OPEN_WEBUI_PORT-3000}:8080
    environment:
      - 'OLLAMA_BASE_URL=http://ollama:11434'
      - 'WEBUI_SECRET_KEY='
      - 'OPENAI_API_BASE_URLS=http://lme49.cs.fau.de:5000/v1'
      - 'OPENAI_API_KEYS={Key}'
      - 'HOST=http://127.0.0.1'
      - 'WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-Forwarded-Email'
      - 'WEBUI_AUTH_TRUSTED_NAME_HEADER=X-Forwarded-User'
      - 'GLOBAL_LOG_LEVEL=debug'
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped

volumes:
  ollama: {}
  open-webui: {}

Screenshots/Screen Recordings (if applicable):
WhatsApp Image 2024-08-25 at 1 09 06 PM

Additional Information

The app works fine without the last 4 lines of the environment part of the yaml file. So I am guessing it is not handling the webui-auth well. There is no problem with sending the x-forwarded-email and x-forwarded-user as I have tried it with another app with accepts it without any problem.

If you need any more information let me know.

Originally created by @zubu007 on GitHub (Aug 26, 2024). # Bug Report ## Installation Method I cloned the git repo and edited the docker-compose.yaml file according to my needs and started with `docker compose up` ## Environment - **Open WebUI Version:** latest from the git repo? - **Operating System:** Ubuntu 20.04 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [x] I have included the Docker container logs. - [ ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: The app to start without any problems. ## Actual Behavior: The app shuts down and tries to restart in an infiniely loop. The main line of error is `ERROR: [Errno -2] Name or service not known` ## Description I am trying to get openwebui running on an apache 2.0 server on ubuntu. I have used reverse proxy to route the app from port 5173 to homepage. I would like to have the authentication use the SSO. So I have configured my side of the authentication as the authentication works for a different app. To configure the authentication for openwebui, I am forwarding the X-forwarded-email and the X-forwarded-username according to the documentation in the docker-compose.yaml file. I am attaching the contents of the file below as well as the error. The authentication is done by my university server so only the email and the username is sent to the openwebui and it should receive it without any problems. **Bug Summary:** I am unable to find the actual bug even with `- 'GLOBAL_LOG_LEVEL=debug'` in the yaml file. ## Logs and Screenshots **Docker Container Logs:** ``` open-webui | Loading WEBUI_SECRET_KEY from file, not provided as an environment variable. open-webui | Loading WEBUI_SECRET_KEY from .webui_secret_key open-webui | /app open-webui | INFO:config:GLOBAL_LOG_LEVEL: DEBUG open-webui | INFO:config:AUDIO_LOG_LEVEL: DEBUG open-webui | INFO:config:COMFYUI_LOG_LEVEL: DEBUG open-webui | INFO:config:CONFIG_LOG_LEVEL: DEBUG open-webui | INFO:config:DB_LOG_LEVEL: DEBUG open-webui | INFO:config:IMAGES_LOG_LEVEL: DEBUG open-webui | INFO:config:MAIN_LOG_LEVEL: DEBUG open-webui | INFO:config:MODELS_LOG_LEVEL: DEBUG open-webui | INFO:config:OLLAMA_LOG_LEVEL: DEBUG open-webui | INFO:config:OPENAI_LOG_LEVEL: DEBUG open-webui | INFO:config:RAG_LOG_LEVEL: DEBUG open-webui | INFO:config:WEBHOOK_LOG_LEVEL: DEBUG open-webui | INFO:config:'DEFAULT_LOCALE' loaded from config.json open-webui | INFO:config:'DEFAULT_PROMPT_SUGGESTIONS' loaded from config.json open-webui | WARNING:config: open-webui | open-webui | WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS. open-webui | open-webui | INFO:config:Embedding model set: sentence-transformers/all-MiniLM-L6-v2 open-webui | DEBUG:chromadb.config:Starting component System open-webui | DEBUG:chromadb.config:Starting component Posthog open-webui | DEBUG:chromadb.config:Starting component OpenTelemetryClient open-webui | DEBUG:chromadb.config:Starting component SqliteDB open-webui | DEBUG:chromadb.config:Starting component QuotaEnforcer open-webui | DEBUG:chromadb.config:Starting component LocalSegmentManager open-webui | DEBUG:chromadb.config:Starting component SegmentAPI open-webui | INFO:apps.webui.internal.wrappers:Connected to SQLite database open-webui | INFO:apps.webui.internal.db:Starting migrations open-webui | DEBUG:peewee:('CREATE TABLE IF NOT EXISTS "migratehistory" ("id" INTEGER NOT NULL PRIMARY KEY, "name" VARCHAR(255) NOT NULL, "migrated_at" DATETIME NOT NULL)', []) open-webui | DEBUG:peewee:('SELECT "t1"."id", "t1"."name", "t1"."migrated_at" FROM "migratehistory" AS "t1" ORDER BY "t1"."id"', []) open-webui | INFO:apps.webui.internal.db:There is nothing to migrate open-webui | DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'> open-webui | DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'> open-webui | DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'> open-webui | INFO:apps.audio.main:whisper_device_type: cpu open-webui | WARNING:langchain_community.utils.user_agent:USER_AGENT environment variable not set, consider setting it to identify your requests. open-webui | DEBUG:apps.rag.utils:model: sentence-transformers/all-MiniLM-L6-v2 open-webui | DEBUG:apps.rag.utils:snapshot_kwargs: {'cache_dir': '/app/backend/data/cache/embedding/models', 'local_files_only': True} open-webui | DEBUG:apps.rag.utils:model_repo_path: /app/backend/data/cache/embedding/models/models--sentence-transformers--all-MiniLM-L6-v2/snapshots/8b3219a92973c328a8e22fadcfa821b5dc75636a open-webui | INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: /app/backend/data/cache/embedding/models/models--sentence-transformers--all-MiniLM-L6-v2/snapshots/8b3219a92973c328a8e22fadcfa821b5dc75636a open-webui | /usr/local/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884 open-webui | warnings.warn( open-webui | INFO: Started server process [1] open-webui | INFO: Waiting for application startup. open-webui | open-webui | ___ __ __ _ _ _ ___ open-webui | / _ \ _ __ ___ _ __ \ \ / /__| |__ | | | |_ _| open-webui | | | | | '_ \ / _ \ '_ \ \ \ /\ / / _ \ '_ \| | | || | open-webui | | |_| | |_) | __/ | | | \ V V / __/ |_) | |_| || | open-webui | \___/| .__/ \___|_| |_| \_/\_/ \___|_.__/ \___/|___| open-webui | |_| open-webui | open-webui | open-webui | v0.3.15 - building the best open-source AI user interface. open-webui | open-webui | https://github.com/open-webui/open-webui open-webui | open-webui | INFO [alembic.runtime.migration] Context impl SQLiteImpl. open-webui | INFO [alembic.runtime.migration] Will assume non-transactional DDL. open-webui | INFO: Application startup complete. open-webui | ERROR: [Errno -2] Name or service not known open-webui | INFO: Waiting for application shutdown. open-webui | INFO: Application shutdown complete. open-webui exited with code 0 ``` ** docker-compose.yaml file ``` services: ollama: volumes: - ollama:/root/.ollama container_name: ollama pull_policy: always tty: true restart: unless-stopped image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest} open-webui: build: context: . args: OLLAMA_BASE_URL: '/ollama' dockerfile: Dockerfile image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main} container_name: open-webui volumes: - open-webui:/app/backend/data depends_on: - ollama ports: - ${OPEN_WEBUI_PORT-3000}:8080 environment: - 'OLLAMA_BASE_URL=http://ollama:11434' - 'WEBUI_SECRET_KEY=' - 'OPENAI_API_BASE_URLS=http://lme49.cs.fau.de:5000/v1' - 'OPENAI_API_KEYS={Key}' - 'HOST=http://127.0.0.1' - 'WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-Forwarded-Email' - 'WEBUI_AUTH_TRUSTED_NAME_HEADER=X-Forwarded-User' - 'GLOBAL_LOG_LEVEL=debug' extra_hosts: - host.docker.internal:host-gateway restart: unless-stopped volumes: ollama: {} open-webui: {} ``` **Screenshots/Screen Recordings (if applicable):** ![WhatsApp Image 2024-08-25 at 1 09 06 PM](https://github.com/user-attachments/assets/436b5dca-629f-4c0a-8bdc-2f62f881485c) ## Additional Information The app works fine without the last 4 lines of the environment part of the yaml file. So I am guessing it is not handling the webui-auth well. There is no problem with sending the x-forwarded-email and x-forwarded-user as I have tried it with another app with accepts it without any problem. If you need any more information let me know.
Author
Owner

@silentoplayz commented on GitHub (Aug 26, 2024):

@zubu007 Ignore the comments above at all costs. These are bot accounts attempting to spread some form of unwanted malware.

@silentoplayz commented on GitHub (Aug 26, 2024): @zubu007 Ignore the comments above at all costs. These are bot accounts attempting to spread some form of unwanted malware.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1886