Skip to content

GUI unusable due to CONNECTION_RESET errors #5829

@f-gdovin

Description

@f-gdovin

LocalAI version:
localai/localai@sha256:9aa689eb0e0ee67c4677ecbb2586fdc2b9ad7c6d5dd8357bfe329b42ad1fd453

Environment, CPU architecture, OS, and Version:
Linux NAS 6.8.0-60-generic #63~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 22 19:00:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug
GUI won't load completely / random parts of it are failing in Google Chrome

To Reproduce

  1. Run the following docker-compose setup:
  localai:
    container_name: localai
    image: localai/localai
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
      interval: 1m
      timeout: 20m
      retries: 5
    ports:
      - 8181:8080
    environment:
      - CORS=true
      - CORS_ALLOW_ORIGINS=*
      - OPENAI_API_KEY=${LOCALAI_API_KEY}
      - MODELS_PATH=/models
      - DISABLE_DOWNLOADS=true
    volumes:
      - ${DATADIR}/ai/models:/models
    networks:
      - traefik_public
  1. In newest Google Chrome, navigate to http://192.168.1.63:8181
    Immediately, I get:
This site can’t be reached
The connection was reset.
Image

Funny thing is, that hitting 'Reload' button on that The connection was reset. page always works and takes me to the LocalAI GUI, but the static files keep getting CONNECTIONRESET-ed no matter what I do, rendering the whole GUI unusable.

Image
  1. When I click on 'Models' in the UI, I get now-standard:
This site can’t be reached
The connection was reset.

but when I hit 'Reload', I get:

{
error: {
code: 431,
message: "Request Header Fields Too Large",
type: ""
}
}

Note that I do not have any extensions enabled but still, browser is to blame, as the static file gets served via Postman or via same Chrome's Incognito tab. I just cannot figure out what is wrong and it is weird that LocalAI provides no logs.

Expected behavior
GUI either loads completely and correctly, or at least I am given a clear message as to what is wrong

Logs

�
:
model name	: Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz

flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities

CPU:    AVX    found OK
CPU:    AVX2   found OK
CPU: no AVX512 found
2:08PM INF Setting logging to info
2:08PM INF Starting LocalAI using 4 threads, with models path: /models
2:08PM INF LocalAI version: v3.1.1 (cd2b0c0e7cfbbb55f1b4b6b2d4c76d2962bc8fc5)
2:08PM INF Preloading models from /models
  Model name: phi                                                             
  Model name: silero                                                          
  Model name: stablediffusion                                                 
  Model name: whisper                                                         
2:08PM INF core/startup process completed!
2:08PM INF LocalAI API is listening! Please connect to the endpoint for API documentation. endpoint=http://0.0.0.0:8080
2:09PM INF Success ip=192.168.1.195 latency="64.251µs" method=OPTIONS status=204 url=/v1/chat/completions
2:09PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
2:09PM ERR failed to install model "chat/phi/model.gguf" from gallery error="no model found with name \"chat/phi/model.gguf\""
2:09PM INF BackendLoader starting backend=llama-cpp modelID=phi o.model=chat/phi/model.gguf
2:09PM INF [llama-cpp] attempting to load with AVX2 variant
2:09PM INF Success ip=127.0.0.1 latency="33.673µs" method=GET status=200 url=/readyz
2:10PM INF Success ip=192.168.1.195 latency="44.424µs" method=OPTIONS status=204 url=/v1/chat/completions
2:10PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
2:10PM ERR failed to install model "chat/phi/model.gguf" from gallery error="no model found with name \"chat/phi/model.gguf\""

2:10PM INF Success ip=192.168.1.195 latency="41.311µs" method=OPTIONS status=204 url=/v1/models
2:10PM INF Success ip=192.168.1.195 latency="128.101µs" method=GET status=200 url=/v1/models
2:10PM INF Success ip=192.168.1.195 latency="150.192µs" method=GET status=200 url=/v1/models
2:10PM INF Success ip=192.168.1.195 latency="710.271µs" method=GET status=200 url=/
2:10PM INF Success ip=127.0.0.1 latency="13.945µs" method=GET status=200 url=/readyz
2:11PM INF Success ip=192.168.1.195 latency="31.181µs" method=OPTIONS status=204 url=/v1/models
2:11PM INF Success ip=192.168.1.195 latency="153.328µs" method=GET status=200 url=/v1/models
2:11PM INF Success ip=192.168.1.195 latency=473.287815ms method=GET status=200 url=/browse/
2:11PM INF Success ip=127.0.0.1 latency="14.842µs" method=GET status=200 url=/readyz
2:12PM INF Success ip=127.0.0.1 latency="40.581µs" method=GET status=200 url=/readyz
2:13PM INF Success ip=192.168.1.195 latency=3m47.941319179s method=POST status=200 url=/v1/chat/completions
2:13PM WRN GRPC Model not responding: rpc error: code = DeadlineExceeded desc = context deadline exceeded
2:13PM WRN Deleting the process in order to recreate it

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions