nwithan8 / hassio-addons

8 stars 1 forks source link

Willow Autocorrect not starting up #5

Open jace opened 7 months ago

jace commented 7 months ago

I've installed both Willow Application Server and Willow Autocorrect as add-ons in HAOS on an RPi5. WAS works great. I'm getting (fairly) accurate voice recognition on an ESP32-S3-Box-3. However, Willow Autocorrect doesn't start. The log has:

Starting Willow Autocorrect...
Mapping persistent storage...
Setting TypeSense environment variables...
Parsing configuration options...
Writing Home Assistant configuration to .env file...
Launching Willow Autocorrect...
2024-02-07 20:18:30 INFO     Set log level DEBUG
[2024-02-07T20:18:30] INFO:     Started server process [11]
[2024-02-07T20:18:30] INFO:     Waiting for application startup.
2024-02-07 20:18:30 INFO     Starting Typesense
2024-02-07 20:18:30 INFO     Typesense started. Waiting for ready...
Log directory is configured as: /dev/shm
E20240207 20:18:30.962368   102 raft_server.cpp:613] Node not ready yet (known_applied_index is 0).
E20240207 20:18:30.962384   117 raft_server.h:62] Peer refresh failed, error: Doing another configuration change
2024-02-07 20:18:40 INFO     WAC collection 'commands' not found. Initializing with timeout 120 - please wait.
[2024-02-07T20:18:43] ERROR:    Traceback (most recent call last):
  File "/app/wac.py", line 277, in init_typesense
    typesense_client.collections[COLLECTION].retrieve()
  File "/usr/local/lib/python3.12/site-packages/typesense/collection.py", line 19, in retrieve
    return self.api_call.get(self._endpoint_path())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/typesense/api_call.py", line 146, in get
    return self.make_request(session.get, endpoint, as_json,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/typesense/api_call.py", line 116, in make_request
    raise ApiCall.get_exception(r.status_code)(r.status_code, error_message)
typesense.exceptions.ObjectNotFound: [Errno 404] Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 677, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 566, in __aenter__
    await self._router.startup()
  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 654, in startup
    await handler()
  File "/app/wac.py", line 295, in startup_event
    init_typesense()
  File "/app/wac.py", line 282, in init_typesense
    slow_typesense_client.collections.create(wac_commands_schema)
  File "/usr/local/lib/python3.12/site-packages/typesense/collections.py", line 18, in create
    return self.api_call.post(Collections.RESOURCE_PATH, schema)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/typesense/api_call.py", line 153, in post
    return self.make_request(session.post, endpoint, as_json,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/typesense/api_call.py", line 116, in make_request
    raise ApiCall.get_exception(r.status_code)(r.status_code, error_message)
typesense.exceptions.ObjectAlreadyExists: [Errno 409] A collection with name `commands` already exists.

[2024-02-07T20:18:43] ERROR:    Application startup failed. Exiting.

There's a related ticket at https://github.com/kovrom/willow-autocorrect/issues/1 but the discussion there doesn't help as there's no .env in the add-on. The YAML config has a single item for ha_token, which I've supplied — a new long-lived access token from HA's personal profile page.

Nmap shows these ports open (from several add-ons): 22, 53, 111, 139, 445, 1880, 1883, 1884, 3001, 4357, 5355, 5580, 6789, 7999, 8080, 8086, 8087, 8123, 8443, 8502, 8843, 8880, 9082, 9993.

jace commented 7 months ago

Also reported at https://github.com/toverainc/willow-autocorrect/issues/3

nwithan8 commented 7 months ago

https://github.com/toverainc/willow-autocorrect/issues/3#issuecomment-1933266677

stiltjack commented 7 months ago

Same error here.

Auto Correct 0.1.1.1

jace commented 7 months ago

Same error for me on release 0.1.1.1, the latest available (changelog date is 2024-02-07). I uninstalled and reinstalled to ensure a fresh build.