Author

Topic: Help with electrs (romanz) (Read 282 times)

hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
September 02, 2022, 03:29:39 PM
#13
Interesting!  Now I feel like I'm going crazy.  I created a desktop shortcut with the command you suggested, and that works just fine.  Now, even if I don't use that shortcut and set the server details manually the client is connecting.  These are the same details I had in the network settings before, but they didn't work, now they are?

Anyway, the issue is now resolved, but I wish I was able to find the root cause.

It might be that you fired up Electrum with
Code:
electrum --oneserver --server 127.0.0.1:50001
or used
Code:
127.0.0.1:50001
in the Electrum network setting and I believe that Electrum then silently only tries an encrypted connection with SSL which your electrs was not prepared for.

You might consider one day to try Fulcrum electrum server, much faster than electrs and it can handle large address histories way better than electrs ever could. It's downside is: slower at initial sync of its indexes, but that you only need to wait for once, while you can enjoy the speed multiple times.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
September 01, 2022, 11:23:08 AM
#12
Code:
InvalidData on first line may indicate client attempted to connect using SSL when server expects unencrypted communication.

Although this was asked before, I'll come back to this. Are you sure you use a command line like

Code:
electrum --oneserver --server 127.0.0.1:50001:t
..or whatever your IP is?

You are comparing ElectrumX you said it's configured for SSL with Electrs that seems to be asking for non-SSL connection. The command line of the two must differ.
I use Electrs locally without SSL and my config looks pretty much similar with yours (just I use cookie for accessing Bitcoin Core).

Interesting!  Now I feel like I'm going crazy.  I created a desktop shortcut with the command you suggested, and that works just fine.  Now, even if I don't use that shortcut and set the server details manually the client is connecting.  These are the same details I had in the network settings before, but they didn't work, now they are?

Anyway, the issue is now resolved, but I wish I was able to find the root cause.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
September 01, 2022, 10:52:12 AM
#11
Code:
InvalidData on first line may indicate client attempted to connect using SSL when server expects unencrypted communication.

Although this was asked before, I'll come back to this. Are you sure you use a command line like

Code:
electrum --oneserver --server 127.0.0.1:50001:t
..or whatever your IP is?

You are comparing ElectrumX you said it's configured for SSL with Electrs that seems to be asking for non-SSL connection. The command line of the two must differ.
I use Electrs locally without SSL and my config looks pretty much similar with yours (just I use cookie for accessing Bitcoin Core).
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
September 01, 2022, 10:25:01 AM
#10
Update:

So I wasn't able to get Electrum client to connect to Electrs, but I'm still having no trouble connecting to ElectrumX which is running on a different server.  I am able to connect Sparrow wallet to both servers.  Both servers are identical with exception that the one I have Electrs on has an i7 processor while the ElectrumX server is equipped with an i5.  Both have 16GB of ram, and running Ubuntu Server 22.04.1.

Here's the log I get from Electrs when I try to connect my Electrum client:

Code:
InvalidData on first line may indicate client attempted to connect using SSL when server expects unencrypted communication.
recv_loop thread failed: 71: recv failed
because: stream did not contain valid UTF-8

Based on this information and the fact that Sparrow wallet can connect to my Electrs server makes me think it might be the client side.  Apparently the client is expecting a SSL encrypted connection, which I didn't think was a necessity.  I purged the Electrs server and tried Umbrel (I'm sold, by the way,) and I'm getting the same results.  The log from Umbrel shows the exact same errors when attempting to connect my Electrum client.

I searched github for similar issues, but didn't find anything that specifically relates to Electrs/Electrum.

Any suggestions will be appreciated.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
August 30, 2022, 06:36:34 AM
#9
Code:
electrum_rpc_addr = "127.0.0.1:50001"

Wait, I didn't hear you talked about any reverse proxy-ing. How do you set up the tunnelling process for port 50001? Do you run it via Nginx or something?

If you didn't run any reverse proxy, that RPC is only accessible in the device, not on LAN. You can directly use electrum_rpc_addr = "0.0.0.0:50001" config, to make the port exposed on LAN but it's not recommended.

Refer to https://raspibolt.org/guide/bitcoin/electrum-server.html#firewall--reverse-proxy or https://github.com/romanz/electrs/blob/master/doc/config.md#ssl-connection.

No, I didn't install Nginx or any other web server, and I don't have a reverse proxy set up.  I guess I just expected Electrs to work similarly to ElectrumX server without any additional proxy settings.  I also have a self-signed ssl certificate that I use with ElectrunX, but while reading the docs I noticed that Electrs needs Nginx to enable ssl connections.

Anyway, thanks for your comments.  You just gave me one more thing to try before I give up completely and install Umbrel.  Undecided

legendary
Activity: 1932
Merit: 1273
August 30, 2022, 12:18:14 AM
#8
Code:
electrum_rpc_addr = "127.0.0.1:50001"

Wait, I didn't hear you talked about any reverse proxy-ing. How do you set up the tunnelling process for port 50001? Do you run it via Nginx or something?

If you didn't run any reverse proxy, that RPC is only accessible in the device, not on LAN. You can directly use electrum_rpc_addr = "0.0.0.0:50001" config, to make the port exposed on LAN but it's not recommended.

Refer to https://raspibolt.org/guide/bitcoin/electrum-server.html#firewall--reverse-proxy or https://github.com/romanz/electrs/blob/master/doc/config.md#ssl-connection.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
August 29, 2022, 12:20:53 PM
#7
Finally got back to this project (briefly) over the weekend, and made some progress.  I re-compiled Electrs, this time with static link to the database, and figured I'd enable Prometheus even though I have no plans to use it for monitoring.  I know I shouldn't change too many things at once if I want to find the root cause of my issues, but I'm not sure either of those settings had anything to do with my problem.

There is progress, however:  I still cannot connect to Electrs over LAN, but I can through Tor.  This makes me think NotAThether is on the right track:

It is almost definitely related to your firewall.

I can't help but agree at this point.

You should allow all outbound traffic, as it's common for software to open temporary ports, and it might not be able to send anything to you. Alternatively, just whitelist your IP address in the firewall if that's possible.

So, I tried disabling UFW all together, but the issue is still persistent.  What could be causing my outbound traffic to be blocked?


ETA: Figured I dump this recent log entry here, even though I don't see anything concerning:

Code:
Aug 29 15:30:06  electrs[951]: [2022-08-29T22:30:06.947Z DEBUG electrs::p2p] got 0 new headers
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.947Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawmempool []
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.952Z DEBUG electrs::mempool] loading 416 mempool transactions
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.953Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["07e3bc92af092d07c048e0869faed7bf262f9ebebc547a2c78879cb8edc29b3d",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.953Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["504763fc8292effe05d35533c093ea6072a1eb9f783d58727902517aed0bd114",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.953Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["a3dbe06bf83b73b956e94a030eceb52424c6cb0dbe89d614839de53732358112",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.953Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["038f27d76686d60a23b2dd388bce1b4b1eb890677d973d390f93d0733d820d93",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.955Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["a3dbe06bf83b73b956e94a030eceb52424c6cb0dbe89d614839de53732358112"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.957Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["67912e69b63df613e735d725fe7b0c1e8b5a46015ac73e0653c8b239bc4281ed",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.963Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["67912e69b63df613e735d725fe7b0c1e8b5a46015ac73e0653c8b239bc4281ed"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.965Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["82a7ca92163874e96af142dc6ca6d5af915f33f5de88859555576cc40869ed5f",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.966Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["82a7ca92163874e96af142dc6ca6d5af915f33f5de88859555576cc40869ed5f"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.967Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["caf69bf692bfcf61cf8c5f781828d62078297173ad5d1d9023f3f46720610db7",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.974Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["caf69bf692bfcf61cf8c5f781828d62078297173ad5d1d9023f3f46720610db7"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.975Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["f2419d360af96cacf761376d26f9737c8004a6a9c0153abb5125ab27d260304e",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.976Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["f2419d360af96cacf761376d26f9737c8004a6a9c0153abb5125ab27d260304e"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.977Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["61339062c5c1af55d3903c0d697e56298373c35d1d9162dccf7d00144f4e630d",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.979Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["61339062c5c1af55d3903c0d697e56298373c35d1d9162dccf7d00144f4e630d"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.980Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["c916f4a8684e3040f63603ecfb9cc7a64e0632f4d8dc57c394d94ec458456df8",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.981Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["c916f4a8684e3040f63603ecfb9cc7a64e0632f4d8dc57c394d94ec458456df8"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.983Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["f0776f134b7b823aaa76ab2bfff8b3449fb60357fba129885309aa298dcac685",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.984Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["f0776f134b7b823aaa76ab2bfff8b3449fb60357fba129885309aa298dcac685"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.985Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["99ab7e3c85626c71207a8fb322d2338810d75fb6af6516ec148203cb6f8d21e9",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.987Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["99ab7e3c85626c71207a8fb322d2338810d75fb6af6516ec148203cb6f8d21e9"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.988Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["3c801521efd8a2b2734ff1ec20a963936c566a4a4326afc311a990845738c08a",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.990Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["3c801521efd8a2b2734ff1ec20a963936c566a4a4326afc311a990845738c08a"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.991Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["7e48ef78dfa7cf4d7f9011227677bfa17413129eab258ce4f337caf018ba22f6",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.993Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["7e48ef78dfa7cf4d7f9011227677bfa17413129eab258ce4f337caf018ba22f6"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.994Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["518df40e3b91a6a34290b63373e6ad1e0079c1652e8582aa89ffadc639789f6f",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.995Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["518df40e3b91a6a34290b63373e6ad1e0079c1652e8582aa89ffadc639789f6f"]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.996Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["646cccdba45b7f2bee730340accfce1ff84075ce596ddd34e0d9d38d6d1a6eec",false]
Aug 29 15:30:06 electrs[951]: [2022-08-29T22:30:06.998Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["646cccdba45b7f2bee730340accfce1ff84075ce596ddd34e0d9d38d6d1a6eec"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.001Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["504763fc8292effe05d35533c093ea6072a1eb9f783d58727902517aed0bd114"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.001Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["07e3bc92af092d07c048e0869faed7bf262f9ebebc547a2c78879cb8edc29b3d"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.001Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["038f27d76686d60a23b2dd388bce1b4b1eb890677d973d390f93d0733d820d93"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.002Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["fe0d8881b8f7f14531df84498dc34c2cfb9ac1287f7e9b7ddba73a791a5db5b4",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.003Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["f6cfc19ce584f9c215ff7c0fb32f13aeecae54908d71c53a10315607f0314d09",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.004Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["e8a5b714859edf19e0d75ffea6da675a7409e858c677d2e4455ccedecf0f2f46",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.005Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["fe0d8881b8f7f14531df84498dc34c2cfb9ac1287f7e9b7ddba73a791a5db5b4"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.005Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["4af384514bbe9fc9fe0180e5437cfe9741beadd64f1b80995a7d36449692ff50",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.006Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["e8a5b714859edf19e0d75ffea6da675a7409e858c677d2e4455ccedecf0f2f46"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.007Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["3e03ee89a17ba174129307650b2d8cd9d322ce7789958fea979901711b7c5821",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.008Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["489e2c5842bedf36621d0d1d26b146e5820fc133945b9f53065b2666996f3644",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.008Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["4af384514bbe9fc9fe0180e5437cfe9741beadd64f1b80995a7d36449692ff50"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.009Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["489e2c5842bedf36621d0d1d26b146e5820fc133945b9f53065b2666996f3644"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.010Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["3e03ee89a17ba174129307650b2d8cd9d322ce7789958fea979901711b7c5821"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.010Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["30acfe93cf208a180fc11df5e294bb44f039bab410d6bb0763a7bdf4bb193b6d",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.011Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["c776975f7d11aa6a4da6bdfd7fe1193928604ad40d51ecceb1d86e50f12aa885",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.012Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["36889e2eb929f53526928a876dc682ec8f178dc3b6efe0518aadabd5ecd98d2a",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.013Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["c776975f7d11aa6a4da6bdfd7fe1193928604ad40d51ecceb1d86e50f12aa885"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.014Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["36889e2eb929f53526928a876dc682ec8f178dc3b6efe0518aadabd5ecd98d2a"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.015Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["a4c3e4f43099ad98fd0d3b02cbcb5fed001bb62b7eb310de34b7fca34981d99d",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.015Z DEBUG bitcoincore_rpc] JSON-RPC request: getrawtransaction ["cc0ab5528289711e1d25e6a2dc138174c9ac201b06dfe81c9ea1e4ce332b09c9",false]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.016Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["a4c3e4f43099ad98fd0d3b02cbcb5fed001bb62b7eb310de34b7fca34981d99d"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.017Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["cc0ab5528289711e1d25e6a2dc138174c9ac201b06dfe81c9ea1e4ce332b09c9"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.053Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["f6cfc19ce584f9c215ff7c0fb32f13aeecae54908d71c53a10315607f0314d09"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.057Z DEBUG bitcoincore_rpc] JSON-RPC request: getmempoolentry ["30acfe93cf208a180fc11df5e294bb44f039bab410d6bb0763a7bdf4bb193b6d"]
Aug 29 15:30:07 electrs[951]: [2022-08-29T22:30:07.060Z DEBUG electrs::mempool] 416 mempool txs: 27 added, 0 removed
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
August 07, 2022, 07:42:45 AM
#6
Are you sure you use
Code:
50001:t
on client side, not ssl?
The problem is in connection to VPS only, or using localhost it does not work too?
Did you try to connect using Electrum or other software, like Trezor Suite or RPC browser?
Yes, I use Electrum client, but I don't get how the "t" after the port is supposed to help.  I tried it anyway, but no change.

It basically force Electrum to connect to your server using TCP (not encrypted) connection. Have you setup SSL connection for your electrs[1] since Elecrtum only use SSL connection by default[2].

[1] https://github.com/romanz/electrs/blob/v0.9.8/doc/config.md#ssl-connection
[2] https://electrum.readthedocs.io/en/latest/faq.html?highlight=ssl#i-might-run-my-own-server-are-client-server-connections-authenticated
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
August 08, 2022, 05:06:56 PM
#6
From the local machine can you telnet to 127.0.0.1 on port 50001?
There may or may not be a response, but it still should connect.
If you try to telnet on port 50002 it should not connect.

If you can connect from the local PC can you connect to it's IP on 50001 on a different PC on the network?

-Dave
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
August 05, 2022, 03:54:45 PM
#5
Unfortunately (or fortunately) I haven't had time to sit in front of the computer much this last weekend, or this week.  Too busy with other fun projects, some of them outdoors!

You should try to raise the electrs log level into DEBUG, and also pull up the log from the client app.

I'll give that a shot, thanks for the suggestion.

Are you sure you use
Code:
50001:t
on client side, not ssl?
The problem is in connection to VPS only, or using localhost it does not work too?
Did you try to connect using Electrum or other software, like Trezor Suite or RPC browser?

Yes, I use Electrum client, but I don't get how the "t" after the port is supposed to help.  I tried it anyway, but no change.

It is almost definitely related to your firewall.

You should allow all outbound traffic, as it's common for software to open temporary ports, and it might not be able to send anything to you. Alternatively, just whitelist your IP address in the firewall if that's possible.

Tried to disable the firewall all together, it doesn't seem to make a difference.  That wouldn't really sit well with me anyway; when I set up a remote server I would want to use UFW and whitelist my IP for port 22.  Call me paranoid.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
August 03, 2022, 11:30:08 PM
#4
It is almost definitely related to your firewall.

You should allow all outbound traffic, as it's common for software to open temporary ports, and it might not be able to send anything to you. Alternatively, just whitelist your IP address in the firewall if that's possible.
legendary
Activity: 952
Merit: 1385
August 01, 2022, 05:59:06 AM
#3
Are you sure you use
Code:
50001:t
on client side, not ssl?
The problem is in connection to VPS only, or using localhost it does not work too?
Did you try to connect using Electrum or other software, like Trezor Suite or RPC browser?
legendary
Activity: 1932
Merit: 1273
July 31, 2022, 09:52:31 PM
#2
You should try to raise the electrs log level into DEBUG, and also pull up the log from the client app.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
July 31, 2022, 08:20:18 PM
#1
I'm planning on setting up a dedicated steel server some time in the next few months, but before I subscribe to a service I want to experiment with the optimal configuration.  I've been running electrumx for a couple of years now, but that's always been on my own local hardware.  I want to use electrs on the VPS since it has a smaller footprint.

So, I just compiled and installed electrs Electrum Server on a small pc, but it won't accept a connection from the client.  I'm hoping another set of eyes (or twenty) will be able to point out my issue.  The system.slice is loaded and active, and the electrs database is caught up to the current block height.  Everything on the server side seems fine, but I have no monitoring turned on, and I did not compile electrs with Prometheus enabled.  That last bit might be something worth doing for a dedicated server...

Anyway, if you guys can help figure out what I'm doing wrong I would appreciate it.

Rig: i5, 16gb ram
OS: Ubuntu Server 22.04
Bitcoin Core: 23.0
UFW enabled, port 50001 open

system.slice:
Code:
direwolf@:~$ sudo systemctl status electrs.service
● electrs.service - Electrs
     Loaded: loaded (/etc/systemd/system/electrs.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-07-31 13:13:24 PDT; 4h 40min ago
   Main PID: 22195 (electrs)
      Tasks: 14 (limit: 18999)
     Memory: 5.8G
        CPU: 4h 28min 19.688s
     CGroup: /system.slice/electrs.service
             └─22195 /usr/local/bin/electrs/electrs --conf /etc/electrs.toml

Jul 31 16:48:35 electrs[22195]: [2022-07-31T23:48:35.371Z INFO  electrs::db] starting spending compaction
Jul 31 17:07:11 electrs[22195]: [2022-08-01T00:07:11.927Z INFO  electrs::db] finished full compaction
Jul 31 17:07:22 electrs[22195]: [2022-08-01T00:07:22.707Z INFO  electrs::index] indexing 5 blocks: [747424..747428]
Jul 31 17:07:22 electrs[22195]: [2022-08-01T00:07:22.746Z INFO  electrs::chain] chain updated: tip=0000000000000000000102ee34134eb3e00b8167fbf111f46af1a9c8c33c7709, height=747428
Jul 31 17:14:04 electrs[22195]: [2022-08-01T00:14:04.985Z INFO  electrs::index] indexing 1 blocks: [747429..747429]
Jul 31 17:14:05 electrs[22195]: [2022-08-01T00:14:05.037Z INFO  electrs::chain] chain updated: tip=0000000000000000000538eb4cf7e4bf5d127bfac7a110c59310e49f9195b6bf, height=747429
Jul 31 17:16:55 electrs[22195]: [2022-08-01T00:16:55.695Z INFO  electrs::index] indexing 1 blocks: [747430..747430]
Jul 31 17:16:55 electrs[22195]: [2022-08-01T00:16:55.719Z INFO  electrs::chain] chain updated: tip=00000000000000000002a41cba7cf1c6332d722759bcae2d0cc7798613536a02, height=747430
Jul 31 17:47:09 electrs[22195]: [2022-08-01T00:47:09.559Z INFO  electrs::index] indexing 1 blocks: [747431..747431]
Jul 31 17:47:09 electrs[22195]: [2022-08-01T00:47:09.611Z INFO  electrs::chain] chain updated: tip=000000000000000000054d287d33b81dc818103e9473f5d21e86c0c24fcb00ef, height=747431

My electrs configuration file:
Code:
daemon_p2p_addr = "127.0.0.1:8333"
daemon_rpc_addr = "127.0.0.1:8332"
auth = ":"
daemon_dir = "/var/lib/bitcoind"
db_dir = "/var/lib/electrs"
network = "bitcoin"
electrum_rpc_addr = "127.0.0.1:50001"
log_filters = "INFO"
Jump to: