etkecc / baibot

🤖 A Matrix bot for using diffent capabilities (text-generation, text-to-speech, speech-to-text, image-generation, etc.) of AI / Large Language Models (OpenAI, Anthropic, etc.)
GNU Affero General Public License v3.0
48 stars 4 forks source link

Baibot stuck at recovering encryption key #3

Closed kitzler-walli closed 2 months ago

kitzler-walli commented 2 months ago

After the last fix I now tried again to enable baibot in my matrix ansible deployment and I am able to start baibot now, but it keeps getting timeouts to recover the m.secret_storage.default_key.

The login works but as soon as the container tried to retrieve or reset the keys it fails with timeouts.

Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.788785Z DEBUG ThreadId(01) login{method="identifier and password"}:with_store{user_id="@baibot:kw.at"}: matrix_sdk_crypto::machine: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-crypto-0.7.2/src/machine.rs:295: Created a new Olm account
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.788880Z DEBUG ThreadId(01) login{method="identifier and password"}:with_store{user_id="@baibot:kw.at"}: matrix_sdk_crypto::machine: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-crypto-0.7.2/src/machine.rs:311: Creating an empty cross signing identity stub
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.789057Z  INFO ThreadId(05) matrix_sdk::encryption::backups: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/encryption/backups/mod.rs:634: Setting up secret listeners and trying to resume backups
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.789426Z DEBUG ThreadId(01) login{method="identifier and password"}:keys_query{request_id="0be63b0841894bb0bd34083fae7e8b33" device_keys={"@baibot:kw.at": []}}:send{server_versions=[V1_0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8] config=RequestConfig { timeout: 30s } request_id="REQ-2" method=POST uri="https://matrix.kw.at/_matrix/client/v3/keys/query" request_size="36 B"}: matrix_sdk::http_client: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/http_client/mod.rs:176: Sending request
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.789631Z DEBUG ThreadId(08) hyper::client::connect::dns: /cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.30/src/client/connect/dns.rs:122: resolving host="matrix.kw.at"
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.789914Z  INFO ThreadId(02) matrix_sdk::encryption::recovery: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/encryption/recovery/mod.rs:433: Setting up account data listeners and trying to setup recovery
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.789961Z DEBUG ThreadId(02) send{server_versions=[V1_0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8] config=RequestConfig { timeout: 30s } request_id="REQ-3" method=GET uri="https://matrix.kw.at/_matrix/client/v3/user/@baibot:kw.at/account_data/m.secret_storage.default_key"}: matrix_sdk::http_client: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/http_client/mod.rs:176: Sending request
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.790099Z DEBUG ThreadId(07) hyper::client::connect::dns: /cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.30/src/client/connect/dns.rs:122: resolving host="matrix.kw.at"
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.790673Z DEBUG ThreadId(01) login{method="identifier and password"}:keys_query{request_id="0be63b0841894bb0bd34083fae7e8b33" device_keys={"@baibot:kw.at": []}}:send{server_versions=[V1_0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8] config=RequestConfig { timeout: 30s } request_id="REQ-2" method=POST uri="https://matrix.kw.at/_matrix/client/v3/keys/query" request_size="36 B"}: hyper::client::connect::http: /cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.30/src/client/connect/http.rs:542: connecting to 82.218.8.51:443
Sep 14 16:50:27 im matrix-bot-baibot[223884]: 2024-09-14T16:50:27.790859Z DEBUG ThreadId(02) send{server_versions=[V1_0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8] config=RequestConfig { timeout: 30s } request_id="REQ-3" method=GET uri="https://matrix.kw.at/_matrix/client/v3/user/@baibot:kw.at/account_data/m.secret_storage.default_key"}: hyper::client::connect::http: /cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.30/src/client/connect/http.rs:542: connecting to 82.218.8.51:443
Sep 14 16:50:57 im matrix-bot-baibot[223884]: 2024-09-14T16:50:57.790903Z DEBUG ThreadId(05) send{server_versions=[V1_0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8] config=RequestConfig { timeout: 30s } request_id="REQ-3" method=GET uri="https://matrix.kw.at/_matrix/client/v3/user/@baibot:kw.at/account_data/m.secret_storage.default_key"}: matrix_sdk::http_client: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/http_client/mod.rs:186: Error while sending request: Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("matrix.kw.at")), port: None, path: "/_matrix/client/v3/user/@baibot:kw.at/account_data/m.secret_storage.default_key", query: None, fragment: None }, source: TimedOut })
Sep 14 16:50:57 im matrix-bot-baibot[223884]: 2024-09-14T16:50:57.790903Z DEBUG ThreadId(01) login{method="identifier and password"}:keys_query{request_id="0be63b0841894bb0bd34083fae7e8b33" device_keys={"@baibot:kw.at": []}}:send{server_versions=[V1_0, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8] config=RequestConfig { timeout: 30s } request_id="REQ-2" method=POST uri="https://matrix.kw.at/_matrix/client/v3/keys/query" request_size="36 B"}: matrix_sdk::http_client: /cargo/registry/src/index.crates.io-6f17d22bba15001f/matrix-sdk-0.7.1/src/http_client/mod.rs:186: Error while sending request: Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("matrix.kw.at")), port: None, path: "/_matrix/client/v3/keys/query", query: None, fragment: None }, source: TimedOut })
spantaleev commented 2 months ago

Seems like a connectivity problem. Try launching a curl container in the same container network and see if you can reach these URLs via curl.

kitzler-walli commented 2 months ago

Sorry - I simply could have checked that myself - sorry for bothering you.