couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Torres <ptorres...@gmail.com>
Subject Not too important...until it causes something to break...
Date Sun, 15 Jan 2012 01:02:01 GMT
Does anyone have any idea how this happened? Hopefully it'll help somebody.

I have 2 near-identical machines. They run the same OS (Debian
Squeeze), with the same versions of Erlang, etc., and other
dependencies. I built the same version of CouchDB from source (1.1.0)
and built the same version from source of geocouch, and the directory
structures are near identical...and are identical in the /usr
directory which was the target of the make install for couchdb, but:

On my 2nd machine I spent an entire day figuring out that my couchdb
was crashing only when the geocouch.ini file was in place. And this
was only discernable via the log file, because at the command line it
gave no hint of crashing aside from being unreachable by curl or
futon. Why was this? Because the erlang path did not include the beam
files in my geocouch build. The log file showed errors that partly
stated: ... [error] ...
{errorContext,starterror},{reason{'EXIT',undef,[{couch_spatial,start_link,[]}
...

My environment had specified the proper path with ERL_FLAGS="-pa
/path/to/geocouch/build" as per the readme and as I had done on my 1st
machine--which is working even now. Just throwing spaghetti at the
wall in desperation--along with reinstalling couchdb and geocouch--I
read here (http://markmail.org/message/abpfknxj4vm62qym) about using a
slightly different erlang environment variable: ERL_ZFLAGS="-pz
/path/to/geocouch/ebin".

That fixed things for me, and now my 2nd machine works, couchdb doesnt
crash, and futon tests pass including the spatial tests. But it
refuses to work any other way and I wasted an entire day on this.
What's the diff? Is this caused by something that will cause more
problems down the road? As far as I can tell there is no difference
between ERL_FLAGS and ERL_ZFLAGS, yet there is in practice. And why
else would there be 2 kinds of ERL flags anyway?

I should mention that I bone-headedly made the mistake of building the
wrong version of couchdb on top of a prior version by mistake...but I
removed the resulting mess...and then built the correct version...but
I don't see how that affects the erlang path. I even reinstalled
erlang packages to no effect as well prior to hitting upon the
ERL_ZFLAG. Futon shows the correct version too.

-Paul

Mime
View raw message