mudler / mudler/LocalAI

Socket activation not working

Open
#12,024 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug unconfirmed
Dominant language
Go
Stars
49.2k
Forks
4.5k
Avg merge
1d 3m
Merged PRs (30d)
239

Description

LocalAI version:
commit 832123427517cfcf4b0a89c7c78081d053225942

Environment, CPU architecture, OS, and Version:
Linux flatwoody 7.2.2 #1-NixOS SMP PREEMPT_DYNAMIC Fri Aug 28 06:25:22 UTC 2026 x86_64 GNU/Linux

Describe the bug
Socket activation does not work , when I try to connect to the port it hangs indefinetly while the logs report it running

To Reproduce

; sc cat localai
# /etc/systemd/system/localai.service -> /nix/store/ymx5w27nhwdcmfpxpyvhdql98x74ah7p-unit-localai.service/localai.service
[Unit]

[Service]
Environment="DEBUG=true"
Environment="HSA_ENABLE_SDMA=0"
Environment="HSA_OVERRIDE_GFX_VERSION=11.5.1"
Environment="HSA_XNACK=1"
Environment="LOCALAI_WATCHDOG_IDLE=true"
Environment="LOCALAI_WATCHDOG_IDLE_TIMEOUT=1m"
Environment="LOCALE_ARCHIVE=/nix/store/l45fk7x6bk1qdjb1sy1xnynmhdf9g100-glibc-locales-2.42-84/lib/locale/locale-archive"
Environment="PATH=/nix/store/3qgy8q2j64v2m9jy3a5jmssacbblhd4r-coreutils-9.11/bin:/nix/store/i4kjidyvl8ciwbcwm75g75sriq3knav0-findutils-4.11.0/bin:/nix/store/yhr4ps9rdmb55pgqaq246vlh7xfac1dx-gnugrep-3.12/bin:/nix/store/4nylac9gazdpsid79qyk0jpqm312b2jx-gnused-4.10/bin:/nix/store/sm8d6jpilwdy3bw3yq2lv8rr8jld26pb-systemd-261.2/bin:/nix/store/3qgy8q2j64v2m9jy3a5jmssacbblhd4r-coreutils-9.11/sbin:/nix/store/i4kjidyvl8ciwbcwm75g75sriq3knav0-findutils-4.11.0/sbin:/nix/store/yhr4ps9rdmb55pgqaq246vlh7xfac1dx-gnugrep-3.12/sbin:/nix/store/4nylac9gazdpsid79qyk0jpqm312b2jx-gnused-4.10/sbin:/nix/store/sm8d6jpilwdy3bw3yq2lv8rr8jld26pb-systemd-261.2/sbin"
Environment="ROCBLAS_USE_HIPBLASLT=1"
Environment="TZDIR=/nix/store/p0ff33dca0fbkskqwrl3spvxcn5974h0-tzdata-2026c/share/zoneinfo"
CPUWeight=50
DynamicUser=true
ExecStart=/nix/store/7vnw3p4fq874mmjvmzh5hia198wcviwm-localai/bin/localai run
Group=render
OOMScoreAdjust=1000
Restart=no
StateDirectory=localai
SupplementaryGroups=video
WorkingDirectory=/var/lib/localai

# /nix/store/46gqwy3vik6iwppyzzvncy85hs5rigd6-system-units/service.d/mail.conf -> /nix/store/p2av62fdi2q4ys5a9xrr6f2ykf7fayfn-mail.conf/lib/systemd/system/service.d/mail.conf
[Unit]
OnFailure=unit-status-mail@%n.service

; sc cat localai.socket
# /etc/systemd/system/localai.socket -> /nix/store/iwlnvm6zfhmaa1aa258iq56jbavzb1jc-unit-localai.socket/localai.socket
[Unit]

[Socket]

ListenStream=11434


[Install]
WantedBy=sockets.target

Expected behavior
It answers connections

Logs

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the localai run entry point and the localai.service and localai.socket unit definitions shown in the report. Reproduce the hanging connection on Linux/NixOS and inspect the service logs and socket handoff. Done means socket activation starts LocalAI and connections to port 11434 receive responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux, nixos
Domain
backend, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.