Pages:
Author

Topic: Electrum server discussion thread - page 14. (Read 61494 times)

hero member
Activity: 938
Merit: 1000
March 31, 2013, 04:18:24 AM
I'm half the way of setting this server up. I must say that compiling bitcoind was fun.  Cheesy But bicoind needs a lot of resources, my little 512 RAM vps can't do it i guess? Opinions?

I think it should be possible if you monitor the bitcoind process and reboot it every other day.
eja
newbie
Activity: 39
Merit: 0
March 30, 2013, 09:04:21 AM
It is probably close to the limit. For reference below is the resource usage on mine (1GB ram) after a couple of days running.

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 2188 bitcoin   20   0  353m 200m 3708 S    3 20.2 310:23.68 bitcoind           
 4320 bitcoin   20   0  306m 108m 2732 S   35 10.9 729:14.69 python 
full member
Activity: 188
Merit: 100
March 30, 2013, 08:22:32 AM
I'm half the way of setting this server up. I must say that compiling bitcoind was fun.  Cheesy But bicoind needs a lot of resources, my little 512 RAM vps can't do it i guess? Opinions?
legendary
Activity: 1896
Merit: 1353
March 25, 2013, 11:30:33 AM
I'm thinking about setting up an electrum server in order to help users. Any documentation on that?

there are documentation files in the repo.
I suggest that you start with a pruning server, it is easier
full member
Activity: 188
Merit: 100
March 25, 2013, 11:26:27 AM
I'm thinking about setting up an electrum server in order to help users. Any documentation on that?
member
Activity: 76
Merit: 10
March 07, 2013, 04:57:59 PM
Well for that matter there's also Javascript implementations ! :-P
hero member
Activity: 938
Merit: 1000
March 07, 2013, 11:55:39 AM
I don't think anybody tried to run a JVM implementation. There is a ruby port of the electrum code which could in theory be ran as JRuby though. Please let us know your findings if you are going to experiment Smiley
member
Activity: 76
Merit: 10
March 07, 2013, 10:53:41 AM
I've added this question to the stackexchange site which is asking what the security considerations are for running an electrum server.

http://bitcoin.stackexchange.com/questions/8214/what-are-the-security-considerations-for-hosting-your-own-electrum-server

I'm also curious whether anyone has run this code on a JVM in say Jython or something like that? I'm interested in a Java based implementation.
legendary
Activity: 1896
Merit: 1353
March 04, 2013, 04:21:39 AM
bad news for pruning servers:

I had to make modifications to the database structure of pruning servers.
The goal of this change is to handle p2sh addresses.

If you git pull, you'll see a message telling you that your database is deprecated.
you will need to create a new database and reimport the blockchain.

sorry about that.

note that this change is indicated by a new version number (0.7)

So there will be 2 electrum-server versions running (0.6 for full & 0.7 for pruning)?

the full servers will have the same version number.
however, a full server using 0.7 code will not support p2sh addresses, afaik (unless they were added to ABE recently, I don't know)
sr. member
Activity: 349
Merit: 250
March 04, 2013, 03:38:47 AM
bad news for pruning servers:

I had to make modifications to the database structure of pruning servers.
The goal of this change is to handle p2sh addresses.

If you git pull, you'll see a message telling you that your database is deprecated.
you will need to create a new database and reimport the blockchain.

sorry about that.

note that this change is indicated by a new version number (0.7)

So there will be 2 electrum-server versions running (0.6 for full & 0.7 for pruning)?
legendary
Activity: 1896
Merit: 1353
March 04, 2013, 02:40:18 AM
bad news for pruning servers:

I had to make modifications to the database structure of pruning servers.
The goal of this change is to handle p2sh addresses.

If you git pull, you'll see a message telling you that your database is deprecated.
you will need to create a new database and reimport the blockchain.

sorry about that.

note that this change is indicated by a new version number (0.7)
newbie
Activity: 46
Merit: 0
March 02, 2013, 05:25:09 PM
Electrum won't start O_O

You're probably referring to the client and not the server. Please use the other thread for discussing this, make sure you run the latest stable version and feel free to join us on IRC #electrum on freenode to try and help you fix this.
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
March 02, 2013, 12:15:27 AM
I'm having trouble getting electrum-server to run with the latest bitcoind from github.

I keep getting this,
Code:
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 755, in run
    self.function(*self.args, **self.kwargs)
  File "/usr/local/src/electrum-server/backends/bitcoind/blockchain_processor.py", line 72, in
    threading.Timer(0, lambda: self.catch_up(sync=False)).start()
  File "/usr/local/src/electrum-server/backends/bitcoind/blockchain_processor.py", line 652, in catch_up
    next_block_hash = self.bitcoind('getblockhash', [self.height + 1])
  File "/usr/local/src/electrum-server/backends/bitcoind/blockchain_processor.py", line 95, in bitcoind
    raise BaseException(r['error'])
BaseException: {u'message': u'Block number out of range.', u'code': -1}

"Block number out of range" - what?

I updated my bitcoind today and it starts ok but electrum doesn't want to play with it.

edit: Just noticed that blocks being logged in bitcoin/debug.log are from 2011. Is this right - the new version has to reload the whole blockchain or something? It was up to date with previous pre-0.8 beta and I thought it would be a good idea to catch up with new release.

edit again: Oh. Well, now that the blockchain has fully re-indexed/downloaded it does work ok. For anyone about to update note that going from bitcoind 0.7.1 to 0.8.0 does this and took quite a few hours on my server.

BTW I changed my server URL from electrum.spiderfish.net back to electrum.tk (a name I briefly used before). I like spiderfish better but the name is too long to allow the SSL/HTTPS details to be passed via IRC. Not sure why that changed today as SSL was working before, and then today it stopped, until I restarted with the shorter name. I updated electrum server as well so maybe some changes occurred.
legendary
Activity: 2271
Merit: 1363
February 22, 2013, 12:10:37 PM
So it is me again ,

I am trying to run an electrum server on my node but i can not get irc to work.

If I set it to yes in the options I get 100% CPU load on 1 Core and no peers.

There are no ports closed, i asked my hosting provider and i made sure to disable the firewall.

I am able to connect to it with Electrum 1.6.2 at electrum.cpsh.me per tcp 50001 and http 8081

When i run electrum peers i get this message in the log :
Quote
[22/02/2013-17:55:22] Starting Electrum server on electrum.cpsh.me
[22/02/2013-17:55:22] hist [('0000000000000113d3646e4eb83c7392c046d7145bd6b80a1f2ee4b5aa650310', 222560, 0)]
[22/02/2013-17:55:22] catching up missing headers: 222516 222560
[22/02/2013-17:55:23] blockchain is up to date.
[22/02/2013-17:55:24] TCP server started.
[22/02/2013-17:55:24] HTTP server started.
[22/02/2013-17:55:35] blockchain: 222560 (0.028s)
[22/02/2013-17:56:26] blockchain: 222561 (10.456s)
[22/02/2013-18:04:01] unknown method {u'params': [u'secret'], u'id': 2, u'method': u'server.peers'}

Things I already investigated :
  • changed the connection to the irc server on another port accordingly to freenode servers manually in the irc init file.
  • monitored the ports
  • reverted the last commit

things i suspect :
  • the hostname

the hostname file says : electrum.cpsh.me

the hosts file says : electrum.cpsh.me

I would appreciate any help,

thank you
legendary
Activity: 1896
Merit: 1353
February 18, 2013, 04:01:34 AM
bitcoind quit or is busy answering which will in turn make electrum server bail out...

yes, please note that this is expected behaviour.
the Electrum server shuts itself down in order to avoid sending lagging information to its clients
newbie
Activity: 46
Merit: 0
February 17, 2013, 07:49:51 PM
The crash message looks like bitcoind quit or is busy answering which will in turn make electrum server bail out...

Make sure you're running the latest bitcoind from git and let bitcoind sync up first before running electrum. If it still doesn't work then, we'll have to give it a close look.
legendary
Activity: 2271
Merit: 1363
February 17, 2013, 10:05:04 AM
newbie
Activity: 11
Merit: 0
February 17, 2013, 01:54:06 AM
I'm having issues getting Electrum server to sync with bitcoind.  It works fine for a short time then says this:

Code:
17/02/2013-05:20:34] catch_up: block 23100 (0.639s)
[17/02/2013-05:20:34] catch_up: block 23200 (0.638s)
Traceback (most recent call last):
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
  File "/usr/lib/python2.7/urllib.py", line 88, in urlopen
    return opener.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 209, in open
    return getattr(self, name)(url, data)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
 raise err
IOError: [Errno socket error] [Errno 110] Connection timed out
[17/02/2013-05:20:56] Stopping Stratum
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 755, in run
    self.function(*self.args, **self.kwargs)
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    threading.Timer(0, lambda: self.catch_up(sync=False)).start()
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    next_block_hash = self.bitcoind('getblockhash', [self.height + 1])
  File "/home/bitcoind/electrum/electrum-server/backends/bitcoind/blockchain_processor.py",$
    r = loads(respdata)
UnboundLocalError: local variable 'respdata' referenced before assignment

Looks like a time out issue.  I have it running on a virtual server that may be the source of the delays in communicating w/ bitcoind.

I don't speak python, but this seems to magically make the time out 60s instead of 1s:

electrum-server/backends/bitcoind/blockchain_processor.py line 87:

was:
Code:
        try:
            respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
        except:
            traceback.print_exc(file=sys.stdout)
            self.shared.stop()

Changed to:
Code:
       try:
            respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
        except:
            try:
                respdata = urllib.urlopen(self.bitcoind_url, postdata).read()
            except:
                traceback.print_exc(file=sys.stdout)
                self.shared.stop()


After changing this, it runs much longer before it dies with the same message.  I'm sure there's a much better way to do this.  Maybe some who knows about this stuff can fix it or at least change the time out to a value that will survive the server being overloaded temporarily.

[Edit]
Moved leveldb to shm to see if it helped performance.  It didn't.  The issue appears to be caused by high cpu usage.
hero member
Activity: 910
Merit: 1005
February 08, 2013, 07:46:38 AM
Thomas, please could you have a look at https://github.com/spesmilo/electrum-server/pull/23
hero member
Activity: 742
Merit: 500
February 05, 2013, 08:44:36 AM
will you loose any coins?

can you explain your question?
When I update it, will I still have my coins afterword?
Updating the server will do nothing to your coins.
Pages:
Jump to: