ExchangeUnion / xud-simnet

The XUD Simulation Network, a nicey nice playground with monopoly money
GNU Affero General Public License v3.0
1 stars 1 forks source link

Raiden failed to start becuase of sqlite3 missing #75

Closed reliveyy closed 4 years ago

reliveyy commented 4 years ago

I follow the clean/install/start pattern and reproduce this raiden start failure more than once.

/tmp/raiden.log

Traceback (most recent call last):
  File "/home/vagrant/xud-simnet/raiden-wd/venv/bin/raiden", line 11, in <module>
    load_entry_point('raiden', 'console_scripts', 'raiden')()
  File "/home/vagrant/xud-simnet/raiden/raiden/__main__.py", line 8, in main
    from raiden.ui.cli import run
  File "/home/vagrant/xud-simnet/raiden/raiden/ui/cli.py", line 19, in <module>
    from raiden.app import App
  File "/home/vagrant/xud-simnet/raiden/raiden/app.py", line 11, in <module>
    from raiden.raiden_service import RaidenService
  File "/home/vagrant/xud-simnet/raiden/raiden/raiden_service.py", line 16, in <module>
    from raiden.blockchain.decode import (
  File "/home/vagrant/xud-simnet/raiden/raiden/blockchain/decode.py", line 14, in <module>
    from raiden.blockchain.state import (
  File "/home/vagrant/xud-simnet/raiden/raiden/blockchain/state.py", line 29, in <module>
    from raiden.storage.restore import (
  File "/home/vagrant/xud-simnet/raiden/raiden/storage/restore.py", line 4, in <module>
    from raiden.storage.sqlite import (
  File "/home/vagrant/xud-simnet/raiden/raiden/storage/sqlite.py", line 1, in <module>
    import sqlite3
  File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
$ scripts/xud-simnet-install
/usr/local/bin/python3.7
found all pre-requisites
lnd-btc limits patched
patching file blockmanager.go
Hunk #1 succeeded at 2826 (offset 385 lines).
neutrino patched
patching file lnd.go
Hunk #1 succeeded at 606 (offset 131 lines).
lnd-btc installed
lnd-ltc limits patched
patching file blockmanager.go
Hunk #1 succeeded at 2826 (offset 385 lines).
neutrino patched
patching file lnd.go
Hunk #1 succeeded at 606 (offset 131 lines).
lnd-ltc installed
xud installed
found all dependencies for Raiden
git clone raiden
create virtual environment
upgrade pip
install requirements
setup raiden
raiden installed!
Ready!
$ scripts/xud-simnet-start
starting all processes
lndbtc started
lndltc started
raiden didn't start properly
reliveyy commented 4 years ago

It's related self-compiled Python3.7 in https://github.com/ExchangeUnion/xud-simnet/issues/73. The missing configure option --enable-loadable-sqlite-extensions leads to the error above.

P.S. A full Python3.7 compilation guide on Ubuntu 18.04

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget libsqlite3-dev
wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz
tar -xf Python-3.7.7.tgz
cd Python-3.7.7
./configure --enable-optimizations --enable-loadable-sqlite-extensions
make
sudo make altinstall

References:

  1. No module named _sqlite3