Unable to load existing blockchain data into the explorer

+4 votes

I am trying to get the multichain explorer to work. While trying to execute the commands 

cd multichain-explorer
python -m Mce.abe --config chain1.conf --commit-bytes 100000 --no-serve

as given here - https://github.com/MultiChain/multichain-explorer

I get the following error - 

garvitgoel03@testchain-admin:~/multichain-explorer$ python -m Mce.abe --config chain1.conf --commit-bytes 100000 --no-serveReconnecting after rollback error: unable to open database fileReconnecting to database.Reconnecting after rollback error: unable to open database fileReconnecting to database.Reconnecting after rollback error: unable to open database fileReconnecting to database.Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/garvitgoel03/multichain-explorer/Mce/abe.py", line 4300, in <module> sys.exit(main(sys.argv[1:])) File "/home/garvitgoel03/multichain-explorer/Mce/abe.py", line 4294, in main store = make_store(args) File "/home/garvitgoel03/multichain-explorer/Mce/abe.py", line 193, in make_store store = DataStore.new(args) File "Mce/DataStore.py", line 4348, in new return DataStore(args) File "Mce/DataStore.py", line 187, in __init__ store.initialize() File "Mce/DataStore.py", line 725, in initialize store.configure() File "Mce/DataStore.py", line 1072, in configure config = store._sql.configure() File "Mce/SqlAbstraction.py", line 538, in configure sql.configure_ddl_implicit_commit() File "Mce/SqlAbstraction.py", line 629, in configure_ddl_implicit_commit if sql._test_ddl(): File "Mce/SqlAbstraction.py", line 636, in _test_ddl sql.drop_table_if_exists("%stest_1" % sql.prefix) File "Mce/SqlAbstraction.py", line 607, in drop_table_if_exists sql._drop_if_exists("TABLE", obj) File "Mce/SqlAbstraction.py", line 604, in _drop_if_exists sql.rollback() File "Mce/SqlAbstraction.py", line 527, in rollback sql.reconnect() File "Mce/SqlAbstraction.py", line 270, in reconnect return sql.conn() File "Mce/SqlAbstraction.py", line 253, in conn sql._conn = sql.connect() File "Mce/SqlAbstraction.py", line 214, in connect conn = sql._connect(cargs) File "Mce/SqlAbstraction.py", line 249, in _connect return sql.module.connect(cargs)sqlite3.OperationalError: unable to open database file

I have executed all the instructions before this given on the github page and they all worked perfectly. The explorer directory, after receiving the above error looks like -

garvitgoel03@testchain-admin:~/multichain-explorer$ lsbct-LICENSE.txt chain1.conf contrib MANIFEST.in README.md testbuild chain1.example.conf LICENSE.txt Mce setup.py tools

asked Aug 31, 2017 by Garvit Goel
So I am having the same problem installing the explorer. Followed everything to the letter. I'm getting this error:

Reconnecting after rollback error: unable to open database file
Reconnecting to database.
Reconnecting after rollback error: unable to open database file
Reconnecting to database.
Reconnecting after rollback error: unable to open database file
Reconnecting to database.
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/susdex/multichain-explorer/Mce/abe.py", line 4306, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/susdex/multichain-explorer/Mce/abe.py", line 4300, in main
    store = make_store(args)
  File "/home/susdex/multichain-explorer/Mce/abe.py", line 193, in make_store
    store = DataStore.new(args)
  File "Mce/DataStore.py", line 4355, in new
    return DataStore(args)
  File "Mce/DataStore.py", line 187, in __init__
    store.initialize()
  File "Mce/DataStore.py", line 725, in initialize
    store.configure()
  File "Mce/DataStore.py", line 1072, in configure
    config = store._sql.configure()
  File "Mce/SqlAbstraction.py", line 538, in configure
    sql.configure_ddl_implicit_commit()
  File "Mce/SqlAbstraction.py", line 629, in configure_ddl_implicit_commit
    if sql._test_ddl():
  File "Mce/SqlAbstraction.py", line 636, in _test_ddl
    sql.drop_table_if_exists("%stest_1" % sql.prefix)
  File "Mce/SqlAbstraction.py", line 607, in drop_table_if_exists
    sql._drop_if_exists("TABLE", obj)
  File "Mce/SqlAbstraction.py", line 604, in _drop_if_exists
    sql.rollback()
  File "Mce/SqlAbstraction.py", line 527, in rollback
    sql.reconnect()
  File "Mce/SqlAbstraction.py", line 270, in reconnect
    return sql.conn()
  File "Mce/SqlAbstraction.py", line 253, in conn
    sql._conn = sql.connect()
  File "Mce/SqlAbstraction.py", line 214, in connect
    conn = sql._connect(cargs)
  File "Mce/SqlAbstraction.py", line 249, in _connect
    return sql.module.connect(cargs)
sqlite3.OperationalError: unable to open database file


Any ideas? My config file looks good, not sure what I'm missing. It seems that the database file isn't even ever created (I don't see it as listed in the conf file).
If this is the first time you've run the Explorer, maybe the user under which you're running it doesn't have permissions to write to the directory?

1 Answer

0 votes
Sorry I can't help a lot just give some obvious check up:
- Do you are sure the conf1.conf file is right configured ? Could you post here hiding or camoufling sensible data
- Try to delete the db file and retry to launch the command
- ehm do you are sure the chain is running ?
answered Aug 31, 2017 by Gianni
...