HKUDS/nanobot · error · ConnectionRefusedError

signal-cli daemon not responding

Error message

signal-cli daemon not responding: {e}

What it means

Wrapper for any exception raised while probing the signal-cli daemon's /api/v1/check endpoint (connection refused, timeout, TLS error, etc.). It is re-raised as ConnectionRefusedError inside the _start_http_mode reconnect loop so transport-level failures are uniformly reported as 'daemon not responding'.

Solutions

  1. Confirm the signal-cli daemon (signal-cli-rest-api) is running and listening on the configured host/port
  2. Open firewall/port access from the bot to the daemon host
  3. Fix the daemon URL in the Signal channel configuration
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at nanobot/channels/signal/runtime.py:495 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/e46fe4cdafd91e38. Report an issue: GitHub.

Appendix: source

Thrown at nanobot/channels/signal/runtime.py:495

            try:
                self.logger.info("Connecting to signal-cli daemon at {}...", base_url)

                # Create HTTP client
                self._http = httpx.AsyncClient(
                    timeout=self._HTTP_TIMEOUT_SECONDS, base_url=base_url
                )

                # Test connection
                try:
                    response = await self._http.get("/api/v1/check")
                    if response.status_code == 200:
                        self.logger.info("Connected to signal-cli daemon")
                    else:
                        raise ConnectionRefusedError(
                            f"signal-cli daemon check returned status {response.status_code}"
                        )
                except Exception as e:
                    raise ConnectionRefusedError(f"signal-cli daemon not responding: {e}")

                # Reset reconnect delay after successful connection check.
                reconnect_delay_s = 1.0

                # Ensure account-level typing indicators are enabled.
                await self._ensure_typing_indicators_enabled()

                # Start SSE receiver and supervise it. If it exits while we're still
                # running, treat it as a disconnect and reconnect.
                self._sse_task = asyncio.create_task(self._sse_receive_loop())
                await self._sse_task
                if self._running:
                    raise ConnectionError("Signal SSE stream ended unexpectedly")

            except asyncio.CancelledError:
                break
            except ConnectionRefusedError as e:
                self.logger.error(

View on GitHub (pinned to 42f37dc4c0)