bauerj / electrumx-installer

A script to automate the installation of electrumx 🤖
Apache License 2.0
66 stars 115 forks source link

$100 Bounty Request for Fedora Operating System Compatibility #16

Open Rspigler opened 6 years ago

Rspigler commented 6 years ago

In Bitcoin.

I see that Cent OS is compatible, so the Fedora tree of GNU/Linux distributions has already been covered.

My one concern would be that this would work with SELinux enabled (I've been having some issues with SELinux recently...)

You can check my GitHub history to see that I am honest with bounties. I've actually paid one out to you before! (https://github.com/spesmilo/electrum/pull/2405)

Thank you

bauerj commented 6 years ago

You can check my GitHub history to see that I am honest with bounties. I've actually paid one out to you before!

Sure, I remember!

I'll check this out next week. If anyone else wants to do this, please report here so we don't do the same thing twice and I can give some pointers.

Rspigler commented 6 years ago

Great, thanks!

bauerj commented 6 years ago

Hey,

I started working on this in the fedora-support branch. The easy stuff (installing electrumx) is done, but I didn't test it with a "real" Fedora system yet, only in a Docker container which probably doesn't support SELinux. So this probably needs some tweaking with regards to SELinux.

Rspigler commented 6 years ago

Thanks! Don't know if I'm doing something wrong here, but when I run wget https://raw.githubusercontent.com/bauerj/electrumx-installer/fedora-support/bootstrap.sh -0 - | bash

I get the error

ERROR: 'Fedora' is not yet supported

bauerj commented 6 years ago

Yes, the bootstrap script always installs from master.

This should work, though:

git clone https://github.com/bauerj/electrumx-installer
cd electrumx-installer
git checkout fedora-support
./install.sh
Rspigler commented 6 years ago

Ah, sorry.

So the install worked, but when trying to run systemctl start electrumx.service I get a crash.

Here's some of what I get from Problem Reporting:

reason: python3.6 killed by SIGILL crash_function: rocksdb::LRUCache::LRUCache(unsigned long, int, bool, double) cmdline: /usr/bin/python3 /usr/local/bin/electrumx_server.py executable: /usr/bin/python3.6 pid: 25107 pwd: /db user: electrumx (1001)

Otherwise it just says

The backtrace does not contain enough meaningful function frames to be reported. It is annoying but >it does not necessary signalize a problem with your computer. ABRT will not allow you to create a >report in a bug tracking system but you can contact kernel maintainers via e-mail.

Rspigler commented 6 years ago

In case it matters, I'm running with:

HOST=0.0.0.0 COIN=BitcoinSegwit BANNER_FILE=/Path/ToMyBannerFile.txt ANON_LOGS=1 MAX_SUBS=500000 MAX_SESSION_SUBS=100000 PEER_DISCOVERY=on PEER_ANNOUNCE=1 FORCE_PROXY=1 TOR_PROXY_PORT=9050 REPORT_HOST_TOR=ONION_ADDRESS

as my environmental variables, and kept all your other defaults.

Rspigler commented 6 years ago

Hey sorry, been away for the last two weeks.

I know there hasn't been any changes to the fedora-support branch since, but thought I'd try again since I came back to some kernel updates (now on 4.16.16).

I got the same error as before, but this time I noticed that on the Problem Reporting report the kernel is reported as 4.16.11? But the 3 kernel versions on my system are only 4.16.16, 4.16.15, and 4.16.14. Don't know if this is part of the problem?

Rspigler commented 6 years ago

Also, I tried running systemctl start electrumx.service after running setenforce 0, and got the same error, so I don't think it's an SELinux issue.

bauerj commented 6 years ago

That's interesting, maybe it's an issue with rocksdb instead. Can you try to install with --leveldb?

I didn't have time yet to set up a Fedora VM to try this.

Rspigler commented 6 years ago

Ok awesome, that removed the error!

I now run systemctl start electrumx.service without any error, but it completes without any output and returns to: username@localhost ~]$ for a new command.

I would think it would remain open and keep running since the server remains running? How do I see what connections it's made?

Edit: Or what block its synced up to?

bauerj commented 6 years ago

To see the logs, you can use journalctl, e.g. journalctl -u electrumx. You can also use electrumx_rpc.py sessions to list all current sessions.

Rspigler commented 6 years ago

Ah, ok thank you.

journalctl -u electrumx returns the following error

May 29 20:48:04 localhost.localdomain systemd[1]: Started Electrumx. May 29 20:48:05 localhost.localdomain electrumx_server.py[24631]: INFO:root:ElectrumX server starting May 29 20:48:05 localhost.localdomain electrumx_server.py[24631]: INFO:Controller:software version: ElectrumX 1.4.4p2 May 29 20:48:05 localhost.localdomain electrumx_server.py[24631]: INFO:Controller:supported protocol versions: 1.1-1.2 May 29 20:48:05 localhost.localdomain electrumx_server.py[24631]: INFO:Controller:event loop policy: None May 29 20:48:05 localhost.localdomain electrumx_server.py[24631]: INFO:Daemon:daemon #1 at localhost:8332/ (current) May 29 20:48:05 localhost.localdomain electrumx_server.py[24631]: INFO:BlockProcessor:switching current directory to /db May 29 20:48:05 localhost.localdomain systemd[1]: electrumx.service: Main process exited, code=dumped, status=4/ILL May 29 20:48:05 localhost.localdomain systemd[1]: electrumx.service: Failed with result 'core-dump'.

I've tried changing the DB_DIRECTORY value in the conf file but I still get the same error (switching current directory to /db), I'm not sure why.

electrumx_rpc.py sessions returns:

cannot connect - is ElectrumX catching up, not running, or is 8000 the wrong RPC port?

Rspigler commented 6 years ago

@bauerj It seems to me you've done mostly if not all your work here and this is probably a small/stupid mistake on my end with the database directory where I maybe need some hand holding setting it up?

bauerj commented 6 years ago

I'm not sure, this could just as will be an issue with the database integration libraries.

Rspigler commented 6 years ago

Bumping this bounty to $100!