balanceofsatoshis icon indicating copy to clipboard operation
balanceofsatoshis copied to clipboard

[telegram] HttpError: Network request for 'sendMessage' failed!

Open Impa10r opened this issue 1 year ago • 5 comments

I am running a testnet node in VirtualBox and quite often bos throws error: FetchError: request to https://api.telegram.org/bot 647...w/sendMessage failed, reason: read ECONNRESET

So bos restarts and I get 'Connected to ' message instead.

Manual ping and curl api.telegram.org never fail. Also, my mainnet node running on Umbrel does not experience this problem.

Not sure what is causing this. Maybe add a listener to this error and try re-sending the message at least once?

Impa10r avatar Oct 08 '23 18:10 Impa10r

I'm getting exactly this though it follows a change in my fiber network connection (switched from my own TP-Link gear back to my ISP's crappy Broadcom box). Having said that, other services I'm running on my network at home haven't failed in this way.

I'm running inside Docker

connecting_to_telegram:
  - v4vapp

is_connected: true

err:
  - 503
  - ErrorInBackupsSub
  -
    err:
      message: 14 UNAVAILABLE: read ECONNRESET
      stack:
        - Error: 14 UNAVAILABLE: read ECONNRESET
        -     at callErrorFromStatus (/app/node_modules/ln-service/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
        -     at Object.onReceiveStatus (/app/node_modules/ln-service/node_modules/@grpc/grpc-js/build/src/client.js:357:73)
        -     at Object.onReceiveStatus (/app/node_modules/ln-service/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
        -     at /app/node_modules/ln-service/node_modules/@grpc/grpc-js/build/src/resolving-call.js:99:78
        -     at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
        - for call at
        -     at ServiceClientImpl.makeServerStreamRequest (/app/node_modules/ln-service/node_modules/@grpc/grpc-js/build/src/client.js:340:32)
        -     at ServiceClientImpl.<anonymous> (/app/node_modules/ln-service/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
        -     at module.exports (/app/node_modules/ln-service/node_modules/lightning/lnd_methods/offchain/subscribe_to_backups.js:40:41)
        -     at /app/telegram/start_telegram_bot.js:572:23
        -     at /app/node_modules/async/internal/withoutIndex.js:8:40
        -     at eachOfArrayLike (/app/node_modules/async/eachOf.js:61:9)
        -     at eachOf (/app/node_modules/async/eachOf.js:181:12)
        -     at awaitable (/app/node_modules/async/internal/awaitify.js:13:28)
        -     at eachLimit (/app/node_modules/async/each.js:125:31)
        -     at awaitable (/app/node_modules/async/internal/awaitify.js:13:28)
        -     at asyncAuto.backups (/app/telegram/start_telegram_bot.js:570:16)
        -     at runTask (/app/node_modules/async/auto.js:293:13)
        -     at /app/node_modules/async/auto.js:233:31
        -     at processQueue (/app/node_modules/async/auto.js:243:13)
        -     at taskComplete (/app/node_modules/async/auto.js:259:9)
        -     at /app/node_modules/async/auto.js:286:17

connecting_to_telegram:
  - v4vapp

is_connected: true

logs are full of this.

Side note: it would be super helpful if message were time stamped! @alexbosworth

brianoflondon avatar Oct 25 '23 07:10 brianoflondon

Surprisingly, I stopped seeing these errors after torrifying bos telegram.

Impa10r avatar Oct 25 '23 17:10 Impa10r

Hmmmm you mean the setting for socket in credentials.json is via Tor?

brianoflondon avatar Oct 26 '23 07:10 brianoflondon

Yes. https://raspibolt.org/guide/bonus/lightning/balance-of-satoshis.html#tor-proxy-requires-v11501

Impa10r avatar Oct 26 '23 07:10 Impa10r

Thanks, interesting. I'm using BOS on a machine that isn't my node and connecting to a node which has a publicly accessible domain name so I'm not exactly sure how I could proxy.

But I am rebuilding my network at home and I have a feeling that factory resetting all my wifi extenders yesterday helped a lot with DNS stuff.

brianoflondon avatar Oct 26 '23 07:10 brianoflondon