You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Oliver Boermans <bo...@gmail.com> on 2009/08/02 09:08:17 UTC

I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Hi all, hope you are having a relaxing weekend.
I upgraded my couchdb to 0.9.1 (from 0.9.0) it worked mostly. One test
was failing in futon (replication), so in an effort to be thorough, I
upgraded a handful of dependencies which macports reported as
upgradable. Something in this process broke; After rebuilding and
installing it, couchdb will no longer launch,

Specifically I am attempting to launch couchdb with:
sudo -i -u couchdb couchdb

the first line in response says:
unable to change directory to  /usr/local/var/lib/couchdb: No such
file or directory

This directory does exist, just a moment earlier I set permissions on it:
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb

anyway, continuing from the response from my attempt to launch
couchdb, there are a bunch more permission and code_server errors
which are concluded with:
Apache CouchDB 0.9.1 (LogLevel=info) is starting.
{"init terminating in
do_boot","dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib\n  Referenced
from: /opt/local/lib/nspr/libplds4.dylib\n  Reason: image not found"}

I understand that my problem is most likely not couchdb specific, I
would appreciate any pointers while I save up for an Intel Mac to
replace my ageing PPC so I can run CouchDBX whose installation and
maintenance is more inline with my command line challenged skill set.

I have tried uninstalling and reinstalling erlang with macports
without any change. I’m open to the idea of cleaning out couchdb’s
dependencies to reinstall them from scratch, but I’m hoping you guys
might be able to suggest an approach that might be a little less time
consuming.

Alternatively time machine is operational on my Mac, but I don’t know
where to point it to roll back my macports updates.

Thanks in advance.
Ollie

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
Thanks Chris - I’ll give this a go tonight.

2009/8/4 Chris Anderson <jc...@apache.org>:
> This line suggests `make` was run with sudo or as a different user at
> some point. Blowing away the source tree and starting from a fresh
> download ought to have fixed this.
>
> There's an alternative build you could try, standing in a freshly
> untarred copy of the couchdb source, to be on the safe side: `make dev
> && utils/run`
>
> This will run CouchDB inside the source directory, instead of
> installing it. The advantage of this is that it should bypass any
> funny business happening on your machine. In the long run you'll want
> to `sudo make install` so that the database files don't go into a temp
> directory, but getting the dev build to happen will be a helpful
> debugging step (and get you on a running couch.)
>
> Also, for more real-time help, the #couchdb channel on
> irc.freenode.net is usually a good place to hang out.
>
> Thanks for working so hard to get it to run.
>
> Chris

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
Thanks Brian

2009/8/10 Brian Candler <B....@pobox.com>:
> Sorry to question the obvious, but you *did* actually run

Bring on the obvious questions! Because what is obvious to you may not
be so for me.

> $ ./configure
> $ make
> $ sudo make install
>
> between those steps?

Yeah, that is kind of obvious :) Yes.

> And you did create 'couchdb' user and group?

I did, it all worked until recently, although…

> You don't
> have two couchdb users or two couchdb groups in /etc/passwd or /etc/group ?

No sign of couchdb in either file - should there be?

There is definitely a couchdb user: it shows up in the Accounts
preference pane and my log-in screen and as suggested by someone else
to test:

$ dscl . -read /Users/couchdb
AppleMetaNodeLocation: /Local/Default
AuthenticationAuthority: ;ShadowHash;
;Kerberosv5;;couchdb@LKDC:SHA1.5623DDBBAD580A577D91C84EE144D8093E01056C;LKDC:SHA1.5623DDBBAD580A577D91C84EE144D8093E01056C;
AuthenticationHint: other
GeneratedUID: 8D05A7D0-3C98-451A-B2BC-64AE48FB0C34
NFSHomeDirectory:
  /usr/local/var/lib/couchdb
Password: ********
PrimaryGroupID: 99
RealName:
 CouchDB Administrator
RecordName: couchdb
RecordType: dsRecTypeStandard:Users
UniqueID: 99
UserShell: /bin/bash

Please tell me if that looks in someway broken – if so, perhaps I
should be deleting the user/group to start fresh…
There was something weird with the password but I amended that without
any change.

Please ask the obvious questions.
Ollie

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Brian Candler <B....@pobox.com>.
On Sat, Aug 08, 2009 at 12:57:24PM +0930, Oliver Boermans wrote:
> I followed these instructions (without change) here is the info they
> suggested I share:
> 
> Dual 2 GHx PoerPC G5
> 
> Dependencies:
> 
> - automake version: 1.11
> - autoconf version: 2.64
> - libtool version: 2.2.6a
> - help2man version: 1.36.4
> - icu version: 4.2.1
> - spidermonkey version: 1.7.0
> - curl version: 7.19.5
> - erlang version: R13B01
> 
> $ ./bootstrap
> You have bootstrapped Apache CouchDB, time to relax.
> 
> Run `./configure' to configure the source before you install.
> 
> 
> $ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
> $ sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb

Sorry to question the obvious, but you *did* actually run

$ ./configure
$ make
$ sudo make install

between those steps? And you did create 'couchdb' user and group? You don't
have two couchdb users or two couchdb groups in /etc/passwd or /etc/group ?

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
How serendipitous. Thanks Noah.

2009/8/8 Noah Slater <ns...@apache.org>:
> You'll need to figure out why this command isn't working. Can you log in as the
> couchdb user? Does it have a proper shell? What is the home directory set to?
> Does it exist? Does the user have permission to access it?

I’m re-reading <http://slawcup.com/2009/02/09/couchdb-relax.html> with
fingers crossed.

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/16 Oliver Boermans <bo...@gmail.com>:
> $ login couchdb
> Password:
> Login incorrect
>
> Maybe I am misunderstanding the function of login.

Small progress. I reset the password for my couchdb user with the
Accounts pref pane and now the command-line login succeeds and now
-read with dscl it actually masks the password.

No change on the couch launch unfortunately:

Apache CouchDB 0.9.1 (LogLevel=info) is starting.
{"init terminating in
do_boot","dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib\n  Referenced
from: /opt/local/lib/nspr/libplds4.dylib\n  Reason: image not found"}

Crash dump was written to: erl_crash.dump
init terminating in do_boot
(dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib
  Referenced from: /opt/local/li

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
I’m back onto this after restarting my Mac upon updating to OSX 10.5.7.

2009/8/8 Noah Slater <ns...@apache.org>:
> "You should make sure that the couchdb user has a working login shell. You can
>  test this logging into a terminal as the couchdb user. You should also make
>  sure to set the home directory to /usr/local/var/lib/couchdb which is the
>  CouchDB database directory."
>
> You'll need to figure out why this command isn't working. Can you log in as the
> couchdb user? Does it have a proper shell? What is the home directory set to?
> Does it exist? Does the user have permission to access it?

Yesterday I blew away my couchdb user and group as I discovered that
their unique IDs were not so unique. I recreated them (with more care)
following these instructions
<http://blog.deadinkvinyl.com/2008/07/12/couchdb-on-macosx-leopard/>.

After trashed the full contents of /usr/local/ and attempting to run a
freshly built and installed CouchDB I get exactly the same error:

init terminating in do_boot
(dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib

I believe the problem may still lie with the couchdb user I created as
now when I test as Noah has suggested above:

$ login couchdb
Password:
Login incorrect

Maybe I am misunderstanding the function of login.

Although this looks okay afaict:

$ dscl . -read /Users/couchdb
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 67CCCC0E-9933-4F44-BCFE-F9DA7FF3C5A4
NFSHomeDirectory: /usr/local/var/lib/couchdb
Password: *********
PrimaryGroupID: 100
RealName:
 CouchDB Administrator
RecordName: couchdb
RecordType: dsRecTypeStandard:Users
UniqueID: 100
UserShell: /bin/bash

AND

$ dscl . -read /Groups/couchdb
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 4279FBB1-D149-4BF1-8657-E14B947E1943
PrimaryGroupID: 100
RealName:
 CouchDB Users
RecordName: couchdb
RecordType: dsRecTypeStandard:Groups

AND

$ sudo -u couchdb ls /usr/local/var/lib/couchdb
Password:
erl_crash.dump

At this point I realise this is most likely not a CouchDB issue as
much as PEBCAK.
I’ll continue my Googling.
So much to learn…

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Noah Slater <ns...@apache.org>.
On Sat, Aug 08, 2009 at 12:57:24PM +0930, Oliver Boermans wrote:
> $ sudo -i -u couchdb couchdb
> sudo: unable to change directory to  /usr/local/var/lib/couchdb: No
> such file or directory

I'm working on the CouchDB book as we speak, and I literally just wrote:

  "You should make sure that the couchdb user has a working login shell. You can
  test this logging into a terminal as the couchdb user. You should also make
  sure to set the home directory to /usr/local/var/lib/couchdb which is the
  CouchDB database directory."

You'll need to figure out why this command isn't working. Can you log in as the
couchdb user? Does it have a proper shell? What is the home directory set to?
Does it exist? Does the user have permission to access it?

Thanks,

-- 
Noah Slater, http://tumbolia.org/nslater

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
Okay - I’m finally getting back to this

2009/8/7 Chris Anderson <jc...@apache.org>:
> As Noah mentioned on another thread, these wiki pages may be useful.
>
> http://wiki.apache.org/couchdb/Troubleshooting

I followed these instructions (without change) here is the info they
suggested I share:

Dual 2 GHx PoerPC G5

Dependencies:

- automake version: 1.11
- autoconf version: 2.64
- libtool version: 2.2.6a
- help2man version: 1.36.4
- icu version: 4.2.1
- spidermonkey version: 1.7.0
- curl version: 7.19.5
- erlang version: R13B01

$ ./bootstrap
You have bootstrapped Apache CouchDB, time to relax.

Run `./configure' to configure the source before you install.


$ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
$ sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb

$ sudo -i -u couchdb couchdb
sudo: unable to change directory to  /usr/local/var/lib/couchdb: No
such file or directory

…snip… Full output:
http://www.friendpaste.com/7eHDc3aXoo9Lss68V9YNN5
…snip…

Apache CouchDB 0.10.0a802285 (LogLevel=info) is starting.
{"init terminating in
do_boot","dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.10.0a802285/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib\n  Referenced
from: /opt/local/lib/nspr/libplds4.dylib\n  Reason: image not found"}
init terminating in do_boot
(dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.10.0a802285/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib
  Referenced from: /opt/

I’ll post my continued efforts separately. In the meantime if this
output sheds light on the problem I’d love to know about it. Cheers
Ollie

RE: adding key= clause to view

Posted by Michael McCaffrey <mm...@ittvis.com>.
I'm using the couchdb4j.

It's Database.view(String) only has one parameter. 

I see where it's View has functions for setting StartKey, EndKey, etc,
but nothing just for key. 

Thanks

-----Original Message-----
From: Paul Davis [mailto:paul.joseph.davis@gmail.com] 
Sent: Thursday, August 06, 2009 2:14 PM
To: user@couchdb.apache.org
Subject: Re: adding key= clause to view

On Thu, Aug 6, 2009 at 3:49 PM, Michael McCaffrey<mm...@ittvis.com>
wrote:
> I've got this view working in futon and running directly on a browser
> line.
>
> Any ideashow to get the parameter "key=1" to work with the db.view
>
>

Which db.view?

The python one would be db.view(name, key=1)

The jquery one would be db.view(name, {key: 1}) IIRC, but you'd want
to look at futon code to double check.

Paul Davis

Re: adding key= clause to view

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Aug 6, 2009 at 3:49 PM, Michael McCaffrey<mm...@ittvis.com> wrote:
> I've got this view working in futon and running directly on a browser
> line.
>
> Any ideashow to get the parameter "key=1" to work with the db.view
>
>

Which db.view?

The python one would be db.view(name, key=1)

The jquery one would be db.view(name, {key: 1}) IIRC, but you'd want
to look at futon code to double check.

Paul Davis

adding key= clause to view

Posted by Michael McCaffrey <mm...@ittvis.com>.
I've got this view working in futon and running directly on a browser
line.

Any ideashow to get the parameter "key=1" to work with the db.view


Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Per Ejeklint <ej...@mac.com>.
6 aug 2009 kl. 17.39 skrev Chris Anderson:

> On Tue, Aug 4, 2009 at 3:30 AM, Oliver Boermans<bo...@gmail.com>  
> wrote:
>>
>> I’ve tried this just now. The command line response was:
>>
>> make: *** No rule to make target `dev'.  Stop.
>>
>
> Sorry, I think you need to run ./configure before make will work.
>
> As Noah mentioned on another thread, these wiki pages may be useful.
>
> http://wiki.apache.org/couchdb/Troubleshooting
>
> http://wiki.apache.org/couchdb/Error_messages
>
> Maybe those will help too.
>
> Chris

And today I even had to run  ./bootstrap first, then ./configure and  
make to get the build going.

/Per



Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Chris Anderson <jc...@apache.org>.
On Tue, Aug 4, 2009 at 3:30 AM, Oliver Boermans<bo...@gmail.com> wrote:
> 2009/8/4 Chris Anderson <jc...@apache.org>:
>> This line suggests `make` was run with sudo or as a different user at
>> some point. Blowing away the source tree and starting from a fresh
>> download ought to have fixed this.
>
> The words “source tree” suggests the svn source code. Should I be
> getting the tagged 0.9.1 from there rather than downloading the
> release from <http://couchdb.apache.org/downloads.html>?
>
> I’d go with the trunk, but I’m concerned that there might be breaking
> changes (that I haven’t kept up with) to what I’ve been working on.
>
>> There's an alternative build you could try, standing in a freshly
>> untarred copy of the couchdb source, to be on the safe side: `make dev
>> && utils/run`
>
> I’ve tried this just now. The command line response was:
>
> make: *** No rule to make target `dev'.  Stop.
>

Sorry, I think you need to run ./configure before make will work.

As Noah mentioned on another thread, these wiki pages may be useful.

http://wiki.apache.org/couchdb/Troubleshooting

http://wiki.apache.org/couchdb/Error_messages

Maybe those will help too.

Chris

> Which again suggests to me I may not be installing from the ideal source?
>
>> Thanks for working so hard to get it to run.
>
> Once you get on the couch getting off can be difficult :)
>
> Okay off to #couchdb. I’ll post a reply if I figure out what the
> stupid thing is I’ve done here.
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Nils Breunese <n....@vpro.nl>.
Oliver Boermans wrote:

> 2009/8/4 Chris Anderson <jc...@apache.org>:
>> This line suggests `make` was run with sudo or as a different user at
>> some point. Blowing away the source tree and starting from a fresh
>> download ought to have fixed this.
> 
> The words “source tree” suggests the svn source code. Should I be
> getting the tagged 0.9.1 from there rather than downloading the
> release from <http://couchdb.apache.org/downloads.html>?

The tarball release also expands to a source tree. There are no binary 
downloads on the CouchDB website.

Nils.

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/4 Chris Anderson <jc...@apache.org>:
> This line suggests `make` was run with sudo or as a different user at
> some point. Blowing away the source tree and starting from a fresh
> download ought to have fixed this.

The words “source tree” suggests the svn source code. Should I be
getting the tagged 0.9.1 from there rather than downloading the
release from <http://couchdb.apache.org/downloads.html>?

I’d go with the trunk, but I’m concerned that there might be breaking
changes (that I haven’t kept up with) to what I’ve been working on.

> There's an alternative build you could try, standing in a freshly
> untarred copy of the couchdb source, to be on the safe side: `make dev
> && utils/run`

I’ve tried this just now. The command line response was:

make: *** No rule to make target `dev'.  Stop.

Which again suggests to me I may not be installing from the ideal source?

> Thanks for working so hard to get it to run.

Once you get on the couch getting off can be difficult :)

Okay off to #couchdb. I’ll post a reply if I figure out what the
stupid thing is I’ve done here.

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
On Mon, Aug 10, 2009 at 3:53 PM, Brian Candler<B....@pobox.com> wrote:
> On Mon, Aug 10, 2009 at 11:16:04PM +0930, Oliver Boermans wrote:
>> 2009/8/10 Paul Davis <pa...@gmail.com>:
>> > This is quite odd that some commands think this directory exists and
>> > others don't. Can you try removing and creating that directory?
>>
>> I trashed it (careful to move my database files first of course) and
>> recreated it
>>
>> $ cd /usr/local/var/lib
>> $ sudo mkdir couchdb
>> $ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
>>
>> Then same as before:
>>
>> $ login couchdb
>> Password:
>> No home directory  /usr/local/var/lib/couchdb!
>                    ^
>                    |
> There couldn't possibly be an extra space in there by any chance??
>
> I'm not a Mac user, but I notice your dscl output split this particular
> attribute onto a line of its own:
>
> NFSHomeDirectory:
>  /usr/local/var/lib/couchdb
>

Where did NFS come from? Did I miss that /usr/local/var/lib/couchdb is
on an NFS partition? Then again, could that affect anything? We don't
do any locking, but you can run into weird permission type errors or
other nasty bits. If it is on an NFS partition could you try switching
to non-NFS just to see if that's an effect?

Unless of course NFSHomeDirectory has nothing to do with networked
file system, in which case feel free to ignore me.

Paul Davis

> which is suspicious to me.
>
> Regards,
>
> Brian.
>

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Rhett Sutphin <rh...@detailedbalance.net>.
Hi,

On Aug 10, 2009, at 2:53 PM, Brian Candler wrote:

> On Mon, Aug 10, 2009 at 11:16:04PM +0930, Oliver Boermans wrote:
>> 2009/8/10 Paul Davis <pa...@gmail.com>:
>>> This is quite odd that some commands think this directory exists and
>>> others don't. Can you try removing and creating that directory?
>>
>> I trashed it (careful to move my database files first of course) and
>> recreated it
>>
>> $ cd /usr/local/var/lib
>> $ sudo mkdir couchdb
>> $ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
>>
>> Then same as before:
>>
>> $ login couchdb
>> Password:
>> No home directory  /usr/local/var/lib/couchdb!
>                    ^
>                    |
> There couldn't possibly be an extra space in there by any chance??
>
> I'm not a Mac user, but I notice your dscl output split this  
> particular
> attribute onto a line of its own:
>
> NFSHomeDirectory:
>  /usr/local/var/lib/couchdb
>
> which is suspicious to me.

FWIW, on my OS X machine with a functioning instance of couch 0.9.1,  
NFSHomeDirectory and its value all shows up on one line.  Other keys'  
values are wrapped onto separate lines, though, so I'm not sure this  
is proof of anything.  Also, mine is called "NFSHomeDirectory" and is  
on a local disk.  Not sure what NFS stands for here.

In the barrel-scraping department: have you (Oliver) ensured that /usr/ 
local/var/lib/couchdb is readable by the couchdb user?  Not just that  
the directory itself has the correct permissions, but that the couchdb  
user can traverse to it.  What happens if you do

$ sudo -u couchdb ls /usr/local/var/lib/couchdb

?  If it isn't readable, but it is owned by couchdb, you should check  
that all its parent directories are executable by the couchdb user.   
(On my system they are executable by everyone.)

Rhett

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Brian Candler <B....@pobox.com>.
On Mon, Aug 10, 2009 at 11:16:04PM +0930, Oliver Boermans wrote:
> 2009/8/10 Paul Davis <pa...@gmail.com>:
> > This is quite odd that some commands think this directory exists and
> > others don't. Can you try removing and creating that directory?
> 
> I trashed it (careful to move my database files first of course) and
> recreated it
> 
> $ cd /usr/local/var/lib
> $ sudo mkdir couchdb
> $ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
> 
> Then same as before:
> 
> $ login couchdb
> Password:
> No home directory  /usr/local/var/lib/couchdb!
                    ^
                    |
There couldn't possibly be an extra space in there by any chance??

I'm not a Mac user, but I notice your dscl output split this particular
attribute onto a line of its own:

NFSHomeDirectory:
  /usr/local/var/lib/couchdb

which is suspicious to me.

Regards,

Brian.

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
> Perhaps I need to try trashing something higher up the structure… make
> install creates these directories as needed right? Everything inside
> /usr/local/ appears to be couchdb related. Should I try trashing the
> lot for a clean slate?
>

You could try that. Another thing to try might be setting the couchdb
user's home to something like / and then cd'ing to the
/usr/local/var/lib/couchdb.

A random crazy idea, you don't happen to have a terminal open
somewhere that's sitting in a deleted /usr/local/var/lib/couchdb
directory that was deleted? I don't *think* this could even cause this
behavior, but I've moved to guessing as this is a weird error.

Paul Davis

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/10 Paul Davis <pa...@gmail.com>:
> This is quite odd that some commands think this directory exists and
> others don't. Can you try removing and creating that directory?

I trashed it (careful to move my database files first of course) and
recreated it

$ cd /usr/local/var/lib
$ sudo mkdir couchdb
$ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb

Then same as before:

$ login couchdb
Password:
No home directory  /usr/local/var/lib/couchdb!
...


Perhaps I need to try trashing something higher up the structure… make
install creates these directories as needed right? Everything inside
/usr/local/ appears to be couchdb related. Should I try trashing the
lot for a clean slate?

Thanks
Ollie

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
On Mon, Aug 10, 2009 at 9:26 AM, Oliver Boermans<bo...@gmail.com> wrote:
> 2009/8/4 Chris Anderson <jc...@apache.org>:
>> There's an alternative build you could try, standing in a freshly
>> untarred copy of the couchdb source, to be on the safe side: `make dev
>> && utils/run`
>
> Finally got around to trying this and got what appears to be the same error.
>
> Here’s the whole output in case there is something relevant
> <http://www.friendpaste.com/7KqBEJN7StwYjY8I3zkR9p>
>
> As suggested by Noah’s I’m attempting to test the couchdb user:
>
> $ login couchdb
> Password:
> No home directory  /usr/local/var/lib/couchdb!
>
> Which is weird as I am looking at this directory now.
>
> Do I need to do more than:
> $ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
>
> To give the couchdb user access to it?
>
> I’m sorry if this is elementary.
> Ollie
>

This is quite odd that some commands think this directory exists and
others don't. Can you try removing and creating that directory?

Paul Davis

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/4 Chris Anderson <jc...@apache.org>:
> There's an alternative build you could try, standing in a freshly
> untarred copy of the couchdb source, to be on the safe side: `make dev
> && utils/run`

Finally got around to trying this and got what appears to be the same error.

Here’s the whole output in case there is something relevant
<http://www.friendpaste.com/7KqBEJN7StwYjY8I3zkR9p>

As suggested by Noah’s I’m attempting to test the couchdb user:

$ login couchdb
Password:
No home directory  /usr/local/var/lib/couchdb!

Which is weird as I am looking at this directory now.

Do I need to do more than:
$ sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb

To give the couchdb user access to it?

I’m sorry if this is elementary.
Ollie

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Chris Anderson <jc...@apache.org>.
On Sun, Aug 2, 2009 at 12:50 AM, Oliver Boermans<bo...@gmail.com> wrote:
> 2009/8/2 Paul Davis <pa...@gmail.com>:
>> Try 'make clean && make' in your couchdb directory to make sure
>> everything gets rebuilt and relinked.
>
> No change unfortunately, so I tried it twice and noticed a (useful ?)
> line in the response:
>
>    couch_erl_driver.c:177: fatal error: opening dependency file
> .deps/couch_erl_driver_la-couch_erl_driver.Tpo: Permission denied

Oliver,

This line suggests `make` was run with sudo or as a different user at
some point. Blowing away the source tree and starting from a fresh
download ought to have fixed this.

There's an alternative build you could try, standing in a freshly
untarred copy of the couchdb source, to be on the safe side: `make dev
&& utils/run`

This will run CouchDB inside the source directory, instead of
installing it. The advantage of this is that it should bypass any
funny business happening on your machine. In the long run you'll want
to `sudo make install` so that the database files don't go into a temp
directory, but getting the dev build to happen will be a helpful
debugging step (and get you on a running couch.)

Also, for more real-time help, the #couchdb channel on
irc.freenode.net is usually a good place to hang out.

Thanks for working so hard to get it to run.

Chris


>
> I’m beginning to think my previous installs were blessed - up until
> now I have had no installation pain with couchdb.
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Aug 2, 2009 at 3:55 AM, Paul Davis<pa...@gmail.com> wrote:
> Hmm, two more things:
>
> make dist-clean (or distclean) && make
>
> Or, blow away the directory and rebuild. Normally I'd say "git reset

And re-untar that is

> --hard HEAD && git clean -fxd && ./bootstrap && ./configure && make
> dev" but you said tarball and I'm not entirely sure on the "reset to
> just untarred state" target is.
>
> HTH,
> Paul Davis
>
> On Sun, Aug 2, 2009 at 3:50 AM, Oliver Boermans<bo...@gmail.com> wrote:
>> 2009/8/2 Paul Davis <pa...@gmail.com>:
>>> Try 'make clean && make' in your couchdb directory to make sure
>>> everything gets rebuilt and relinked.
>>
>> No change unfortunately, so I tried it twice and noticed a (useful ?)
>> line in the response:
>>
>>    couch_erl_driver.c:177: fatal error: opening dependency file
>> .deps/couch_erl_driver_la-couch_erl_driver.Tpo: Permission denied
>>
>> I’m beginning to think my previous installs were blessed - up until
>> now I have had no installation pain with couchdb.
>>
>

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/3 Nitin Borwankar <ni...@borwankar.com>:
> should it be couchdb.couchdb rather than ':'  ?
> I usually use "." as the separator in this command line

Nope:
chown: couchdb.couchdb: Invalid argument

I gotto go to work (damn these time zones)…

Catch you later.
Ollie

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Nitin Borwankar <ni...@borwankar.com>.
Oliver Boermans wrote:
> 2009/8/3 Noah Slater <ns...@apache.org>:
>   
>> Check what the home directory of the couchdb user is:
>>
>>  * Does it exist?
>>     
>
> Yes
>
>   
>>  * Does the couchdb user have permission?
>>     
>
> I suspect not. Although I have run:
> sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
>   

should it be couchdb.couchdb rather than ':'  ?
I usually use "." as the separator in this command line

Nitin
> To set it up initially I followed the "Creating a couchdb System
> Account" instructions here:
> http://blog.deadinkvinyl.com/2008/07/12/couchdb-on-macosx-leopard/
>
> This worked at the time. I guess now that I have upgraded I have lost
> something along the way. The user still appears in my startup screen,
> but perhaps something of it has become unstuck.
>   


Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/3 Noah Slater <ns...@apache.org>:
> Check what the home directory of the couchdb user is:
>
>  * Does it exist?

Yes

>  * Does the couchdb user have permission?

I suspect not. Although I have run:
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb

To set it up initially I followed the "Creating a couchdb System
Account" instructions here:
http://blog.deadinkvinyl.com/2008/07/12/couchdb-on-macosx-leopard/

This worked at the time. I guess now that I have upgraded I have lost
something along the way. The user still appears in my startup screen,
but perhaps something of it has become unstuck.

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Noah Slater <ns...@apache.org>.
On Sun, Aug 02, 2009 at 02:52:33PM -0400, Paul Davis wrote:
> >        $ sudo -i -u couchdb couchdb
> >        sudo: unable to change directory to  /usr/local/var/lib/couchdb: No
> > such file or directory
> >        couchdb: couchdb: is a directory
> >
> > Clearly I’m doing something very basically wrong?
> >
>
> /usr/local/var/lib/couchdb is a directory isn't it?

Check what the home directory of the couchdb user is:

  * Does it exist?

  * Does the couchdb user have permission?

Best,

-- 
Noah Slater, http://tumbolia.org/nslater

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/3 Paul Davis <pa...@gmail.com>:
> what happens for:
>
> $ sudo su - couchdb
> $ couchdb

Apache CouchDB 0.9.1 (LogLevel=info) is starting.
{"init terminating in
do_boot","dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib\n  Referenced
from: /opt/local/lib/nspr/libplds4.dylib\n  Reason: image not found"}

Crash dump was written to: erl_crash.dump
init terminating in do_boot
(dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
2): Library not loaded: /opt/local/lib/libnspr4.dylib
  Referenced from: /opt/local/li

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
what happens for:

$ sudo su - couchdb
$ couchdb

On Sun, Aug 2, 2009 at 6:20 PM, Oliver Boermans<bo...@gmail.com> wrote:
> 2009/8/3 Paul Davis <pa...@gmail.com>:
>> /usr/local/var/lib/couchdb is a directory isn't it?
> Yes
>
>> $ sudo su -
>> $ cd /usr/local/var/lib/couchdb
>>
>> Works?
> Yes
>

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/3 Paul Davis <pa...@gmail.com>:
> /usr/local/var/lib/couchdb is a directory isn't it?
Yes

> $ sudo su -
> $ cd /usr/local/var/lib/couchdb
>
> Works?
Yes

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Aug 2, 2009 at 6:10 AM, Oliver Boermans<bo...@gmail.com> wrote:
> 2009/8/2 Paul Joseph Davis <pa...@gmail.com>:
>> The idea was to remove all partial build products and start from scratch. Is
>> it still not working if you re-untar?
>
> If by re-untar you mean trashing the directory created when I
> decompress apache-couchdb-0.9.1.tar.gz (which I have done by double
> clicking it in the Finder) and recreating it by doing the same before
> running:
>
>        cd apache-couchdb-0.9.1
>        ./configure && make && sudo make install
>
> Then no, it’s still not working after I do that.
>
> I did it again just now to be sure.
> Then attempt to launch:
>
>        $ sudo -i -u couchdb couchdb
>        sudo: unable to change directory to  /usr/local/var/lib/couchdb: No
> such file or directory
>        couchdb: couchdb: is a directory
>
> Clearly I’m doing something very basically wrong?
>

/usr/local/var/lib/couchdb is a directory isn't it?

$ sudo su -
$ cd /usr/local/var/lib/couchdb

Works?

Paul

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/2 Paul Joseph Davis <pa...@gmail.com>:
> The idea was to remove all partial build products and start from scratch. Is
> it still not working if you re-untar?

If by re-untar you mean trashing the directory created when I
decompress apache-couchdb-0.9.1.tar.gz (which I have done by double
clicking it in the Finder) and recreating it by doing the same before
running:

	cd apache-couchdb-0.9.1
	./configure && make && sudo make install

Then no, it’s still not working after I do that.

I did it again just now to be sure.
Then attempt to launch:

	$ sudo -i -u couchdb couchdb
	sudo: unable to change directory to  /usr/local/var/lib/couchdb: No
such file or directory
	couchdb: couchdb: is a directory

Clearly I’m doing something very basically wrong?

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Joseph Davis <pa...@gmail.com>.



On Aug 2, 2009, at 5:02 AM, Oliver Boermans <bo...@gmail.com> wrote:

> 2009/8/2 Paul Davis <pa...@gmail.com>:
>> Hmm, two more things:
>>
>> make dist-clean (or distclean) && make
>
> I’m not sure what the result of this should be. Should I be doing a
> make install next to reinstall?
>

The idea was to remove all partial build products and start from  
scratch. Is it still not working if you re-untar?

>> Or, blow away the directory and rebuild. Normally I'd say "git reset
>> --hard HEAD && git clean -fxd && ./bootstrap && ./configure && make
>> dev" but you said tarball and I'm not entirely sure on the "reset to
>> just untarred state" target is.
>
> Not sure I follow you…
> I downloaded a copy of apache-couchdb-0.9.1.tar.gz from
> http://couchdb.apache.org/downloads.html
> I have deleted the uncompressed copy of the directory before trying:
>
> ./configure && make && sudo make install
>
> from a fresh copy.
>
> Should I instead get it from git or svn (http://svn.apache.org)?

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/2 Paul Davis <pa...@gmail.com>:
> Hmm, two more things:
>
> make dist-clean (or distclean) && make

I’m not sure what the result of this should be. Should I be doing a
make install next to reinstall?

> Or, blow away the directory and rebuild. Normally I'd say "git reset
> --hard HEAD && git clean -fxd && ./bootstrap && ./configure && make
> dev" but you said tarball and I'm not entirely sure on the "reset to
> just untarred state" target is.

Not sure I follow you…
I downloaded a copy of apache-couchdb-0.9.1.tar.gz from
http://couchdb.apache.org/downloads.html
I have deleted the uncompressed copy of the directory before trying:

./configure && make && sudo make install

from a fresh copy.

Should I instead get it from git or svn (http://svn.apache.org)?

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
Hmm, two more things:

make dist-clean (or distclean) && make

Or, blow away the directory and rebuild. Normally I'd say "git reset
--hard HEAD && git clean -fxd && ./bootstrap && ./configure && make
dev" but you said tarball and I'm not entirely sure on the "reset to
just untarred state" target is.

HTH,
Paul Davis

On Sun, Aug 2, 2009 at 3:50 AM, Oliver Boermans<bo...@gmail.com> wrote:
> 2009/8/2 Paul Davis <pa...@gmail.com>:
>> Try 'make clean && make' in your couchdb directory to make sure
>> everything gets rebuilt and relinked.
>
> No change unfortunately, so I tried it twice and noticed a (useful ?)
> line in the response:
>
>    couch_erl_driver.c:177: fatal error: opening dependency file
> .deps/couch_erl_driver_la-couch_erl_driver.Tpo: Permission denied
>
> I’m beginning to think my previous installs were blessed - up until
> now I have had no installation pain with couchdb.
>

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
2009/8/2 Paul Davis <pa...@gmail.com>:
> Try 'make clean && make' in your couchdb directory to make sure
> everything gets rebuilt and relinked.

No change unfortunately, so I tried it twice and noticed a (useful ?)
line in the response:

    couch_erl_driver.c:177: fatal error: opening dependency file
.deps/couch_erl_driver_la-couch_erl_driver.Tpo: Permission denied

I’m beginning to think my previous installs were blessed - up until
now I have had no installation pain with couchdb.

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Aug 2, 2009 at 3:25 AM, Oliver Boermans<bo...@gmail.com> wrote:
> Thanks Paul
>
> 2009/8/2 Paul Davis <pa...@gmail.com>:
>> Try 'make clean && make' in your couchdb directory to make sure
>> everything gets rebuilt and relinked.
>
> Do you mean the directory where I downloaded to and built couchdb from?
>

Yup.

>> Also, try 'nspr-config --version' to make sure it's still installed
>> and ports didn't choke when upgrading or something funky.
>
> It says:
> 4.8.0
>

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
Thanks Paul

2009/8/2 Paul Davis <pa...@gmail.com>:
> Try 'make clean && make' in your couchdb directory to make sure
> everything gets rebuilt and relinked.

Do you mean the directory where I downloaded to and built couchdb from?

> Also, try 'nspr-config --version' to make sure it's still installed
> and ports didn't choke when upgrading or something funky.

It says:
4.8.0

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Paul Davis <pa...@gmail.com>.
Looks like libnspr got upgraded but couch_erl_driver isn't linking
against the new version.

Try 'make clean && make' in your couchdb directory to make sure
everything gets rebuilt and relinked.

Also, try 'nspr-config --version' to make sure it's still installed
and ports didn't choke when upgrading or something funky.

HTH,
Paul Davis

On Sun, Aug 2, 2009 at 3:08 AM, Oliver Boermans<bo...@gmail.com> wrote:
> Hi all, hope you are having a relaxing weekend.
> I upgraded my couchdb to 0.9.1 (from 0.9.0) it worked mostly. One test
> was failing in futon (replication), so in an effort to be thorough, I
> upgraded a handful of dependencies which macports reported as
> upgradable. Something in this process broke; After rebuilding and
> installing it, couchdb will no longer launch,
>
> Specifically I am attempting to launch couchdb with:
> sudo -i -u couchdb couchdb
>
> the first line in response says:
> unable to change directory to  /usr/local/var/lib/couchdb: No such
> file or directory
>
> This directory does exist, just a moment earlier I set permissions on it:
> sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
>
> anyway, continuing from the response from my attempt to launch
> couchdb, there are a bunch more permission and code_server errors
> which are concluded with:
> Apache CouchDB 0.9.1 (LogLevel=info) is starting.
> {"init terminating in
> do_boot","dlopen(/usr/local/lib/couchdb/erlang/lib/couch-0.9.1/priv/lib/couch_erl_driver.so,
> 2): Library not loaded: /opt/local/lib/libnspr4.dylib\n  Referenced
> from: /opt/local/lib/nspr/libplds4.dylib\n  Reason: image not found"}
>
> I understand that my problem is most likely not couchdb specific, I
> would appreciate any pointers while I save up for an Intel Mac to
> replace my ageing PPC so I can run CouchDBX whose installation and
> maintenance is more inline with my command line challenged skill set.
>
> I have tried uninstalling and reinstalling erlang with macports
> without any change. I’m open to the idea of cleaning out couchdb’s
> dependencies to reinstall them from scratch, but I’m hoping you guys
> might be able to suggest an approach that might be a little less time
> consuming.
>
> Alternatively time machine is operational on my Mac, but I don’t know
> where to point it to roll back my macports updates.
>
> Thanks in advance.
> Ollie
>

Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Jan Lehnardt <ja...@apache.org>.
On 30 Aug 2009, at 09:56, Oliver Boermans wrote:

> I’m finally back on the Couch.
>
> 2009/8/2 Oliver Boermans <bo...@gmail.com>:
>> I have tried uninstalling and reinstalling erlang with macports
>> without any change. I’m open to the idea of cleaning out couchdb’s
>> dependencies to reinstall them from scratch, but I’m hoping you guys
>> might be able to suggest an approach that might be a little less time
>> consuming.
>
> For the benefit of those who might follow this path.
>
> At this point I didn’t really know how to reinstall dependencies with
> Macports. Thanks to a follow up email from Ozéias Sant'ana I had a
> closer look at the Macports docs (and as he suggested), this was worth
> the long wait:
>
> $ sudo port -Ruf upgrade couchdb
>
> Thanks for your help guys, the garden paths were particularly  
> educational :-)
> Cheers
> Ollie

Woohoo! :) Welcome & relax!

Cheers
Jan
--


Re: I can’t relax. I broke my couch upgrading dependencies. What might this error mean?

Posted by Oliver Boermans <bo...@gmail.com>.
I’m finally back on the Couch.

2009/8/2 Oliver Boermans <bo...@gmail.com>:
> I have tried uninstalling and reinstalling erlang with macports
> without any change. I’m open to the idea of cleaning out couchdb’s
> dependencies to reinstall them from scratch, but I’m hoping you guys
> might be able to suggest an approach that might be a little less time
> consuming.

For the benefit of those who might follow this path.

At this point I didn’t really know how to reinstall dependencies with
Macports. Thanks to a follow up email from Ozéias Sant'ana I had a
closer look at the Macports docs (and as he suggested), this was worth
the long wait:

$ sudo port -Ruf upgrade couchdb

Thanks for your help guys, the garden paths were particularly educational :-)
Cheers
Ollie

--
A few characters make a difference