Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError: BrokenPipeError(32, 'Broken pipe') #102

Closed
FrankBouquet opened this issue Apr 13, 2019 · 17 comments
Closed

IOError: BrokenPipeError(32, 'Broken pipe') #102

FrankBouquet opened this issue Apr 13, 2019 · 17 comments

Comments

@FrankBouquet
Copy link

FrankBouquet commented Apr 13, 2019

Hello Chris,
Have installed EPS on my raspberry pi 2.
Running bitcoin full node with following config.
daemon=1 txindex=1 upnp=1 logips=1 maxconnections=40 maxuploadtarget=5000 dbcache=100 maxorphantx=10 maxmempool=50 proxy=127.0.0.1:9050 listen=1 bind=127.0.0.1 onlynet=onion server=1 rpcauth=bitcoin:random_string rpcauth=lightning:random_string rpcallowip=193.168.1.0/24 zmqpubrawblock=tcp://127.0.0.1:18501 zmqpubrawtx=tcp://127.0.0.1:18502

EPS config pretty much standard setting you have apart from my own watch address.

I connect to raspberry pi by creating ssh tunnel from my guest
ssh [email protected] -L 50002:localhost:50002
Then fire up electrum via command line
electrum --oneserver --server localhost:50002:s

In my EPS log I see
ERROR:2019-04-13 15:06:11,376: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:06:11,644: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:06:12,645: IOError: OSError(0, 'Error') INFO:2019-04-13 15:06:19,695: Electrum connected from ('127.0.0.1', 33446) ERROR:2019-04-13 15:06:55,674: IOError: BrokenPipeError(32, 'Broken pipe') ERROR:2019-04-13 15:06:55,947: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:06:56,215: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:06:57,366: IOError: OSError(0, 'Error') INFO:2019-04-13 15:07:00,242: Electrum connected from ('127.0.0.1', 33482) ERROR:2019-04-13 15:07:33,309: IOError: BrokenPipeError(32, 'Broken pipe') ERROR:2019-04-13 15:07:33,578: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:07:33,848: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:07:34,117: IOError: OSError(0, 'Error') INFO:2019-04-13 15:07:40,707: Electrum connected from ('127.0.0.1', 33518) ERROR:2019-04-13 15:08:14,234: IOError: BrokenPipeError(32, 'Broken pipe') ERROR:2019-04-13 15:08:14,504: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:08:14,772: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:08:18,644: IOError: OSError(0, 'Error') INFO:2019-04-13 15:08:21,259: Electrum connected from ('127.0.0.1', 33554) ERROR:2019-04-13 15:08:56,525: IOError: BrokenPipeError(32, 'Broken pipe') ERROR:2019-04-13 15:08:56,796: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:08:57,064: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:08:58,964: IOError: OSError(0, 'Error') INFO:2019-04-13 15:09:01,801: Electrum connected from ('127.0.0.1', 33590) ERROR:2019-04-13 15:09:36,450: IOError: BrokenPipeError(32, 'Broken pipe') ERROR:2019-04-13 15:09:36,719: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:09:36,987: IOError: OSError(0, 'Error') ERROR:2019-04-13 15:09:39,606: IOError: OSError(0, 'Error') INFO:2019-04-13 15:09:42,377: Electrum connected from ('127.0.0.1', 33626)
Electrum client connection status shows green for a second then is red for a a while then connects then disconnects.

I have sent btc to the wallet, but it doesn't seem to see (un)confirmed TXs

Can you help further?

@FrankBouquet
Copy link
Author

sorry, I tried to make formatting nice. After 3rd attempt I give up.

@chris-belcher
Copy link
Owner

chris-belcher commented Apr 13, 2019

Add -v to the electrum startup command to have it output some more debug information, and see if there's anything helpful in that information.

Also go to the Qt console and write network.debug = True then press enter, it should make Electrum output even more debug information which might be useful to figure out the cause.

Also have a look in the debug log (the filename of it is printed out near the beginning of Electrum Personal Server's output, in raspberry pi it should be /tmp/electrumpersonalserver.log). There might be interesting information there which helps us figure out why this is happening.

@FrankBouquet
Copy link
Author

FrankBouquet commented Apr 17, 2019

Hi Chris,
Thanks fore the reply.

Debug log from /tmp/electrumpersonalserver.log doesn't show too much, but i'll post it anyway, maybe you have a better understanding of it.

DEBUG:2019-04-17 21:10:21,304: => {"method": "server.donation_address", "params": [], "id": 98}
DEBUG:2019-04-17 21:10:21,306: <= {"jsonrpc": "2.0", "result": "#############################", "id": 98}
DEBUG:2019-04-17 21:10:21,307: => {"method": "server.peers.subscribe", "params": [], "id": 99}
DEBUG:2019-04-17 21:10:21,310: <= {"jsonrpc": "2.0", "result": [], "id": 99}
DEBUG:2019-04-17 21:10:21,311: => {"method": "mempool.get_fee_histogram", "params": [], "id": 100}
DEBUG:2019-04-17 21:11:06,016: <= {"jsonrpc": "2.0", "result": [[65.0, 120958], [59.0, 89246], [30.0, 121224], [16.0, 300642], [15.0, 74860], [14.0, 130979], [12.0, 168372], [10.0, 564679], [9.0, 1298151], [8.0, 136704], [7.0, 289416], [6.0, 968047], [5.0, 1203501], [4.0, 447811], [3.0, 424316], [2.0, 521907], [1.0, 992081], [0.0, 1929]], "id": 100}
DEBUG:2019-04-17 21:11:06,148: => {"method": "blockchain.estimatefee", "params": [25], "id": 101}
DEBUG:2019-04-17 21:11:06,193: <= {"jsonrpc": "2.0", "result": 0.00031166, "id": 101}
DEBUG:2019-04-17 21:11:06,194: => {"method": "blockchain.estimatefee", "params": [10], "id": 102}
DEBUG:2019-04-17 21:11:06,243: <= {"jsonrpc": "2.0", "result": 0.00050783, "id": 102}
DEBUG:2019-04-17 21:11:06,244: => {"method": "blockchain.estimatefee", "params": [5], "id": 103}
ERROR:2019-04-17 21:11:06,290: IOError: BrokenPipeError(32, 'Broken pipe')
ERROR:2019-04-17 21:11:06,561: IOError: OSError(0, 'Error')
ERROR:2019-04-17 21:11:06,831: IOError: OSError(0, 'Error')
ERROR:2019-04-17 21:11:07,284: IOError: OSError(0, 'Error')
ERROR:2019-04-17 21:11:08,885: IOError: OSError(0, 'Error')
INFO:2019-04-17 21:11:11,722: Electrum connected from ('127.0.0.1', 36302)
DEBUG:2019-04-17 21:11:11,754: => {"method": "server.version", "params": ["3.2.3", "1.2"], "id": 107}
DEBUG:2019-04-17 21:11:11,756: <= {"jsonrpc": "2.0", "result": ["ElectrumPersonalServer 0.1.6", 1.2], "id": 107}
DEBUG:2019-04-17 21:11:11,758: => {"method": "blockchain.headers.subscribe", "params": [true], "id": 108}
DEBUG:2019-04-17 21:11:11,759: are_headers_raw = True
`

When running electrum with `-v` and `network.debug = True`
` electrum --oneserver --server localhost:50002:s -v
[ecc] info: libsecp256k1 library not available, falling back to python-ecdsa. This means signing operations will be slower.
[SimpleConfig] electrum directory /home/frank/.electrum
[get_server] [Errno 111] Connection refused
[Plugins] registering hardware coldcard: ('hardware', 'coldcard', 'Coldcard Wallet')
[Plugins] registering hardware digitalbitbox: ('hardware', 'digitalbitbox', 'Digital Bitbox wallet')
[Plugins] registering hardware keepkey: ('hardware', 'keepkey', 'KeepKey wallet')
[Plugins] registering hardware ledger: ('hardware', 'ledger', 'Ledger wallet')
[Plugins] registering hardware safe_t: ('hardware', 'safe_t', 'Safe-T mini wallet')
[Plugins] registering hardware trezor: ('hardware', 'trezor', 'TREZOR wallet')
[Plugins] registering wallet type ('2fa', 'trustedcoin')
[profiler] Plugins.__init__ 0.0042
[Network] blockchains dict_keys([0])
[Network] starting network
[Network] connecting to localhost:50002:s as new interface
[FxThread] using exchange BitcoinAverage
[WalletStorage] wallet path /home/frank/.electrum/wallets/ledger
[Plugins] loaded ledger
[profiler] Standard_Wallet.load_transactions 0.0004
[profiler] Standard_Wallet.load_local_history 0.0001
[profiler] Standard_Wallet.check_history 0.0001
qt/history_list: could not import electrum.plot. This feature needs matplotlib to be installed.
[profiler] Standard_Wallet.get_full_history 0.0008
[profiler] Transaction.estimated_size 0.0000
[profiler] HistoryList.on_update 0.0074
[profiler] ElectrumWindow.load_wallet 0.0550
[DeviceMgr] getting client for keystore
[DeviceMgr] scanning devices...
[localhost] timeout
[profiler] Standard_Wallet.get_full_history 0.0009
[profiler] Transaction.estimated_size 0.0000
[profiler] HistoryList.on_update 0.0033
[Network] connecting to localhost:50002:s as new interface
[localhost] connected
[Network] switching to localhost:50002:s
[Network] sending subscriptions to localhost:50002:s 0 0
[SPV] requested merkle d630d3e45763d1129ae0b866791b274801479dd787564a67dc14a203ee4c29f1
[DeviceMgr] Registering <electrum.plugins.ledger.ledger.Ledger_Client object at 0x7fcb00097e48>
[DeviceMgr] end client for keystore
[localhost] timeout 49
[Network] connecting to localhost:50002:s as new interface
[localhost] timeout 50
[Network] connecting to localhost:50002:s as new interface
[localhost] timeout 51
etc...```

@chris-belcher
Copy link
Owner

Thanks for posting. I unfortunately don't know the cause. I'll try to think about it a bit more over the next few days.

@walletofsatoshi
Copy link

walletofsatoshi commented Apr 20, 2019

Same setup with raspiblitz. I can confirm the same, the txs are visible but unconfirmed The icon is green and is not disconnecting

@walletofsatoshi
Copy link

_histogram", "id": 116}
DEBUG:2019-04-21 00:19:32,990: <= {"result": [[10.0, 102565], [7.0, 3802736], [6.0, 85502], [5.0, 2517], [4.0, 3743], [3.0, 2554], [2.0, 2469]], "jsonrpc": "2.0", "id": 116}
DEBUG:2019-04-21 00:19:33,003: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 117, "params": [25]}
DEBUG:2019-04-21 00:19:33,024: <= {"result": 0.00015034, "jsonrpc": "2.0", "id": 117}
DEBUG:2019-04-21 00:19:33,025: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 118, "params": [10]}
DEBUG:2019-04-21 00:19:33,044: <= {"result": 0.0005077, "jsonrpc": "2.0", "id": 118}
DEBUG:2019-04-21 00:19:33,045: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 119, "params": [5]}
DEBUG:2019-04-21 00:19:33,066: <= {"result": 0.0005077, "jsonrpc": "2.0", "id": 119}
DEBUG:2019-04-21 00:19:33,067: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 120, "params": [2]}
DEBUG:2019-04-21 00:19:33,089: <= {"result": 0.00064711, "jsonrpc": "2.0", "id": 120}
DEBUG:2019-04-21 00:19:38,096: on heartbeat connected
DEBUG:2019-04-21 00:19:38,124: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:19:38,130: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:19:38,131: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:19:38,131: reorganizable_txes = []
DEBUG:2019-04-21 00:19:43,133: on heartbeat connected
DEBUG:2019-04-21 00:19:43,190: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:19:43,257: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:19:43,258: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:19:43,259: reorganizable_txes = []
DEBUG:2019-04-21 00:19:48,265: on heartbeat connected
DEBUG:2019-04-21 00:19:48,274: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:19:48,278: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:19:48,279: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:19:48,279: reorganizable_txes = []
DEBUG:2019-04-21 00:19:53,285: on heartbeat connected
DEBUG:2019-04-21 00:19:53,360: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:19:53,399: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:19:53,399: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:19:53,400: reorganizable_txes = []
DEBUG:2019-04-21 00:19:58,402: on heartbeat connected
DEBUG:2019-04-21 00:19:58,440: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:19:58,507: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:19:58,509: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:19:58,510: reorganizable_txes = []
DEBUG:2019-04-21 00:20:03,516: on heartbeat connected
DEBUG:2019-04-21 00:20:03,570: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:03,664: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:03,665: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:03,665: reorganizable_txes = []
DEBUG:2019-04-21 00:20:08,668: on heartbeat connected
DEBUG:2019-04-21 00:20:08,690: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:08,936: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:08,938: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:08,939: reorganizable_txes = []
DEBUG:2019-04-21 00:20:13,945: on heartbeat connected
DEBUG:2019-04-21 00:20:14,023: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:14,067: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:14,068: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:14,069: reorganizable_txes = []
DEBUG:2019-04-21 00:20:19,076: on heartbeat connected
DEBUG:2019-04-21 00:20:19,115: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:19,143: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:19,144: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:19,144: reorganizable_txes = []
DEBUG:2019-04-21 00:20:24,148: on heartbeat connected
DEBUG:2019-04-21 00:20:24,165: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:24,203: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:24,204: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:24,204: reorganizable_txes = []
DEBUG:2019-04-21 00:20:29,208: on heartbeat connected
DEBUG:2019-04-21 00:20:29,314: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:29,345: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:29,346: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:29,347: reorganizable_txes = []
DEBUG:2019-04-21 00:20:32,406: => {"jsonrpc": "2.0", "method": "mempool.get_fee_histogram", "id": 121}
DEBUG:2019-04-21 00:20:33,269: <= {"result": [[34.0, 100450], [7.0, 3883501], [6.0, 85951], [5.0, 2517], [4.0, 3743], [3.0, 2554], [2.0, 2469]], "jsonrpc": "2.0", "id": 121}
DEBUG:2019-04-21 00:20:33,281: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 122, "params": [25]}
DEBUG:2019-04-21 00:20:33,305: <= {"result": 0.00015034, "jsonrpc": "2.0", "id": 122}
DEBUG:2019-04-21 00:20:33,306: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 123, "params": [10]}
DEBUG:2019-04-21 00:20:33,330: <= {"result": 0.0005077, "jsonrpc": "2.0", "id": 123}
DEBUG:2019-04-21 00:20:33,331: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 124, "params": [5]}
DEBUG:2019-04-21 00:20:33,354: <= {"result": 0.0005077, "jsonrpc": "2.0", "id": 124}
DEBUG:2019-04-21 00:20:33,355: => {"jsonrpc": "2.0", "method": "blockchain.estimatefee", "id": 125, "params": [2]}
DEBUG:2019-04-21 00:20:33,378: <= {"result": 0.00064711, "jsonrpc": "2.0", "id": 125}
DEBUG:2019-04-21 00:20:38,384: on heartbeat connected
DEBUG:2019-04-21 00:20:38,431: listtransactions tx_request_count=2
DEBUG:2019-04-21 00:20:38,494: recent tx index = 0 ret = []
DEBUG:2019-04-21 00:20:38,495: check4con unconfirmed_txes = defaultdict(<class 'list'>, {})
DEBUG:2019-04-21 00:20:38,497: reorganizable_txes = []

@chris-belcher
Copy link
Owner

Same setup with raspiblitz. I can confirm the same, the txs are visible but unconfirmed The icon is green and is not disconnecting

This sounds like a different error. Do the transactions become confirmed if you restart EPS?

@walletofsatoshi
Copy link

I haven’t tried that. Do I restart raspi or just restart the server? What’s the script I should use to restart server without restarting raspi if that’s the case?

@chris-belcher
Copy link
Owner

Just restart Electrum Personal Server. I don't know how the raspblitz setup is, but if EPS is running in in its own screen terminal then you can do ctrl+c and then start it again. If its using systemd then you do a restart commend for that service (I don't know what that is, it should be on the web somewhere).

@chris-belcher
Copy link
Owner

I just realized: in case you're talking about the raspbolt setup (which is linked from this project's README) instead of raspblitz you should be able to restart EPS with sudo systemctl restart eps.service

@walletofsatoshi
Copy link

walletofsatoshi commented Apr 21, 2019

Yes raspiblitz is basically autorun installation version of raspibolt so this command line should work. Will try and keep you posted. Thanks

@walletofsatoshi
Copy link

I re-edited my config to match multi sig wallet as per instructions to see if it will resolve unconfirmed transactions. Now the log is stuck at mempool histogram and wallet is in synchronization stage forever and no transactions showing up

@walletofsatoshi
Copy link

walletofsatoshi commented Apr 23, 2019

Finally got it working. The key is waiting it out. Eventually it synced showed the balance but still may be optimized or just not suitable for raspi as it’s slow and making raspi slow and it drops connection after some time needing restart

@chris-belcher
Copy link
Owner

chris-belcher commented Apr 24, 2019

Are you saying the problem was because you configured multisig incorrectly?

That mempool problem is issue #96, there will be an option to disable the mempool histogram in the next release because with today's large mempools it causes slow response times on raspberry pis. You could try running from master branch if you don't want to wait until the release.

@walletofsatoshi
Copy link

walletofsatoshi commented Apr 24, 2019

Yes. It appears that the problem was related to configuring my multi signature wallet incorrectly in the config file. I edited it and restarted server and now it’s working like a charm. The mempool problem has also resolved I just waited out. Takes little more time to synchronize but that’s expected with small machine like raspi. I have tried new transactions too which are showing instantly. So far so great. I will keep you posted with any new issues.

@chris-belcher
Copy link
Owner

How exactly did you configure the multisig wallet incorrectly? Maybe there's a way it can be made clearer.

@walletofsatoshi
Copy link

walletofsatoshi commented Apr 25, 2019

I am using a 2/3 multi signature wallet so initially I put ‘3’ instead of ‘2’ and then three pubkeys in the multi signature wallet section of config file. I believe this was reason for my transactions showing as unconfirmed. Once corrected it, the wallet synced and showed by confirmed balance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants