Re: [Learningreg-Dev] Errors creating test installation of LR

62 views
Skip to first unread message

Jim Klo

unread,
Sep 28, 2012, 12:39:17 PM9/28/12
to <learningreg-dev@googlegroups.com>
What version did you clone?

I'll suggest, for the time being to review the following install steps:

I don't know if we've gotten documentation on the current build to align with/without node signing.  This sounds a lot like node setup has not run.

- Jim


Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac

On Sep 24, 2012, at 8:25 AM, Martin <martin....@education.ky.gov>
 wrote:

Hello,

I am trying to create a test installation of LR and am getting some errors.  Host is ubuntu: Linux <node-name> 3.0.0-12-server #20-Ubuntu SMP Fri Oct 7 16:36:30 UTC 2011 x86_
64 x86_64 x86_64 GNU/Linux

 I'm working from the general instructions here: https://github.com/LearningRegistry/LearningRegistry/wiki/Linux-Installation-Guide.  All seems to progress as expected until installation step 6; after answering several of the questions (through "is this node a destination for replication" or similar) from the setup_node.py script there is a traceback message of which the most meaningful part to me is "exception while creating database: {Errno 111] connection refused".  It appears that couchdb itself is running, based on response to curl -X GET http://<FQDN-of-host>:5984.  When I move on and attempt to start the LR code with uwsgi I get an error that ends with "Exception: Error 1 of type 'community_description' is required in database 'community'".  Using the couchdb console I see a number of databases, including "incoming", "network", "node", and "resource_data", but not "community".  I repeated Installation step 6 one time and this time more of the script (perhaps all) completed, but with a mixture of success and traceback messages (including "Errno 111] Connection refused" after "destination for replication?") ; however, after this second attempt the errors from running uwsgi were similar if not identical.


Any suggestions on how to proceed or diagnose?

thanks!

Martin

--
---
This message is posted from the Google Groups "Learning Registry Developers List" group.
To post: learnin...@googlegroups.com
To unsubscribe: learningreg-d...@googlegroups.com

Martin

unread,
Sep 28, 2012, 3:44:29 PM9/28/12
to learnin...@googlegroups.com

Hi,

Thanks for responding.

Regarding what version I cloned, in step 6 I executed:

git checkout 0.23.7

Does that answer the question?


After my attempt described below, I re-executed "python setup_node.py –d" and this time, when prompted "should this node be a destination for replication" (or similar) I answered "F", after which the script (after asking more questions) appeared to complete without any errors.  However, I have the publishing problem described in my other post.

Would I be better off starting fresh with the instructions you referenced?

thanks!

Martin

Jim Klo

unread,
Sep 28, 2012, 5:10:26 PM9/28/12
to <learningreg-dev@googlegroups.com>
There's been enough significant change that I'd pull straight from master right now.  There's one issue Walt and I are trying to track down related to publishing with Basic Auth and the Node Signing, it seems the hash is missing from the signature.  

Right now please be sure to self sign before you publish.  Stay tuned - this should be fixed within the next few days if not sooner.

- Jim


Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International

On Sep 28, 2012, at 12:44 PM, Martin <martin....@education.ky.gov>
 wrote:

Martin

unread,
Oct 1, 2012, 5:02:27 PM10/1/12
to learnin...@googlegroups.com
Hi,

Using the directions you pointed to (https://github.com/LearningRegistry/LearningRegistry/blob/master/LR/docs/LR%20Install%20with%20Node%20Signing%20Capabilities%20on%20Ubuntu.md)  and making good progress, but I need to clarify - at the beginning of step 6b am I supposed to be logged in with the learnreg user, the couchdb user, or something else?

thanks!

Martin

Jim Klo

unread,
Oct 1, 2012, 5:14:03 PM10/1/12
to <learningreg-dev@googlegroups.com>
Yes, for simplicity you should be logged in or "su'ed" as the user account you created for running the node. Otherwise you can store create the keystone anywhere, but you will need to ensure the user running the node as read rights to the keystore.

Apologies for that - this set of notes is somewhat abbreviated from those in the wiki, however this one covers some of the new features you'll encounter with the latest release.

FWIW:
CouchDB can be installed as any user (and in any location). I recommend creating a separate user for this.
Create a user for LearningRegistry software.  Use it for everything else.
Neither user should require sudo privileges, unless you want to grant them temporarily just to get some of the dependencies installed.

- Jim


Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac

On Oct 1, 2012, at 2:02 PM, Martin <martin....@education.ky.gov>

Martin

unread,
Oct 1, 2012, 9:30:16 PM10/1/12
to learnin...@googlegroups.com
Ok, when trying to run python ./setup_node.py in step 6b, after su-ing to my learnreg user,  I get

            Traceback (most recent call last):
                  File "./setup_node.py", line 12, in <module>
                    import couchdb
                ImportError: No module named couchdb   

I suspect that, since I logged out and back in since doing the steps in 5b, I don't have quite the right python environment set up, but I can't figure out how to fix it (obv not much python experience).  I did try

        . env/bin/activate

from the /home/learnreg, then

        cd /home/learnreg/LearningRegistry/config

before executing python, but same results. 

Any ideas?

thanks!

Martin

Martin

unread,
Oct 2, 2012, 10:12:29 AM10/2/12
to learnin...@googlegroups.com
Jim,

Got your email, thanks.

Looking back at my notes I see that I had some warnings when running

pip install -e ./LearningRegistry/LR/

and not knowing if they were significant or not just proceeded on.  Just now I reran that step, after su learnreg, activating the virtualenv, and again saw lots of warnings.  I'm attaching the pip.log contains the gory details.  Ideas?

thanks!

Martin
pip.log

Jim Klo

unread,
Oct 2, 2012, 1:58:20 PM10/2/12
to <learningreg-dev@googlegroups.com>
From your log, my guess is that you have an old checkout, we discovered that that python-gnupg v .30 dependency disappeared, and it got quickly fixed in master, however I don't think it's tagged yet.

The easiest solution to this is to:

git checkout -b master origin/master
git pull --rebase origin/master

then from within your virtualenv

pip uninstall LR
pip install -e /path/to/LearningRegistry/LR

- Jim


Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac

<pip.log>

Martin

unread,
Oct 2, 2012, 4:08:42 PM10/2/12
to learnin...@googlegroups.com
Jim,

I suspect I am still failing.  I was eventually able to run setup_node.py, but I was not prompted for anything about oauth or node signing, and I got lots of messages like this:

(<class 'couchapp.errors.Unauthorized'>, Unauthorized(Unauthorized(),), <traceba
            ck object at 0x1428290>)
            WARNING:Unable to push CouchApp at '/home/learnreg/LearningRegistry/config/../co
            uchdb/resource_data/apps/learningregistry-resource-location'



My steps were as follows:

login as <my account>
        su learnreg
        cd ~
        pushd LearningRegistry

        git checkout -b master origin/master       
            says "fatal: A branch named 'master' already exists."
       
            git branch  shows that two existing branches are autosign and master

        git checkout -B master origin/master        (maybe will overwrite current content of master)
            error: Your local changes to the following files would be overwritten by checkout:
                    LR/LR.egg-info/SOURCES.txt
                    LR/LR.egg-info/requires.txt
            Please, commit your changes or stash them before you can switch branches.
            Aborting
        git commit -a -m "customized per instructions"
            seems to have worked
       
        git checkout -B master origin/master        (maybe will overwrite current content of master)
            Branch master set up to track remote branch master from origin.
            Switched to and reset branch 'master'

        git pull --rebase origin/master
            fatal: 'origin/master' does not appear to be a git repository
            fatal: The remote end hung up unexpectedly

        git pull --rebase git://github.com/jimklo/LearningRegistry
            From git://github.com/jimklo/LearningRegistry
             * branch            HEAD       -> FETCH_HEAD
            Current branch master is up to date.
        popd
        . env/bin/activate
            changes prompt
        pip uninstall LR
            Cannot uninstall requirement LR, not installed
            Storing complete log in /home/learnreg/.pip/pip.log

        pip install -e ./LearningRegistry/LR/
            downloads files, throws some warnings, does some gcc work, ends by saying
                Successfully installed WebOb Pylons pyparsing restkit couchdb lxml iso8601plus i
                json pystache PyJWT Couchapp LR Routes WebHelpers Beaker Paste PasteDeploy Paste
                Script FormEncode simplejson decorator nose Mako WebError WebTest Tempita repoze
                .lru MarkupSafe Pygments
                Cleaning up...

       cd /home/learnreg/LearningRegistry/config
        python ./setup_node.py
       
As you can see I departed from your specific instructions because I couldn't figure out how to get them to work.

Suggestions?

thanks!

Martin
Reply all
Reply to author
Forward
0 new messages