-
Notifications
You must be signed in to change notification settings - Fork 109
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
Electrum won't connect to EPS anymore #286
Comments
Update : I could get the logs from Electrum 230312T195427.831721Z | INFO | network | connecting to localhost:50002:s as new interface So the error comes from this certificate. Any ideas? |
You're probably using the default certificate, which just expired as they're 5 years old today:
It says: The solution to this issue is to simply generate a self-signed certificate for 5 more years. Here are the steps to do it, slightly changed from the official steps to match the default names: First, go to where you have the source code of this project, specifically to the certs folder(plus make a backup just in case):
And now simply generate your self-signed certificate there:
You can confirm that this certificate will be valid for 5 more years with this:
You can then install the certificates along with the application:
And now you should be able to connect. |
Thank you, issue solved. For the pip3, I had to execute it as "sudo pip3 install --user ." directly at the EPS folder level and not in the cert. folder. |
Followed commands from chris-belcher#286 (comment) $ openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 $ openssl rsa -passin pass:x -in server.pass.key -out server.key $ rm server.pass.key $ openssl req -new -key server.key -out server.csr $ openssl x509 -req -days 1825 -in server.csr -signkey server.key -out server.crt Signature ok subject=C = US, ST = California, L = Sunnydale, O = Buffy The Vampire Slayer, CN = electrum-server.tld $ openssl x509 -enddate -in server.crt notAfter=Mar 12 07:34:45 2028 GMT $ mv server.key cert.key $ mv server.crt cert.crt
Followed commands from chris-belcher#286 (comment) $ openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 $ openssl rsa -passin pass:x -in server.pass.key -out server.key $ rm server.pass.key $ openssl req -new -key server.key -out server.csr $ openssl x509 -req -days 1825 -in server.csr -signkey server.key -out server.crt Signature ok subject=C = US, ST = California, L = Sunnydale, O = Buffy The Vampire Slayer, CN = electrum-server.tld $ openssl x509 -enddate -in server.crt notAfter=Mar 12 07:34:45 2028 GMT $ mv server.key cert.key $ mv server.crt cert.crt Fix chris-belcher#287
could you possibly write this in 5 year old terms. Where do I put these codes in a command line or a text file? |
The error happens because a file included in this project, the certificate, is expired (they created it with a 5 year expiration date, 5 years ago). The file I'm talking about is found in your local copy at electrumpersonalserver/certs/cert.crt, or online at https://github.com/chris-belcher/electrum-personal-server/blob/master/electrumpersonalserver/certs/cert.crt To fix this, you need to generate a new certificate file valid for 5 more years (or wait until this repository is updated with a new certificate). So, to generate a new certificate, you need to have a system with openssl installed. I'm going to assume you're on Windows, but any other system with openssl installed would work. Probably the easiest way to get openssl in Windows is to have git installed and then open Git Bash from the "Start/Windows" menu. It will open a command line, this is where you need to write the following commands(EPS_PATH is the directory where you have the local copy of this repository, so change it to match your local path):
Copy and paste these lines, one by one, and check that there are no errors. At some point it will ask you some questions, either accept the defaults or write what you want. After that, your certificate file will be valid for 5 more years. Now you need to install the app to use this file. To do that, install as per the instructions:
And that should be it. |
@samontab |
Hello, pip3 install --user . ? Show Error ?Terminal:~ pip3 --version ~ pip3 install wheel - tried with that for second time but the same ~ pip3 install --user . Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Running setup.py install for electrum-personal-server did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. |
This line indicates there's an issue with the certificate permissions. Make sure those are set correctly, or try installing with sudo: |
sudo pip3 install --upgrade pip sudo pip3 install . The same error after the two lines. I do the steps from your post, can't understand why i have issue with certificate permissions. *Raspberry 4B + SSD boot Thank you for helping. I will keep trying. |
Made a file config.ini_sample and now - sudo pip3 install --user . - work, but the file is in root i need to be in home/pi sudo pip3 install --user . |
If this is all above my head will the github eventually get updated to include a working certificate? |
please guys if someone can help? i want to use EPS, i liked it, if i can't update the certs i will go to Fulcrum .. |
After many tries and errors i found a solution to my problem:
Now everything is fine for me, i hope that helps other people like me with this issue. I want to thank for the great work of the EPS developers, EPS is amazing! |
I was able to generate a new certificate and get EPS running again. |
Updating the certificate manually needs to be done by everyone using EPS today. But once they update the certificate this step won't be needed. There's already a pull request for it. |
Thanks for your helpful comments. How does this work if you're accessing the EPS through a separate computer? E.G. I have Bitcoin Core and EPS running on a Raspi, but Electrum Wallet is installed on a laptop which I used to connect to EPS on the Raspi in the past. I went through the new cert gen but still got the same error. Thanks in advance. |
@samontab thanks man! Much appreciated. Nice to see a connection again after so long. |
Related to your last question: I had to do the steps as mentions from samontab on Mar 16. The external Electrum-Wallet was in logging mode and showed me the ssl-cert-errors, also i restarted eps with new certs. i needed to chown certs to the user, that is running the service eps on server side (should be same like the old certs) and also delete ~/.electrum/certs/* on electrum-wallet side. after a while the electrum logs showed the successfull grab of the new certs and the wallet showed connection again. |
Hi guys, I struggled a lot to connect Electrum <-> EPS <-> Bitcoin Core, especially 'cause of the .cookie path, the certificat problem, the configuration of config.ini and the 127.0.0.1 cookie file of Electrum. There aren't lots of helps on Windows. That's why i've decided yesterday to do a full-explained tutorial on youtube, which explains everything: how to do, how to resolve all configuration problems, etc... Hope it gonna help the community. Bye 👋 |
@samontab - Thanks for putting this together, had the same issue and worked like a charm!! |
Within a day, Electrum is not connecting to EPS anymore. Bitcoin Core is fully synced, EPS is connected to Bitcoin Core, loads good, when broadcasting a transaction connected to the wallet, EPS shows it.
So error comes 100% from the Electrum side in my opinion. I saw a similar issue here. The user takes the logs of Electrum but I don't know how to do that on a Mac.
I did what Chris said here by typing network.debug = True. Now I don't know how to extract logs.
Thank you for help!
The text was updated successfully, but these errors were encountered: