3916
TestNet Discussion Archive / Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« on: October 14, 2017, 09:35:44 AM »Good news, I think I got a master node working!
(One gotchya was that with AWS (Amazon Web Services) I needed to add inbound rule for port 40001 in the security group of the EC2)
Love your updates to the Masternode guide Rob!
http://wiki.biblepay.org/Create_Masternode
===
Bad news, Im having trouble with Watchman:
https://github.com/biblepay/biblepay/blob/master/BuildBiblePay.txt
https://github.com/biblepay/watchman
Im using Ubuntu 16.04
My watchman.conf:
~/.biblepaycore/watchman$ venv/bin/python bin/watchman.pyCode: [Select][error]: unable to open database file
Cannot connect to database. Please ensure database service is running and user access is properly configured in 'watchman.conf'.
Source Code:
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/init.py#L46
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/config.py#L82
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/config.py#L37
===
~/.biblepaycore/watchman$ venv/bin/pip list
inflection (0.3.1)
peewee (2.8.3)
pip (9.0.1)
pkg-resources (0.0.0)
py (1.4.31)
wheel (0.30.0)
===
So it seems like database file isnt getting created? Im not sure
Looks like peewee library handles the database stuff?
if driver == peewee.SqliteDatabase:
db_conn = {}
db = driver(db_name, **db_conn)
Oh man thats great! You almost have it working. Yeah, on the watchman, I will add those instructions to the create_masternode guide in a few minutes for everyone else.
So lets start with a couple basic things to see if the problem reveals itself.
Im no python guy, but during the time that I was debugging the first superblock I had to figure out how to turn peewee logging on and I was successfully able to see the watchman debug output and figure out where the system was breaking. So step 1 that might help a little is turning on the logging, and then try to run the venv/bin/python watchman.py again, here is how I turned on logging:
First cd into the watchman directory
Then execute the python interpreter like this:
venv/bin/python
Then you will see the python interpreter command line:
Python interpreter>>
Type:
import os;
os.env["WATCHMAN_DEBUG"]="1";
quit()
Then rerun venv/bin/python watchman.py first to see if it reveals anything.
Btw, I think you already modified your config file properly as it looks good.
The database file itself should have been downloaded to the watchman directory - its called "Watchman". If you ls -l, and cat the file it should have some tables in it. Note the case is "Watchman" in this case.
To check to see what is in the database, if you have not gotten further try this:
sudo apt-get install sqlite3
sqlite3 Watchman
sqlite>
select * from votes;
.table <enter>
See if the .table command lists out all the governance object tables? Or if possibly the "Watchman" file does not even exist in the directory?
Im not sure if you have access to any other machines, but it would also be good to know if the behavior is different on another machine (IE Watchman gets created on ubuntu, but not at AWS).
We will have to see which step it fails to create the database file in.