bauerj / electrumx-installer Goto Github PK
View Code? Open in Web Editor NEWA script to automate the installation of electrumx 🤖
License: Apache License 2.0
A script to automate the installation of electrumx 🤖
License: Apache License 2.0
mining@mining-Lenovo-G580:~$ sudo ~/.electrumx-installer/install.sh
Installing installer dependencies
Adding new user for electrumx
Creating database directory in /db
�[0,34mINFO: Python 3.6 is already installed.
�[0,34mINFO: Python 3.6 successfully installed
Installing git
Installing RocksDB
Installing pyrocksdb
Checking pyrocksdb installation
70.0% [==================================================
---- LOG OUTPUT BELOW ----
Hit:4 http://za.archive.ubuntu.com/ubuntu xenial InRelease
Hit:5 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease
Hit:6 http://za.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://za.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
openssl is already the newest version (1.0.2g-1ubuntu4.10).
wget is already the newest version (1.17.1-1ubuntu1.3).
The following packages were automatically installed and are no longer required:
gyp javascript-common libjs-inherits libjs-jquery libjs-node-uuid
libjs-underscore libuv1 libuv1-dev python-pkg-resources
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
useradd: user 'electrumx' already exists
1001
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.7.4-0ubuntu1.3).
The following packages were automatically installed and are no longer required:
gyp javascript-common libjs-inherits libjs-jquery libjs-node-uuid
libjs-underscore libuv1 libuv1-dev python-pkg-resources
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.1ubuntu2).
libbz2-dev is already the newest version (1.0.6-8).
libsnappy-dev is already the newest version (1.1.3-2).
libgflags-dev is already the newest version (2.1.2-3).
librocksdb-dev is already the newest version (4.1-1).
zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
The following packages were automatically installed and are no longer required:
gyp javascript-common libjs-inherits libjs-jquery libjs-node-uuid
libjs-underscore libuv1 libuv1-dev python-pkg-resources
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
The directory '/home/mining/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mining/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Cython>=0.20 in /usr/local/lib/python3.6/dist-packages
The directory '/home/mining/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mining/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting git+git://github.com/stephan-hof/pyrocksdb.git
Cloning git://github.com/stephan-hof/pyrocksdb.git to /tmp/pip-ym6u8ti4-build
Requirement already satisfied (use --upgrade to upgrade): pyrocksdb==0.5 from git+git://github.com/stephan-hof/pyrocksdb.git in /usr/local/lib/python3.6/dist-packages
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from pyrocksdb==0.5)
distributions/base.sh: line 7: 7770 Illegal instruction (core dumped) python3 -B -c "import rocksdb"
---- LOG OUTPUT ABOVE ----
ERROR: pyrocksdb installation doesn't work
hi, thanks for your script
i cant find how to fix this
Ubuntu 18.04
~/.electrumx-installer$ sudo systemctl status electrumx.service
● electrumx.service - Electrumx
Loaded: loaded (/etc/systemd/system/electrumx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-04-04 12:06:00 CEST; 2s ago
Process: 59936 ExecStart=/usr/local/bin/electrumx_server (code=exited, status=1/FAILURE)
Main PID: 59936 (code=exited, status=1/FAILURE)
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: Traceback (most recent call last):
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: File "/usr/local/bin/electrumx_server", line 16, in <module>
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: from electrumx import Controller, Env
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: File "/usr/local/lib/python3.7/dist-packages/electrumx/__init__.py", line 4, in <module>
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: from electrumx.server.controller import Controller
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: File "/usr/local/lib/python3.7/dist-packages/electrumx/server/controller.py", line 10, in <module>
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: from aiorpcx import _version as aiorpcx_version, TaskGroup
avril 04 12:06:00 ubuntulabo electrumx_server[59936]: ModuleNotFoundError: No module named 'aiorpcx'
avril 04 12:06:00 ubuntulabo systemd[1]: electrumx.service: Main process exited, code=exited, status=1/FAILURE
avril 04 12:06:00 ubuntulabo systemd[1]: electrumx.service: Failed with result 'exit-code'.
python3.7 -m pip install --user aiorpcX
Requirement already satisfied: aiorpcX in /home/myuser/.local/lib/python3.7/site-packages (0.18.7)
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! (spesmilo/electrum#2405)
Thank you
Hello,
I tried to use this installer, but it crashes during the process.
Environment : Debian 8.8 on x86-64
Here is the screen log :
root@fg1:/home/bitcoind/git/electrumx-installer# ./install.sh
Installing installer dependencies
Adding new user for electrumx
Creating database directory in /db
Installing Python 3.6
34mINFO: Python 3.6 successfully installed
Installing git
Installing RocksDB
34mINFO: Loading RocksDB source================
34mINFO: Compiling RocksDB... This will take a while.
Installing pyrocksdb
Checking pyrocksdb installation
Installing electrumx
90.0% [================================================================
---- LOG OUTPUT BELOW ----
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 851, in resolve
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 1123, in best_match
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 1135, in obtain
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 664, in easy_install
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 694, in install_item
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 875, in install_eggs
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 1114, in build_and_install
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 1100, in run_setup
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 249, in run_setup
File "/opt/python/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 197, in setup_context
File "/opt/python/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 168, in save_modules
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 143, in resume
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 156, in save_modules
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 197, in setup_context
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 246, in run_setup
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 276, in run
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 245, in runner
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 47, in _execfile
File "/tmp/easy_install-bga1v4ml/multidict-3.0.0/setup.py", line 28, in <module>
File "/opt/python/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 934, in cythonize
cythonize_one(*args)
File "/opt/python/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1039, in cythonize_one
result = compile([pyx_file], options)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 686, in compile
return compile_multiple(source, options)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 664, in compile_multiple
result = run_pipeline(source, options, context=context)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 494, in run_pipeline
err, enddata = Pipeline.run_pipeline(pipeline, source)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Pipeline.py", line 340, in run_pipeline
data = phase(data)
File "Cython/Compiler/Visitor.py", line 286, in Cython.Compiler.Visitor.CythonTransform.__call__ (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:7423)
File "Cython/Compiler/Visitor.py", line 269, in Cython.Compiler.Visitor.VisitorTransform.__call__ (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:7095)
File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5339)
File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5281)
File "Cython/Compiler/Visitor.py", line 296, in Cython.Compiler.Visitor.CythonTransform.visit_Node (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:7629)
File "Cython/Compiler/Visitor.py", line 247, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6414)
File "Cython/Compiler/Visitor.py", line 247, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6846)
File "Cython/Compiler/Visitor.py", line 248, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6434)
File "Cython/Compiler/Visitor.py", line 221, in Cython.Compiler.Visitor.TreeVisitor._visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6117)
File "Cython/Compiler/Visitor.py", line 193, in Cython.Compiler.Visitor.TreeVisitor._visitchild (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5602)
File "Cython/Compiler/Visitor.py", line 188, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5483)
File "Cython/Compiler/Visitor.py", line 147, in Cython.Compiler.Visitor.TreeVisitor._raise_compiler_error (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:4489)
setuptools.sandbox.UnpickleableException: CompilerCrash((<FileSourceDescriptor:/tmp/easy_install-bga1v4ml/multidict-3.0.0/multidict/_multidict.pyx>, 1, 0), 'RemoveUnreachableCode', 'Compiler crash in RemoveUnreachableCode\n\nModuleNode.body = StatListNode(_multidict.pyx:1:0)\n\nCompiler crash traceback from this point on:\n File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5261)\n File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 2253, in visit_StatListNode\n if not self.current_directives[\'remove_unreachable\']:\nTypeError: \'NoneType\' object is not subscriptable', TypeError("'NoneType' object is not subscriptable",), <traceback object at 0x7f0856500d88>)
---- LOG OUTPUT ABOVE ----
ERROR: Unable to install electrumx
Francis
Hi,
When launched for the first time on a fresh Debian Jessie install the Electrumx installer needs to be executed twice in order for electrumx to be installed. The first run crashes (c.f. error output below). Immediately after, the installed can be executed again and will install Electrumx with no reported errors.
The first run produces the following output:
[...]
Installing electrumx
80.0% [=========================================================
---- LOG OUTPUT BELOW ----
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 851, in resolve
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 1123, in best_match
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/__init__.py", line 1135, in obtain
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 664, in easy_install
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 694, in install_item
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 875, in install_eggs
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 1114, in build_and_install
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/command/easy_install.py", line 1100, in run_setup
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 249, in run_setup
File "/opt/python/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 197, in setup_context
File "/opt/python/lib/python3.6/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 168, in save_modules
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 143, in resume
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 156, in save_modules
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 197, in setup_context
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 246, in run_setup
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 276, in run
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 245, in runner
File "/opt/python/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg/setuptools/sandbox.py", line 47, in _execfile
File "/tmp/easy_install-9elp8nl8/multidict-3.1.0/setup.py", line 28, in <module>
File "/opt/python/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 934, in cythonize
cythonize_one(*args)
File "/opt/python/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1039, in cythonize_one
result = compile([pyx_file], options)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 686, in compile
return compile_multiple(source, options)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 664, in compile_multiple
result = run_pipeline(source, options, context=context)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 494, in run_pipeline
err, enddata = Pipeline.run_pipeline(pipeline, source)
File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/Pipeline.py", line 340, in run_pipeline
data = phase(data)
File "Cython/Compiler/Visitor.py", line 286, in Cython.Compiler.Visitor.CythonTransform.__call__ (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:7423)
File "Cython/Compiler/Visitor.py", line 269, in Cython.Compiler.Visitor.VisitorTransform.__call__ (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:7095)
File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5339)
File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5281)
File "Cython/Compiler/Visitor.py", line 296, in Cython.Compiler.Visitor.CythonTransform.visit_Node (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:7629)
File "Cython/Compiler/Visitor.py", line 247, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6414)
File "Cython/Compiler/Visitor.py", line 247, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6846)
File "Cython/Compiler/Visitor.py", line 248, in Cython.Compiler.Visitor.VisitorTransform.visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6434)
File "Cython/Compiler/Visitor.py", line 221, in Cython.Compiler.Visitor.TreeVisitor._visitchildren (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:6117)
File "Cython/Compiler/Visitor.py", line 193, in Cython.Compiler.Visitor.TreeVisitor._visitchild (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5602)
File "Cython/Compiler/Visitor.py", line 188, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5483)
File "Cython/Compiler/Visitor.py", line 147, in Cython.Compiler.Visitor.TreeVisitor._raise_compiler_error (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:4489)
setuptools.sandbox.UnpickleableException: CompilerCrash((<FileSourceDescriptor:/tmp/easy_install-9elp8nl8/multidict-3.1.0/multidict/_multidict.pyx>, 1, 0), 'RemoveUnreachableCode', 'Compiler crash in RemoveUnreachableCode\n\nModuleNode.body = StatListNode(_multidict.pyx:1:0)\n\nCompiler crash traceback from this point on:\n File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit (/tmp/pip-1qm2aaj1-build/Cython/Compiler/Visitor.c:5261)\n File "/opt/python/lib/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 2253, in visit_StatListNode\n if not self.current_directives[\'remove_unreachable\']:\nTypeError: \'NoneType\' object is not subscriptable', TypeError("'NoneType' object is not subscriptable",), <traceback object at 0x7f31e7d3c348>)
On the second run:
[...]
Installing electrumx
Installing init scripts
INFO: Use service electrumx start to start electrumx once it's configured
Generating TLS certificates
INFO: electrumx has been installed successfully. Edit /etc/electrumx.conf to configure it.
Hi, my purpose of installing electrumx is not to use it for bitcoin but an alt-coin.
However when i install using this installer i can't find the repo files on my computer.
After successfully running the following
$ /usr/bin/python3.7 -m pip install x11_hash
I am unable to make ElectrumX work with Dash. The error is the following:
ERROR:Prefetcher:ignoring unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/electrumx/server/block_processor.py", line 56, in main_loop
if not await self._prefetch_blocks():
File "/usr/local/lib/python3.7/dist-packages/electrumx/server/block_processor.py", line 126, in _prefetch_blocks
blocks[0] = self.coin.genesis_block(blocks[0])
File "/usr/local/lib/python3.7/dist-packages/electrumx/lib/coins.py", line 141, in genesis_block
header_hex_hash = hash_to_hex_str(cls.header_hash(header))
File "/usr/local/lib/python3.7/dist-packages/electrumx/lib/coins.py", line 1224, in header_hash
import x11_hash
ModuleNotFoundError: No module named 'x11_hash'
However, after running manually
/usr/local/bin/electrumx_server
It works perfectly fine.
Any idea about this issue?
so it doesn't work with rocksdb...you have to add --leveldb as a parameter
also you have to upgrade python to python3.7
install python3.7 and
sudo update-alternatives --config python3
....maybe you can include this somehow in the install script, if you have the time :)
I have this error:
● electrumx.service - Electrumx
Loaded: loaded (/etc/systemd/system/electrumx.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Sat 2018-05-26 18:22:40 EDT; 11min ago
Process: 26972 ExecStart=/usr/local/bin/electrumx_server.py (code=killed, signal=ILL)
Main PID: 26972 (code=killed, signal=ILL)
May 26 18:22:38 ArepaCoinSecondVPS systemd[1]: Started Electrumx.
May 26 18:22:40 ArepaCoinSecondVPS electrumx_server.py[26972]: INFO:root:ElectrumX server starting
May 26 18:22:40 ArepaCoinSecondVPS electrumx_server.py[26972]: INFO:Controller:software version: ElectrumX 1.5.1
May 26 18:22:40 ArepaCoinSecondVPS electrumx_server.py[26972]: INFO:Controller:supported protocol versions: 1.0-1.2
May 26 18:22:40 ArepaCoinSecondVPS electrumx_server.py[26972]: INFO:Controller:event loop policy: None
May 26 18:22:40 ArepaCoinSecondVPS electrumx_server.py[26972]: INFO:LegacyRPCDaemon:daemon #1 at 127.0.0.1:8586/ (current)
May 26 18:22:40 ArepaCoinSecondVPS electrumx_server.py[26972]: INFO:BlockProcessor:switching current directory to /db
May 26 18:22:40 ArepaCoinSecondVPS systemd[1]: electrumx.service: Main process exited, code=killed, status=4/ILL
May 26 18:22:40 ArepaCoinSecondVPS systemd[1]: electrumx.service: Unit entered failed state.
May 26 18:22:40 ArepaCoinSecondVPS systemd[1]: electrumx.service: Failed with result 'signal'.
Any solution??
If use rocksdb crash, but with leveldb work fine.
More info:
uname -a
Linux ArepaCoinSecondVPS 2.6.32-042stab123.3 #1 SMP Fri May 5 12:29:05 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
wget https://raw.githubusercontent.com/bauerj/electrumx-installer/master/bootstrap.sh -O - | bash -s - -d /home/xpto/electrumx-db
Cloning into '/tmp/electrumx'...
Note: switching to '1.16.0-62-gfb037fb'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fb037fb aiorpcx: adapt TaskGroup._add_task monkey-patch to upstream fix
Processing /tmp/electrumx
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting aiohttp<4,>=3.3
Using cached aiohttp-3.8.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
ERROR: Ignored the following versions that require a different python version: 0.19 Requires-Python >=3.8; 0.19.1 Requires-Python >=3.8; 0.20.0 Requires-Python >=3.8; 0.20.1 Requires-Python >=3.8; 0.20.2 Requires-Python >=3.8; 0.21.0 Requires-Python >=3.8; 0.21.1 Requires-Python >=3.8; 0.22.0 Requires-Python >=3.8; 0.22.1 Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement aiorpcX[ws]<0.23,>=0.22.0 (from e-x) (from versions: 0.1, 0.2, 0.4, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.14.0, 0.14.1, 0.15.0, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4, 0.18.5, 0.18.6, 0.18.7)
ERROR: No matching distribution found for aiorpcX[ws]<0.23,>=0.22.0
---- LOG OUTPUT ABOVE ----
ERROR: Unable to install electrumx
Hi,
This script is trying to install python 3.7 but electrumx now runs on 3.8.
I got a $25 bitcoin bounty if you can update this for me in the next few days.
Thank you <3
edit: I have tried this on ubuntu 18.04.6 and ubuntu 22.04.1 with no luck. I even installed python3.8-dev on both systems but still no-go
I have installed electrumx-installer . after I run the electrumx and enabled it , I run the service electrumx status to see the status. this log is displayed which the lines are cut of in log. where can I find the complete log file?
May 30 02:51:39 electrumx_server.py[2742]: ERROR:Controller:Traceback (most recent call last):
May 30 02:51:39 electrumx_server.py[2742]: File "/usr/local/lib/python3.6/site-packages/electrumx-1.2.1-py3.6.egg/server/controller.py", line 177
May 30 02:51:39 electrumx_server.py[2742]: future.result()
May 30 02:51:39 electrumx_server.py[2742]: File "/usr/local/lib/python3.6/site-packages/electrumx-1.2.1-py3.6.egg/server/block_processor.py", lin
May 30 02:51:39 electrumx_server.py[2742]: await task()
May 30 02:51:39 electrumx_server.py[2742]: File "/usr/local/lib/python3.6/site-packages/electrumx-1.2.1-py3.6.egg/server/block_processor.py", lin
May 30 02:51:39 electrumx_server.py[2742]: for n, raw_block in enumerate(raw_blocks)]
May 30 02:51:39 electrumx_server.py[2742]: File "/usr/local/lib/python3.6/site-packages/electrumx-1.2.1-py3.6.egg/server/block_processor.py", lin
May 30 02:51:39 electrumx_server.py[2742]: for n, raw_block in enumerate(raw_blocks)]
May 30 02:51:39 electrumx_server.py[2742]: **AttributeError: type object 'Bitcoin' has no attribute 'block'**
what is the cause of attribute error ?is my electrumx installed and work truly? how can I use this electrum server in my local electrum wallet as server? what should I do to connect my own server with terminal commands?
what is command to check version ?
please help to install on windows
It would be great if the installer worked on Debian 10 (and therefore Raspbian 10, as a lot of full node owners run on a Raspberry Pi).
Many thanks.
Currently, the installer makes sure that Python 3.6 is available. This also means that it will attempt to downgrade if 3.7 is installed.
When git is not available bootstrap uses wget and unzip and the files end up in
~/.electrumx-installer/electrumx-installer-master/
The installation fails due to install.sh not being present in ~/.electrumx-installer/
Submitted pr #26 to address this.
Since users running electrum servers should have some knowledge of linux command line
it is probably worth while to require to have git installed prior to installing electrumx
We could get rid of bootstrap.sh this way and also of the requirement for distributions to have install_git()
root@ubuntu:~# wget https://raw.githubusercontent.com/bauerj/electrumx-installer/master/bootstrap.sh -O - | bash
--2018-09-25 02:23:53-- https://raw.githubusercontent.com/bauerj/electrumx-installer/master/bootstrap.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 865 [text/plain]
Saving to: ‘STDOUT’
- 100%[=============================================================================>] 865 --.-KB/s in 0s
2018-09-25 02:23:53 (198 MB/s) - written to stdout [865/865]
Cloning into '/root/.electrumx-installer'...
remote: Enumerating objects: 49, done.
remote: Counting objects: 100% (49/49), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 274 (delta 21), reused 35 (delta 18), pack-reused 225
Receiving objects: 100% (274/274), 57.82 KiB | 768.00 KiB/s, done.
Resolving deltas: 100% (148/148), done.
Installing installer dependencies
Adding new user for electrumx
Creating database directory in /db
INFO: Python 3.6 is already installed.
Installing git
Installing RocksDB
Installing python_rocksdb
54.5% [======================================
---- LOG OUTPUT BELOW ----
running egg_info
writing python_rocksdb.egg-info/PKG-INFO
writing dependency_links to python_rocksdb.egg-info/dependency_links.txt
writing requirements to python_rocksdb.egg-info/requires.txt
writing top-level names to python_rocksdb.egg-info/top_level.txt
reading manifest file 'python_rocksdb.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_rocksdb.egg-info/SOURCES.txt'
copying rocksdb/_rocksdb.cpp -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/_rocksdb.pyx -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/backup.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/cache.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/comparator.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/db.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/env.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/filter_policy.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/iterator.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/logger.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/memtablerep.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/merge_operator.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/options.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/slice_.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/slice_transform.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/snapshot.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/status.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/std_memory.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/table_factory.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/universal_compaction.pxd -> build/lib.linux-x86_64-3.6/rocksdb
creating build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/comparator_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/filter_policy_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/memtable_factories.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/merge_operator_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/slice_transform_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/utils.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/write_batch_iter_helper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
running build_ext
skipping 'rocksdb/_rocksdb.cpp' Cython extension (up-to-date)
building 'rocksdb._rocksdb' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/rocksdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.6/rocksdb/_rocksdb.o -std=c++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing -fno-rtti
rocksdb/_rocksdb.cpp:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ybsjnd33/python-rocksdb/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-6_z4h7w3/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ybsjnd33/python-rocksdb/
---- LOG OUTPUT ABOVE ----
ERROR: Could not install python_rocksdb
The solution is use LevelDB instead by command:
wget https://raw.githubusercontent.com/bauerj/electrumx-installer/master/bootstrap.sh -O - | bash -s - --leveldb
When starting electrumx I get a strange message about the path to the config files. In "systemctl status electrumx" it says: File "/usr/local/lib/python3.6/dist-packages/electrumX_kyuupichan-1.5.1-py3.6.egg/electrumx/lib/coins.py" but electrumX_kyuupichan-1.5.1-py3.6.egg is not a directory. Where can I change this file path in the config? It looks like a wrong path to the coins.py and other config files
Needless to say my electrumx won't start. It fails because it can't find the coins.py
bitcoin@debian:~$ sudo service electrumx status
* electrumx.service - Electrumx
Loaded: loaded (/etc/systemd/system/electrumx.service; enabled; vendor preset
Active: active (running) since Tue 2018-02-06 11:32:40 UTC; 1 day 4h ago
Main PID: 50229 (electrumx_serve)
Tasks: 2 (limit: 14745)
CGroup: /system.slice/electrumx.service
`-50229 /usr/local/bin/python3 /usr/local/bin/electrumx_server.py
Feb 07 15:45:10 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:46:10 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:47:10 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:48:10 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:49:11 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:50:11 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:51:11 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:52:11 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:53:12 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
Feb 07 15:54:12 debian electrumx_server.py[50229]: ERROR:Daemon:connection probl
bitcoin@debian:~$ cat /etc/electrumx.conf
# default /etc/electrumx.conf for systemd
# REQUIRED
COIN = BitcoinSegwit
DB_DIRECTORY = /db
# Bitcoin Node RPC Credentials
DAEMON_URL = user:pw@ipv4
# See https://github.com/kyuupichan/electrumx/blob/master/docs/ENVIRONMENT.rst for
# information about other configuration settings you probably want to consider.
DB_ENGINE=rocksdb
SSL_CERTFILE=/etc/electrumx/server.crt
SSL_KEYFILE=/etc/electrumx/server.key
TCP_PORT=50001
SSL_PORT=50002
# Listen on all interfaces:
HOST=
bitcoin@debian:~$ cat .bitcoin/bitcoin.conf
server=1
listen=1
daemon=1
txindex=1
rpcuser=user
rpcpassword=pw
bitcoin@debian:~$ bitcoin-cli getinfo
{
"deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16",
"version": 150100,
"protocolversion": 70015,
"blocks": 508116,
"timeoffset": 0,
"connections": 45,
"proxy": "",
"difficulty": 2874674234415.941,
"testnet": false,
"relayfee": 0.00001000,
"errors": ""
}
Guys, where's the problem?
How can I install the electrumx...Give me the setup lines please
Please let me know
I dont want to mess up with two installations of electrumx
I've used this installer on a vanilla Debian 10 virtual root server and encountered a few errors because of missing packages. So probably also check for and/or auto-install these, too:
python3-dev
make
g++
Great tool, keep up the good work!
sudo wget https://raw.githubusercontent.com/bauerj/electrumx-installer/master/bootstrap.sh -O - | bash -s - -d /home/xpto/electrumx-db
git config --global --add safe.directory /home/xpto/.electrumx-installer
fatal: unsafe repository ('/home/xpto/.electrumx-installer' is owned by someone else)
To add an exception for this directory, call:
Even if I run:
git config --global --add safe.directory /home/xpto/.electrumx-installer
it doesn't work because I can't run again without erase the dir .electrumx-installer
. When I erase I have the same error.
Can I use your installer to install electrumx version 1.0 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.