mynodebtc/mynode

Gateway timeout when trying to rebalance

tensor5g opened this issue · 5 comments

Describe the bug
When trying to do a circular rebalance in RTL, it sometimes fails with this error:

<head><title>504 Gateway Time-out</title></head>
<body Bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.14.2</center>
</body>
</html>

I think it's supposed to display a real reason why it failed, but it's giving this error instead. This can probably be easily reproduced by attempting a rebalance that would obviously fail, like 100k with a 1 sat fixed fee. This happens on both http 3010 and https 3011.

Desktop (please complete the following information):

  • Browser Firefox

MyNode hardware (please complete the following information):

  • Device: VM
  • Version 0.3.17

Additional context
I also noticed RTL is a couple versions behind, v0.13.6 is the latest. It would also be nice if BoS was included in myNode, it appears to be a popular tool for rebalancing channels.

That seems like an RTL issue and I've never seen it before. You could check the RTL log when it happens to see if it offers any insight.

BoS is included. You can install it from the marketplace.

BoS is included. You can install it from the marketplace.

Thank you, didn't know that

You could check the RTL log

Where/how can I do that?

Logs are available on the status page.

I don't see an error, just this:

May 22 22:06:36 myNode rtl[10687]: [5/22/2023, 10:06:36 PM] INFO: Channels => Payment Sent.
May 22 22:06:34 myNode rtl[10687]: [5/22/2023, 10:06:34 PM] INFO: WebSocketClient => Invoice Info Received.
May 22 22:06:34 myNode rtl[10687]: [5/22/2023, 10:06:34 PM] INFO: WebSocketClient => Invoice Information Received for ****.

I feel like the reverse proxy myNode is using to connect to RTL is timing out before RTL can finish attempting to circular rebalance.
I added this

proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
send_timeout 300;

to rootfs/standard/etc/nginx/sites-enabled/https_rtl.conf and I am no longer getting the error. But sometimes the circular rebalance fails but it says succeeded anyways. I feel like it's failing far less frequently now, but I can't be sure. Either way it's weird that I never get a proper error message like I see in other documentation for RTL.

IIRC, proxy_read_timeout should be the only one required if the response is taking a long time. That does make sense why you would be seeing proxy errors if RTL is taking large amounts of time waiting on LND to respond. I'll update the NGINX config for RTL.