Connection Failure with Local Ollama Instance on Windows (HTTP 400 Bad Request)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Start by tracing the workspace model settings connection check and its backend request handling; the issue names the /dashboard/[REDACTED_WORKSPACE_ID]/workspace-settings/models page and Ollama’s 11434 endpoint, but does not identify source files or tests. Reproduce with a native Windows Ollama instance and inspect the request and returned error to determine why valid local connections produce HTTP 400. Done means the desktop app connects successfully to the configured Ollama instance without reporting a misleading Docker-host error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Connection Failure with Local Ollama Instance on Windows (HTTP 400 Bad Request)
Bug Report
Describe what happened:
When attempting to connect the Surfsense Windows standalone desktop application (.exe) to a locally running Ollama instance, the application consistently throws an HTTP 400 BAD_REQUEST error.
Even though the local Ollama instance is verified as fully functional—listening properly on all interfaces (0.0.0.0:11434 / [::]:11434), responding successfully via web browsers, and explicitly configured with unrestricted CORS (OLLAMA_ORIGINS="*")—the Surfsense executable fails to establish a connection.
The application prompts the user to use host.docker.internal, suggesting it might be executing within an isolated runtime environment (such as a hardcoded Docker-like container context or a tightly sandboxed Node.js environment) that cannot resolve the host system's loopback addresses (localhost or 127.0.0.1). Standard networking workarounds (e.g., mapping host.docker.internal via the Windows hosts file, using the machine's local network IPv4 address, or trying alternative API endpoints like /v1 or /api) do not bypass the error.
Steps to Reproduce:
- Start Ollama natively on Windows with environment variables set to:
OLLAMA_HOST=0.0.0.0OLLAMA_ORIGINS=*
- Confirm Ollama is running by accessing
[http://127.0.0.1:11434](http://127.0.0.1:11434)via a standard web browser (returns"Ollama is running"). - Open the Surfsense
.exeapplication and navigate to the Workspace Model Settings. - Attempt to configure the base URL using
http://localhost:11434,[http://127.0.0.1:11434](http://127.0.0.1:11434), or[http://host.docker.internal:11434](http://host.docker.internal:11434). - Observe the connection failure and the resulting HTTP 400 error screen.
Expected Behavior:
The desktop executable should be able to communicate directly with the host machine's loopback network interface or respect the system's DNS routing to connect to native backend servers running outside of a containerized ecosystem.
Diagnostics (auto-filled)
- Error code:
BAD_REQUEST - Request ID:
req_07853bf64ed4 - HTTP status: 400
- Message: All connection attempts failed. The backend is running inside Docker; localhost means the backend container. Use host.docker.internal and make sure the model server listens on 0.0.0.0.
- Timestamp: 2026-07-19T14:36:39.533Z
- Page:
/dashboard/[REDACTED_WORKSPACE_ID]/workspace-settings/models - User Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Additional Technical Context
Host System Environment (Ollama Server Status Log)
The backend server logs confirm that Ollama is initialized correctly with active GPU acceleration and open network bindings:
level=INFO source=routes.go:1947 msg="server config" env="map[... OLLAMA_HOST:http://0.0.0.0:11434 ... OLLAMA_ORIGINS:[* ...]]"
level=INFO source=routes.go:2004 msg="Listening on [::]:11434 (version 0.32.1)"
level=INFO source=types.go:32 msg="inference compute" id=0 library=CUDA name=CUDA0 description="NVIDIA GeForce RTX 5060 Laptop GPU"
Potential Causes for Investigation:
- Hardcoded Request Payloads: The
BAD_REQUEST(400) status implies that a network handshake is occurring, but the JSON payload or the specific endpoint path (e.g.,/api/chatvs/v1/chat/completions) expected by the standalone app's internal reverse proxy does not match Ollama's native routing layout. - Internal Network Bridging: The application package might be dropping network packets when traversing from its internal runtime layer out to the host Windows network stack, incorrectly falling back to the generic Docker error wrapper.
- Lingua principale
- Python
- Stelle
- 16.3k
- Fork
- 1.6k
- Merge medio
- 13h 35m
- PR unite (30g)
- 267
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MODSetter/SurfSense
-
Security Scan: stop flagging pinned hashes and test fixtures on release PRsForse già presa @karthikeya1220 l’ha presa 2 giorni fa. Apertacode quality security
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MODSetter/SurfSense#2225 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Check Apple notarization credentials on dry runs and weeklyForse già presa @Cedric921 l’ha presa 2 giorni fa. Apertadesktop
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MODSetter/SurfSense#2224 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Release workflow: keep the macOS certificate off the Windows dry-run buildForse già presa @Cedric921 l’ha presa 2 giorni fa. Apertadesktop security
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MODSetter/SurfSense#2223 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Write the ADR for chat modesForse già presa @Cedric921 l’ha presa 2 giorni fa. Apertaarchitecture desktop documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
MODSetter/SurfSense#2220 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MODSetter/SurfSense
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
lidofinance/diffyscan#239 ·
I maintainer di solito rispondono entro 1 giorno
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsApertaarea: tools documentation good first issue ready for a contributor
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
eyalgolan/statecraft-israel#873 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
GET rooms API returns 500 due to nonexistent Room.is_active attributeForse già presa @Mars-60 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Add cover art to song rowsApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 5 giorni
-
Harmony OPeNDAP SubSetter (HOSS) Geographic production rssmif16d 7 XYZ_PROV
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nasa/harmony-autotester#341 ·