hsjoberg / blixt-wallet

Bitcoin Lightning Wallet with focus on usability and user experience
https://blixtwallet.github.io
MIT License
386 stars 68 forks source link

TCP connection to own node immediately closed #333

Open kallerosenbaum opened 3 years ago

kallerosenbaum commented 3 years ago

I try to make Blixt use my own node to sync the blockchain. I have set my bitcoin-core node's host-name in the "Set Bitcoin Node" setting. The sync doesn't work (and the sync icon keeps flashing forever). For some reason I can't copy the log contents, so I attach a screenshot. Screenshot_20210605-160633

On the machine that hosts my bitcoin-core node (version 0.21.1 on linux) I ran tcpdump to analyze the traffic and this is what came out:

15:34:03.254757 IP 78.77.217.248.28686 > 192.168.1.3.8333: Flags [S], seq 4111735437, win 65535, options [mss 1400,sackOK,TS val 2990052500 ecr 0,nop,wscale 9], length 0
15:34:03.254771 IP 192.168.1.3.8333 > 78.77.217.248.28686: Flags [S.], seq 1666511756, ack 4111735438, win 65160, options [mss 1460,sackOK,TS val 3370750078 ecr 2990052500,nop,wscale 8], len
gth 0
15:34:03.282855 IP 78.77.217.248.28686 > 192.168.1.3.8333: Flags [.], ack 1, win 172, options [nop,nop,TS val 2990052546 ecr 3370750078], length 0
15:34:03.282874 IP 78.77.217.248.28686 > 192.168.1.3.8333: Flags [F.], seq 1, ack 1, win 172, options [nop,nop,TS val 2990052549 ecr 3370750078], length 0
15:34:03.284053 IP 192.168.1.3.8333 > 78.77.217.248.28686: Flags [F.], seq 1, ack 2, win 255, options [nop,nop,TS val 3370750107 ecr 2990052549], length 0
15:34:03.307658 IP 78.77.217.248.28686 > 192.168.1.3.8333: Flags [.], ack 2, win 172, options [nop,nop,TS val 2990052574 ecr 3370750107], length 0
15:34:08.295098 IP 78.77.217.248.28694 > 192.168.1.3.8333: Flags [S], seq 865056126, win 65535, options [mss 1400,sackOK,TS val 2990057550 ecr 0,nop,wscale 9], length 0
15:34:08.295118 IP 192.168.1.3.8333 > 78.77.217.248.28694: Flags [S.], seq 2048853047, ack 865056127, win 65160, options [mss 1460,sackOK,TS val 3370755118 ecr 2990057550,nop,wscale 8], length 0
15:34:08.322765 IP 78.77.217.248.28694 > 192.168.1.3.8333: Flags [.], ack 1, win 172, options [nop,nop,TS val 2990057587 ecr 3370755118], length 0
15:34:08.332372 IP 78.77.217.248.28694 > 192.168.1.3.8333: Flags [F.], seq 1, ack 1, win 172, options [nop,nop,TS val 2990057597 ecr 3370755118], length 0
15:34:08.332551 IP 192.168.1.3.8333 > 78.77.217.248.28694: Flags [F.], seq 1, ack 2, win 255, options [nop,nop,TS val 3370755155 ecr 2990057597], length 0
15:34:08.367927 IP 78.77.217.248.28694 > 192.168.1.3.8333: Flags [.], ack 2, win 172, options [nop,nop,TS val 2990057635 ecr 3370755155], length 0
15:34:13.354792 IP 78.77.217.248.28702 > 192.168.1.3.8333: Flags [S], seq 2054233143, win 65535, options [mss 1400,sackOK,TS val 2990062598 ecr 0,nop,wscale 9], length 0
15:34:13.354812 IP 192.168.1.3.8333 > 78.77.217.248.28702: Flags [S.], seq 2808821823, ack 2054233144, win 65160, options [mss 1460,sackOK,TS val 3370760178 ecr 2990062598,nop,wscale 8], length 0
15:34:13.383177 IP 78.77.217.248.28702 > 192.168.1.3.8333: Flags [.], ack 1, win 172, options [nop,nop,TS val 2990062646 ecr 3370760178], length 0
15:34:13.387907 IP 78.77.217.248.28702 > 192.168.1.3.8333: Flags [F.], seq 1, ack 1, win 172, options [nop,nop,TS val 2990062654 ecr 3370760178], length 0
15:34:13.388100 IP 192.168.1.3.8333 > 78.77.217.248.28702: Flags [F.], seq 1, ack 2, win 255, options [nop,nop,TS val 3370760211 ecr 2990062654], length 0
15:34:13.412853 IP 78.77.217.248.28702 > 192.168.1.3.8333: Flags [.], ack 2, win 172, options [nop,nop,TS val 2990062678 ecr 3370760211], length 0
15:34:18.434699 IP 78.77.217.248.28674 > 192.168.1.3.8333: Flags [S], seq 1810640528, win 65535, options [mss 1400,sackOK,TS val 2990067656 ecr 0,nop,wscale 9], length 0
15:34:18.434722 IP 192.168.1.3.8333 > 78.77.217.248.28674: Flags [S.], seq 2171119928, ack 1810640529, win 65160, options [mss 1460,sackOK,TS val 3370765257 ecr 2990067656,nop,wscale 8], length 0
15:34:18.463084 IP 78.77.217.248.28674 > 192.168.1.3.8333: Flags [.], ack 1, win 172, options [nop,nop,TS val 2990067727 ecr 3370765257], length 0
15:34:18.477708 IP 78.77.217.248.28674 > 192.168.1.3.8333: Flags [F.], seq 1, ack 1, win 172, options [nop,nop,TS val 2990067740 ecr 3370765257], length 0
15:34:18.477909 IP 192.168.1.3.8333 > 78.77.217.248.28674: Flags [F.], seq 1, ack 2, win 255, options [nop,nop,TS val 3370765301 ecr 2990067740], length 0
15:34:18.507813 IP 78.77.217.248.28674 > 192.168.1.3.8333: Flags [.], ack 2, win 172, options [nop,nop,TS val 2990067770 ecr 3370765301], length 0
15:34:23.484788 IP 78.77.217.248.28762 > 192.168.1.3.8333: Flags [S], seq 3752698832, win 65535, options [mss 1400,sackOK,TS val 2990072743 ecr 0,nop,wscale 9], length 0
15:34:23.484809 IP 192.168.1.3.8333 > 78.77.217.248.28762: Flags [S.], seq 2090869009, ack 3752698833, win 65160, options [mss 1460,sackOK,TS val 3370770307 ecr 2990072743,nop,wscale 8], length 0
15:34:23.594688 IP 78.77.217.248.28762 > 192.168.1.3.8333: Flags [.], ack 1, win 172, options [nop,nop,TS val 2990072805 ecr 3370770307], length 0
15:34:23.594711 IP 78.77.217.248.28762 > 192.168.1.3.8333: Flags [F.], seq 1, ack 1, win 172, options [nop,nop,TS val 2990072815 ecr 3370770307], length 0
15:34:23.595812 IP 192.168.1.3.8333 > 78.77.217.248.28762: Flags [F.], seq 1, ack 2, win 255, options [nop,nop,TS val 3370770418 ecr 2990072815], length 0
15:34:23.622953 IP 78.77.217.248.28762 > 192.168.1.3.8333: Flags [.], ack 2, win 172, options [nop,nop,TS val 2990072886 ecr 3370770418], length 0
... and so on every 5 seconds

Looking at the Flags, the following sequence is repeated every 5 seconds:

No bitcoin related packets, eg version, are sent. So the connection is established, but Blixt (or some intermediary networking device) immediately closes it every time.

I'm running Blixt 0.2.2 on Android. The bitcoin core node is configured with

server=1
listen=1
disablewallet=1
daemon=1
txindex=1
blockfilterindex=1
peerblockfilters=1

rpcuser=XXXXXX
rpcpassword=YYYYYYYYYYYYYYYYYY
alertnotify=ZZZZZZZZZZZZZZZZZZ
kallerosenbaum commented 3 years ago

Is there some way to increase log verbosity in Blixt?

kallerosenbaum commented 3 years ago

For some reason it started working. I have no idea what changed, I certainly didn't change anything.

@hsjoberg I don't know if we should close this or not. Should we keep it open a while in case it reappears, or close it now and reopen later if needed? You decide?