Skip to content

Can't connect to Ollama on host #686

Done

Description

@i-bahnasy

I can query Ollama on the host successfully:

$ podman exec artex_artex_1 curl -X GET --connect-timeout 5 http://host.containers.internal:11434/api/tags
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   516  100   516    0     0   368k      0 --:--:-- --:--:-- --:--:--  503k
{"models":[{"name":"hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M","model":"hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M","modified_at":"2026-11-29T00:55:10.120702194+02:00","size":3413361985,"digest":"d31742299266cc8758092a5907bca52e823bb11e92db2e06ad1a0e7b46628159","details":{"parent_model":"","format":"gguf","family":"qwen35","families":["qwen35"],"parameter_size":"4.21B","quantization_level":"Q4_K_M","context_length":262144,"embedding_length":2560,"runner":"ggml"},"capabilities":["tools","thinking","completion","vision"]}]}

However if I set the same URL in the web interface to add LLM I get this error:

Screenshot From 2026-11-29 03-23-31

Activity

  1. github-actions commented on Nov 29, 2026

    @github-actions

    Thanks for the report — the curl output shows Ollama itself is reachable from the artex_artex_1 container, so this looks like an issue in how the web UI/API validates and stores the LLM endpoint. To triage it we're missing a few things, since the screenshot's error text isn't machine-readable here:

    • The exact error message shown in the UI (please paste it as text), and the corresponding server log lines at the same timestamp.
    • The URL string exactly as entered (scheme, trailing slash, /api suffix?) and which provider type you selected in the add-LLM form.
    • Artex version/commit (CHANGELOG.md or git rev-parse HEAD) and how it's deployed (podman-compose file used, host/container networking mode).
    • Whether the failing validation happens in the browser or server-side: the browser may not resolve host.containers.internal, which only exists inside the container network namespace.
    • Reproduction steps: fresh instance, add LLM with that URL, save → error.

    With that we can pin down whether it's URL validation, resolution from the wrong namespace, or a provider-specific check.


    🤖 automated reply from the repo bot. A human maintainer reads everything. Ping me in any comment with @artex-bot.

  2. added
    bug
    on Nov 29, 2026
  3. i-bahnasy commented on Nov 29, 2026

    @i-bahnasy
    Author

    I'm using local Ollama model.

    The error message: Failed to load models: endpoint URL host is now allowed

    $ git rev-parse HEAD
    becc47a58fa8859274a9fcd5cd9e599173f5445b
    
    [artex]    | 2026/11/29 01:28:09 INFO [config] snapshot {"version":"dev","config_file":"/app/config.json","config_file_found":false,"pg_dsn":"postgres://artex:xxxxx@postgres:5432/artex?sslmode=disable","pg_dsn_source":"environment variables ARTEX_PG_HOST/USER/PASSWORD/DBNAME","data_dir":"/app/data","skill_dir":"/app/skills","key_dir":"/app/keys","addr":":8787","proxy":":8788","noise_profile":"off","untrusted_boundary":true,"trusted_proxies":[]}
    [artex]    | 2026/11/29 01:28:09 [exec] agent processes run as uid 10001 gid 10001; the run directories under /app/data/tasks are shared with that group
    [artex]    | 2026/11/29 01:28:09 [isolation] self-test passed: agent processes and file tools run as the executor and cannot reach the server's secrets
    [artex]    | 2026/11/29 01:28:09 [pg] database config source: environment variables ARTEX_PG_HOST/USER/PASSWORD/DBNAME
    [artex]    | 2026/11/29 01:28:09 INFO [secrets] at-rest encryption ready backfilled_plaintext_values=0
    [artex]    | 2026/11/29 01:28:09 INFO [egress] noise profile active profile=off
    [artex]    | 2026/11/29 01:28:09 [traffic] recording proxy on :8788 (set HTTP_PROXY=http://127.0.0.1:8788 + trust _ca CA)
    [artex]    | time="2026-11-29T01:28:09Z" level=info msg="Proxy start listen at :8788\n"
    [artex]    | 2026/11/29 01:28:09 [mcp] browser MCP capture proxy configuration removed
    [artex]    | 2026/11/29 01:28:09 [engine] no LLM provider configured — engine idle until set via /api/llm or env
    [artex]    | 2026/11/29 01:28:09 [manager] reloaded 1 task(s) from PG
    [artex]    | 2026/11/29 01:28:09 INFO ARTEX backend listening version=dev addr=:8787 data=/app/data workers=3
    
  4. j-bill commented on Nov 29, 2026

    @j-bill

    update .env and restart the container, had the same issue yesterday

    ARTEX_LLM_PRIVATE_ENDPOINTS=host.docker.internal:11434

  5. i-bahnasy commented on Nov 29, 2026

    @i-bahnasy
    Author

    It's working now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions