Error on HA Green

Open
#124 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
postgresql, python
Domain
backend

Research direction

Start with the startup path in keystone/cli.py, especially _run_daemon(), then inspect the timeout in keystone/app.py where runtime.start() waits for control-file setup. Reproduce on Home Assistant Green/aarch64 with PostgreSQL 17 and determine why that initialization exceeds its timeout. Done means Keystone starts successfully on that platform without the container exiting with TimeoutError.

Written by the indexing model from the issue text.

Description

needs-info

Hi,

When I start Keystone on my HomeAssistant Green, I get the following in the logs:

2026-12-04 17:18:39.172 GMT [16] LOG: starting PostgreSQL 17.12 (Debian 17.12-0+deb13u1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2026-12-04 17:18:39.173 GMT [16] LOG: listening on IPv4 address "0.0.0.0", port 5432
2026-12-04 17:18:39.173 GMT [16] LOG: listening on IPv6 address "::", port 5432
2026-12-04 17:18:39.176 GMT [16] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2026-12-04 17:18:39.186 GMT [20] LOG: database system was shut down at 2026-12-04 17:09:59 GMT
2026-12-04 17:18:39.203 GMT [16] LOG: database system is ready to accept connections
Traceback (most recent call last):
File "/usr/local/bin/keystone", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.12/site-packages/keystone/cli.py", line 719, in main
asyncio.run(_run_daemon(cfg))
File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/keystone/cli.py", line 56, in _run_daemon
await runtime.start()
File "/usr/local/lib/python3.12/site-packages/keystone/app.py", line 306, in start
control_fp, _ = await asyncio.to_thread(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: timed out
A process exited (status 1); stopping the container.
2026-12-04 17:18:54.008 GMT [16] LOG: received fast shutdown request
2026-12-04 17:18:54.011 GMT [16] LOG: aborting any active transactions
2026-12-04 17:18:54.021 GMT [16] LOG: background worker "logical replication launcher" (PID 23) exited with exit code 1
2026-12-04 17:18:54.026 GMT [18] LOG: shutting down
2026-12-04 17:18:54.028 GMT [18] LOG: checkpoint starting: shutdown immediate
2026-12-04 17:18:54.038 GMT [18] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.004 s, sync=0.002 s, total=0.013 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/19D5758, redo lsn=0/19D5758
2026-12-04 17:18:54.055 GMT [16] LOG: database system is shut down

Dominant language
Python
Stars
1k
Forks
114
Avg merge
1h
Merged PRs (30d)
115

Getting set up

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.

More from seeARMS/keystone

All issues in seeARMS/keystone

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.