cjlee112 / spnet

selected papers network web engine
http://thinking.bioinformatics.ucla.edu/2011/07/02/open-peer-review-by-a-selected-papers-network/
GNU General Public License v2.0
40 stars 11 forks source link

Error when running my own copy of SPN #72

Closed ketch closed 11 years ago

ketch commented 11 years ago

I followed the instructions for setting up a local copy of SPN. However, I get this:

spnet/spnet - [master] » python -i web.py
Traceback (most recent call last):
  File "web.py", line 87, in <module>
    s = Server()
  File "web.py", line 13, in __init__
    dbconn = connect.init_connection(**kwargs)
  File "/Users/ketch/Research/Software/spnet/spnet/connect.py", line 34, in init_connection
    with open('../data.json') as ifile:
IOError: [Errno 2] No such file or directory: '../data.json'
cjlee112 commented 11 years ago

Sorry, it first tries to connect to mongodb on the default mongodb port without a password; if that fails it looks for a data.json file to give the parameters required for connecting to the database. So this error message means something is wrong with your mongod instance which following the instructions would be accepting connections without a password (on the production selectedpapers.net website mongodb is of course secured). Make sure that you can connect to your mongod by running the command shell:

/path/to/mongodb/bin/mongo

E.g. see the end of the mongodb install instructions: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-linux/

ketch commented 11 years ago

Thanks. So now I'm guessing that there is a step missing in the instructions at https://github.com/cjlee112/spnet/blob/master/doc/developer/overview.rst#running-your-own-spnet-server. I'm supposed to launch mongo before executing web.py, is that right?

I suspect those instructions were written for an audience whose assumed knowledge of databases and webservers is more advanced than mine.

cjlee112 commented 11 years ago

Actually, the first set of steps ("download MongoDB ... and get it running as follows...") should leave you with an instance of mongod running on your computer. Specifically the step:

bin/mongod --dbpath db

runs an instance of the mongo database. You just leave this running while you run your tests (I usually this in a "screen" session so I can detach and reattach at will)

ketch commented 11 years ago

Ack. I missed that. Thanks.

Closing.