3

Following the answer on this post : Need some help understanding this "unexpected end of file" error from my node trying to connect on remote

TRACE tokio-runtime-worker sub-libp3p: Libp2p => Dialing(PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz"))    
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Reach failure for Some(PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz")) through "/ip4/<IP>/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz": Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Failed to reach PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz") through "/ip4/<IP>/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNPeQjpkZcf8xfQLfz": Pending connection: Transport error: upgrade apply error: unexpected end of file                           
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Reach failure for Some(PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz")) through "/ip4/<IP>/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz": Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Failed to reach PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz") through "/ip4/<IP>/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz": Pending connection: Transport error: upgrade apply error: unexpected end of file                           
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Reach failure for Some(PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz")) through "/ip4/<IP>/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz": Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Dial failure for PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz")                           
TRACE tokio-runtime-worker sub-libp2p: PSM <= Dropped(12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz, SetId(0))                           
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Failed to reach PeerId("12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz") through "/ip4/<IP>/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz": Pending connection: Transport error: upgrade apply error: unexpected end of file                           
TRACE tokio-runtime-worker sub-libp2p: PSM => Connect(12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz, SetId(0)): Will start to connect at until Instant { tv_sec: 2261, tv_nsec: 649712813 }            
TRACE tokio-runtime-worker sub-libp2p: Libp2p => Query for 0020fa47e52ff34a6141190c69d58229d541a72b2a4fe4ed428952b2e515764fd229 yielded 0 results   
                                                                                 

Context: I am trying to peer two nodes, one on a server behind an nginx reverse proxy, and one on my local machine. Enabling the debug messages I can see UnexpectedEof. I've tried removing the nginx proxy, and tried running it with the same raw chain spec.

EDIT #2 : I should mention that this error doesn't occur if both nodes are validators (i.e. running with --validator or having authority keys in their keystore). Only if one of the nodes happens to be not a validator, then I see this error.

6
  • It's best to explain your question fully and give context instead of just linking to another question or answer. Also consider a more descriptive title.
    – Dcompoze
    Apr 4, 2022 at 10:33
  • 1
    @DanielChmielewski I've added some context. Thanks for pointing it out. Apr 4, 2022 at 14:48
  • With a different chainspec, your node will reference a different keystore, did you configure both correctly? It is possible that the authority Role may play a factor, but not likely. github.com/paritytech/substrate/blob/master/client/service/src/… && github.com/paritytech/substrate/blob/master/client/network/src/…
    – Nuke
    Apr 5, 2022 at 2:30
  • might also be possible that the node is trying to source peerIDs from some incorrect file... might be worth checking what the node's IDs are and comparing to what is reported in the logs.
    – Nuke
    Apr 5, 2022 at 2:31
  • @DanShields I've checked that the peerIDs are correct, and explicitly using --node-key to specify a node key. Also it's weird if you look at my Edit #2, in which if I pass --validator flag, it magically peers which has me stumped as I cannot comprehend why would it make a difference. I am just using my remote instance as a sync node Apr 5, 2022 at 5:18

0

Browse other questions tagged or ask your own question.