Bitcoin Forum
December 11, 2016, 06:06:23 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 »  All
  Print  
Author Topic: Electrum server discussion thread  (Read 51343 times)
Lexiko
Sr. Member
****
Offline Offline

Activity: 358


View Profile
April 17, 2015, 12:48:51 PM
 #281

Hi! Does anybody have any working sample of using Electrum RPC daemon using curl?

I'm trying to use such request (this was taken from bitcoind rpc server sample):

Code:
curl --data-binary '{ "id": 0, "method": "server.version", "params": [ "1.9.5", "0.6" ] }'  -H 'content-type: text/plain;' http://127.0.0.1:8000/

... but as a result I have an answer:

Code:
<value><string>&lt;class 'xml.parsers.expat.ExpatError'&gt;:not well-formed (invalid token): line 1, column 0</string></value>

1481436383
Hero Member
*
Offline Offline

Posts: 1481436383

View Profile Personal Message (Offline)

Ignore
1481436383
Reply with quote  #2

1481436383
Report to moderator
1481436383
Hero Member
*
Offline Offline

Posts: 1481436383

View Profile Personal Message (Offline)

Ignore
1481436383
Reply with quote  #2

1481436383
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481436383
Hero Member
*
Offline Offline

Posts: 1481436383

View Profile Personal Message (Offline)

Ignore
1481436383
Reply with quote  #2

1481436383
Report to moderator
fex
Full Member
***
Offline Offline

Activity: 145


View Profile
April 27, 2015, 09:19:40 PM
 #282

Now if I try "sudo electrum-server getinfo" the electrum-server process blocks and nothing happens. The log does not show anything. Process cpu usage is at ~100%.

Any suggestions on how to debug this?
@fex,

The electrum-server DB has to catch-up.  It isn't a verbose process but seeing the CPU usage will assure you it is working.  The log will only update after passing every 1000 blocks.  Note it can take an hour or two to catch-up just 10-12 hours (on a modern CPU with an SSD).

Yes, I found this to be the case, but there was another thing.

I finally had some time to look into the problem: there were too many files open. I did change the limit for this in /etc/security/limits.conf as described on github, however, two things to note:

1. If you put an entry like "<bitcoinuser> hard nofile 65536" in limits.conf, it will only work if <bitcoinuser> is really logged in. It does not work (at least on Ubuntu 14.10) when another user account loggs in and then uses "su" to get into the <bitcoinuser> account. This might be a problem when using "electrum-server" binary as it seems to use "su". To solve this, I added limits.conf-entries for the "really logged in" user account that starts the "electrum-server" binary.

Maybe this information could be added to the readme on Github somehow.

2. The error indicating that too many files were open was burried under a stack trace that I got when I was running run_electrum_server directly (instead of "electrum-server start"). It did not show up in the log file.



Regards,

Felix
ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
April 28, 2015, 07:30:20 AM
 #283

It happens a lot that my server (electrum.0x0000.de) gets kicked from the list.

I'm thinking it might be because it takes quite a while for it to digest new blocks and it's marked as "lagging".

Is that possible?

No, a server does not get kicked because it is lagging.
It happens because your database is corrupted, and your server fails to produce the correct root hash.

database corruption may occur if you do not shutdown your server cleanly.

Electrum: the convenience of a web wallet, without the risks
molecular
Donator
Legendary
*
Offline Offline

Activity: 2142



View Profile
April 29, 2015, 04:17:10 PM
 #284

It happens a lot that my server (electrum.0x0000.de) gets kicked from the list.

I'm thinking it might be because it takes quite a while for it to digest new blocks and it's marked as "lagging".

Is that possible?

No, a server does not get kicked because it is lagging.
It happens because your database is corrupted, and your server fails to produce the correct root hash.

database corruption may occur if you do not shutdown your server cleanly.

Well, it's on and off the list without me doing anything.

If the root hash is wrong, is the db automatically repaired or something?

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
JWU42
Legendary
*
Offline Offline

Activity: 1484


View Profile
April 30, 2015, 09:10:44 PM
 #285


If the root hash is wrong, is the db automatically repaired or something?


Nope, need to download a new version from the foundry (http://foundry.electrum.org/leveldb-dump/).  I wouldn't suggest building a new one as it will take over a month (I know, doing it now)

GPG PubKey | THREEMA | OTC | HeatWare | 1JWU42QLGFESoQCC4iPzUDTRiC9nx5bi95
molecular
Donator
Legendary
*
Offline Offline

Activity: 2142



View Profile
May 31, 2015, 06:57:53 AM
 #286

just pulled newest master from https://github.com/spesmilo/electrum-server.git

Not sure if It's new, but I'm seeing this in the log:

Code:
INFO:electrum:joining IRC
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/home/nick/electrum-server/src/ircthread.py", line 118, in run
    client = irc.client.Reactor()
AttributeError: 'module' object has no attribute 'Reactor'

my wild guess: my python-irclib is outdated? I'm on debian:

Code:
user@null:~/electrum-server$ apt-cache show python-irclib
Package: python-irclib
Version: 0.4.8-1

EDIT: problem now obsolete. I had to migrate to a different server (now ssd ;-) for harddrive failure reasons and the problem doesn't occur there. I also again have more than 10 session. I guess my irc stuff was borked all along.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
ozboy2014
Hero Member
*****
Offline Offline

Activity: 630



View Profile
June 01, 2015, 08:19:28 AM
 #287

Hi, can you please take a look and assist if you can. Thanks.

https://bitcointalk.org/index.php?topic=1053864.msg11494471#msg11494471
JWU42
Legendary
*
Offline Offline

Activity: 1484


View Profile
June 01, 2015, 10:42:11 AM
 #288

Hi, can you please take a look and assist if you can. Thanks.

https://bitcointalk.org/index.php?topic=1053864.msg11494471#msg11494471

Electrum for DOGE?!?


GPG PubKey | THREEMA | OTC | HeatWare | 1JWU42QLGFESoQCC4iPzUDTRiC9nx5bi95
Dogedarkdev
Hero Member
*****
Offline Offline

Activity: 812


$XVG - The Standard in Privacy Based Crypto


View Profile WWW
June 01, 2015, 04:40:36 PM
 #289


DOGED*

the client is complete, we are just having some issues with the back end (electrum server)

https://bitcointalk.org/index.php?topic=1053864.msg11504413#msg11504413

_///// [XVG] ★★★★★WE ARE ON  THE VERGE ★★★★★ [MULTI-ALGO] /////_
_///// TOR // I2P // LINUX . WINDOWS . MAC . ANDROID . ELECTRUM . WEBWALLET . GITHUB // WEBSITE // RADIO // IRC /////_
jadedjack
Member
**
Offline Offline

Activity: 65


View Profile
June 05, 2015, 04:32:46 AM
 #290

Now if I try "sudo electrum-server getinfo" the electrum-server process blocks and nothing happens. The log does not show anything. Process cpu usage is at ~100%.

Any suggestions on how to debug this?
@fex,

The electrum-server DB has to catch-up.  It isn't a verbose process but seeing the CPU usage will assure you it is working.  The log will only update after passing every 1000 blocks.  Note it can take an hour or two to catch-up just 10-12 hours (on a modern CPU with an SSD).

Yes, I found this to be the case, but there was another thing.

I finally had some time to look into the problem: there were too many files open. I did change the limit for this in /etc/security/limits.conf as described on github, however, two things to note:

1. If you put an entry like "<bitcoinuser> hard nofile 65536" in limits.conf, it will only work if <bitcoinuser> is really logged in. It does not work (at least on Ubuntu 14.10) when another user account loggs in and then uses "su" to get into the <bitcoinuser> account. This might be a problem when using "electrum-server" binary as it seems to use "su". To solve this, I added limits.conf-entries for the "really logged in" user account that starts the "electrum-server" binary.

Maybe this information could be added to the readme on Github somehow.

2. The error indicating that too many files were open was burried under a stack trace that I got when I was running run_electrum_server directly (instead of "electrum-server start"). It did not show up in the log file.



Regards,

Felix


This page describes how to increase the open files limit for a user
https://github.com/spesmilo/electrum-server/blob/master/HOWTO.md#step-10-tweak-your-system-for-running-electrum

Code:
sudo echo "bitcoin hard nofile 65536" >> /etc/security/limits.conf
 sudo echo "bitcoin soft nofile 65536" >> /etc/security/limits.conf

In Ubuntu 14.04 you must also edit /etc/pam.d/common-session
Code:
sudo nano  /etc/pam.d/common-session

Add this to the end of the file
Code:
session required pam_limits.so




BadaBing
kamk
Newbie
*
Offline Offline

Activity: 2


View Profile
June 05, 2015, 08:08:19 AM
 #291

It happened yesterday, from /var/log/electrum.log:

[04/06/2015-18:35:52] addr not in tree 1c0b8f470c0b7a32792c6cbacf3a9b00e72d93b1e516b1d2de130ab4a4e2be1dde3570be097e005 f0ebacca65b21aa859bfa4f1a01000000 13ZHmZ15qKNLbttUFZoTYDdwhqfpfjZGmP !7l<NP><NUL><NUL><NUL><NUL>s{<NUL>

The server then stopped catching up with bitcoind and I had to download snapshot from foundry. I checked syslog but found no errors reported regarding the disk.
btcash
Hero Member
*****
Offline Offline

Activity: 567



View Profile
June 09, 2015, 08:02:58 PM
 #292

Thomas could you please post your opinion on this issue:

http://www.reddit.com/r/Electrum/comments/38qi2m/20_mb_blocks_the_end_of_electrum/

The Americans take our data privacy concerns seriously. - Hans-Peter Friedrich (German Federal Minister of the Interior)
tl121
Sr. Member
****
Offline Offline

Activity: 279


View Profile
June 09, 2015, 10:16:01 PM
 #293

Thomas could you please post your opinion on this issue:

http://www.reddit.com/r/Electrum/comments/38qi2m/20_mb_blocks_the_end_of_electrum/

It seems likely that only a small change will be needed to the server code to handle larger blocks.  However, there is a more serious problem related to the traffic load of the bitcoin network.  The Electrum server code is inefficient and with a slow processor can often fall behind the Bitcoin network.  Even with the present size blocks if a large block hits the network immediately followed by a second block then the server will be two blocks back and the client will report that the server is lagging.

I run a private Electrum server on an Atom (Haswell) based Intel NUC, with 8 GB RAM and an SSD. Bitcoind has no problem keeping up with the network, using only a few percent of the CPU load and this slow machine would have a chance of keeping up with 20MB blocks, given that it is running at about 3 percent CPU loading today.  However, the Electrum server uses about seven times as much CPU time per block as bitcoind, so there is zero chance it will handle a large expansion in network transaction rate. Actually, I consider this server code to be marginal with present network traffic, because I get occasional "server lagging" messages with my clients. Incidentally, one of the things that put me off from Electrum a few years ago were these "server lagging" messages, which I took to be an indication that something was wrong with the Electrum system.  People want to start their client and immediately do a transaction without any network delays or other BS. (In this regard even with the typical "lagging" delays, quick start up with Electrum is still better than Multibit if the client has been off-line for several days, at least with my network access speed.  If bitcoind is not kept online 24/7 then its start up performance is worse than hopeless.)

I assume that the Electrum server code could be tweaked or rewritten to make it run substantially faster.  I can think of no good reason why the Electrum server should use any more processor time than Bitcoin while keeping up with the network. Indeed, on my system the unavoidable use of processor time is probably doing signature checking by bitcoind. It don't believe there is anything that the Electrum Server needs to do that is remotely as CPU intensive.  If I had limited RAM or a spinning rust disk then perhaps there would be a hard reason why the Electrum server was slow.

I'm not complaining at present, but I think some work is needed and is possible to cover future increases in network traffic.




ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
July 01, 2015, 08:06:26 AM
 #294

if you run an electrum server, it is time to upgrade!

Two fixes were added recently:
 - support for arbitrary p2sh scripts (will be required by electrum 2.4 client)
 - memory pool efficiency fix, added after the recent 'stress test' (servers without this patch are too slow)

note: 2.4 clients will only connect to servers that have upgraded

Electrum: the convenience of a web wallet, without the risks
tl121
Sr. Member
****
Offline Offline

Activity: 279


View Profile
July 02, 2015, 05:51:42 PM
 #295

if you run an electrum server, it is time to upgrade!

Two fixes were added recently:
 - support for arbitrary p2sh scripts (will be required by electrum 2.4 client)
 - memory pool efficiency fix, added after the recent 'stress test' (servers without this patch are too slow)

note: 2.4 clients will only connect to servers that have upgraded

Thanks for the update.  It was quick and easy to install.

The server seems to run smoother between blocks.  However, when a new full block shows up the server still takes a long time to process the block, over two minutes for a full 1 MB block. In the past 12 hours electrum-server has consumed more than four times as much CPU time as bitcoin core. The server machine is completely CPU bound while processing a new block. The machine hardware is a Haswell Atom machine, running with 8 GB of RAM and SSD.
BadAss.Sx
Legendary
*
Offline Offline

Activity: 1078


Bulletproof VPS/VPN/Email @ BadAss.Sx


View Profile WWW
July 04, 2015, 06:22:24 PM
 #296

Hi, how do i upgrade...is there a simple method?

Sorry for asking if it is too much asked Smiley

Need BadAss Bulletproof VPS or Bulletproof VPN or why not just mail safe with Safe-Mail. We care about your privacy.
JWU42
Legendary
*
Offline Offline

Activity: 1484


View Profile
July 04, 2015, 07:22:35 PM
 #297

Assumes you are starting in your home directory and the server is in ~/electrum-server
Code:
cd electrum-server
git pull
sudo python setup.py install

GPG PubKey | THREEMA | OTC | HeatWare | 1JWU42QLGFESoQCC4iPzUDTRiC9nx5bi95
BadAss.Sx
Legendary
*
Offline Offline

Activity: 1078


Bulletproof VPS/VPN/Email @ BadAss.Sx


View Profile WWW
July 04, 2015, 07:45:49 PM
 #298

I did that and all went fine without errors, but now i read this in my log and can't connect to my server:

Quote
[04/07/2015-21:38:48] Signal handler called with signal 15
[04/07/2015-21:38:48] Stopping Stratum
[04/07/2015-21:38:49] Closing database...
[04/07/2015-21:38:49] Database is closed
[04/07/2015-21:38:49] Electrum Server stopped
[04/07/2015-21:40:10] Starting Electrum server on electrum.badass.sx
[04/07/2015-21:40:17] Database version 3
[04/07/2015-21:40:17] Blockchain height 363830
[04/07/2015-21:40:17] UTXO tree root hash: d229909f0021c67165fd317a9bb519125996b68335b2aff3ef4651339d5174d7
[04/07/2015-21:40:17] Coins in database: 1434314010655316
[04/07/2015-21:40:17] TCP server started on 94.102.50.70:50001
[04/07/2015-21:40:17] SSL server started on 94.102.50.70:50002
[04/07/2015-21:40:17] bitcoind still warming up...
[04/07/2015-21:40:27] bitcoind still warming up...
[04/07/2015-21:40:37] bitcoind still warming up...
[04/07/2015-21:40:47] bitcoind still warming up...
[04/07/2015-21:40:57] bitcoind still warming up...
[04/07/2015-21:41:07] bitcoind still warming up...
[04/07/2015-21:41:17] bitcoind still warming up...
[04/07/2015-21:41:27] bitcoind still warming up...
[04/07/2015-21:41:37] bitcoind still warming up...
[04/07/2015-21:41:47] bitcoind still warming up...

Any idea what is going on? In top i don't see anything strange.

When i do bitcoin-cli getblockchaininfo

Quote
{
    "chain" : "main",
    "blocks" : 363834,
    "headers" : 363834,
    "bestblockhash" : "0000000000000000011cef43d1c689b097bd15410151f6b2666a6f683a7ff659",
    "difficulty" : 49402014931.22746277,
    "verificationprogress" : 0.99999607,
    "chainwork" : "00000000000000000000000000000000000000000008295a3c16c8d1fb7190dc"
}

But when i read the electrum-server log

Quote
[04/07/2015-21:57:55] Starting Electrum server on electrum.badass.sx
[04/07/2015-21:57:56] Database version 3
[04/07/2015-21:57:56] Blockchain height 363830
[04/07/2015-21:57:56] UTXO tree root hash: d229909f0021c67165fd317a9bb519125996b68335b2aff3ef4651339d5174d7
[04/07/2015-21:57:56] Coins in database: 1434314010655316
[04/07/2015-21:57:56] TCP server started on 94.102.50.70:50001
[04/07/2015-21:57:56] SSL server started on 94.102.50.70:50002

It looks like the blockchain height isn't synchronising properly because it says 363830 instead of 363834.

EDIT: changed the file limits to 64k to see what that does, but i had it already static in limits.conf, but when i did ulimit -n it told me 1024. Because electrum-server needs to be run under root i have added the same lines for root also in the limits.conf. Now it is syncing i guess, because cpu load it around 20% all the time, but no specific new lines in the log...so i wait until it is done with its job and see what happens then.

Need BadAss Bulletproof VPS or Bulletproof VPN or why not just mail safe with Safe-Mail. We care about your privacy.
JWU42
Legendary
*
Offline Offline

Activity: 1484


View Profile
July 04, 2015, 09:08:53 PM
 #299

Now it is syncing i guess, because cpu load it around 20% all the time, but no specific new lines in the log...so i wait until it is done with its job and see what happens then.

The log only outputs every 1000 blocks.

You can do...

Code:
electrum-server getinfo

To get an output of what block it is working on...

GPG PubKey | THREEMA | OTC | HeatWare | 1JWU42QLGFESoQCC4iPzUDTRiC9nx5bi95
BadAss.Sx
Legendary
*
Offline Offline

Activity: 1078


Bulletproof VPS/VPN/Email @ BadAss.Sx


View Profile WWW
July 04, 2015, 09:12:33 PM
 #300

Thanks, it is working now....apparently is was the size limits issue, because server came online and i can connect now with my client

Need BadAss Bulletproof VPS or Bulletproof VPN or why not just mail safe with Safe-Mail. We care about your privacy.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!