LNC connection fails: ServerHandshake times out waiting for Noise handshake Act 1 #1185
Replies: 6 comments
-
|
Thanks for the issue report! Would you be able to send the following:
Also, are you using a VPN/tor setup for either the client or the server? |
Beta Was this translation helpful? Give feedback.
-
|
Also, have you managed to get this client to work in any other LNC setup? |
Beta Was this translation helpful? Give feedback.
-
Here's the complete logs from server:- logs from the rust client:- client configs:- litd configs (running through docker):- Haven't tried with any other client or setup. |
Beta Was this translation helpful? Give feedback.
-
|
Would it be possible for you to test another client that is known to be working on the client side, such as https://terminal.lightning.engineering/ or the example from https://github.com/lightninglabs/lightning-node-connect/ (by running The goal would be to know if the issue is in your setup, or at client implementation. Lets test that first, and let me know if that's working or not. |
Beta Was this translation helpful? Give feedback.
-
|
litd works fine with web clients, but do you have any backend LNC client implementation (preferably in Rust) I can reference while building my own version? |
Beta Was this translation helpful? Give feedback.
-
Ok thanks for testing! As this is not a bug in LNC per say then, I'll go ahead and covert this issue into a discussion. Unfortunately, we do not have any such implementation. The good thing with that though is that your contribution there will be really valuable 🙏! I recommend you to look into how it's implemented in the LNC repo. Specifically look at these files: Then I'd recommend to you study how it's been wrapped in the wasm implementation here: And how the example implementation uses that wasm implemenation: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
litd'sServerHandshake()sets a 5-second read deadline but never receives Act 1 from the client. The connection closes after ~5.6 seconds without processing the Noise handshake. The client sends Act 1 immediately after GoBN handshake completes, but the server never logsGot expected data 0, suggesting Act 1 is not reaching the server's GoBN layer.Expected behavior
Actual behavior
ServerHandshake()is called and sets a 5-second read deadlineGot expected data 0log)To reproduce
Start
litdwith debug logging enabled:Create a new LNC session via gRPC (
/litrpc.Sessions/AddSession)Attempt to connect my Rust LNC client (https://github.com/DhananjayPurohit/l402_middleware/tree/feat/lnc-support) to the mailbox server using the session's pairing phrase
Observe the connection handshake sequence - connection fails after GoBN handshake completes
System information
Standalone application (Docker container)
lnd-mode: remotefaraday-mode: not specified (default)loop-mode: not specified (default)pool-mode: not specified (default)lightninglabs/lightning-terminal:v0.16.0-alphaHost OS: WSL2 Ubuntu (Windows 10)
Container OS: Linux (Alpine-based Docker image)
Additional context:
mailbox.terminal.lightning.today:443Server logs:
Client logs:
Timeline:
08:43:23.485-ServerHandshake()starts, sets 5-second read deadline08:43:28.485- Server sends PING packet - 5.0s after start (timeout)08:43:29.116- Server receives ACK for ping08:43:29.125- Connection closes - 5.64s after startGot expected data 0log - Act 1 never received by serverIssue analysis:
Act 1 is sent by the client but never received by the server's GoBN layer (no
Got expected data 0log). The server'sServerHandshake()times out after 5 seconds waiting for Act 1, then closes the connection. The expected flow:ServerHandshake()→ sets 5s deadline → callsDoHandshake()DoHandshake()→readMsgPattern()→connKit.Read()→ReceiveControlMsg()→gbnConn.Recv()recvDataChan→ logGot expected data 0Beta Was this translation helpful? Give feedback.
All reactions