You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Trevor Bain <ba...@umn.edu> on 2011/04/07 20:52:12 UTC

Macports OSX issues?

After installing couchdb and adding the launchctl startup item I tried to
connect to couchdb

localhost :: ~ » curl -vX GET http://localhost:5984
* About to connect() to localhost port 5984 (#0)
*   Trying ::1... Connection refused
*   Trying fe80::1... Connection refused
*   Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host


then I confirmed that it was indeed running

localhost :: ~ » ps -e | grep couchdb
68183 ??         0:00.43 /opt/local/lib/erlang/erts-5.8.2/bin/beam.smp -Bd -K
true -A 4 -- -root /opt/local/lib/erlang -progname erl -- -home ~ -- -noshell
-noinput -sasl errlog_type error -couch_ini /opt/local/etc/couchdb/default.ini
/opt/local/etc/couchdb/local.ini -s couch


then I confirmed that the default port was correct

localhost :: ~ » grep port < /opt/local/etc/couchdb/default.ini
port = 5984


then I checked permission and ownership on {prefix}/var/log and
{prefix}/{lib,etc}

localhost :: ~ » l /opt/local/var/log/couchdb /opt/local/lib/couchdb
/opt/local/etc/couchdb

/opt/local/etc/couchdb:
total 24
drwxr-xr-x   4 root  admin   136 Apr  6 15:41 .
drwxr-xr-x  52 root  admin  1768 Apr  6 15:41 ..
-rw-r--r--   2 root  admin  5266 Apr  6 15:41 default.ini
-rw-r--r--   2 root  admin  1613 Apr  6 15:41 local.ini

/opt/local/lib/couchdb:
total 0
drwxr-xr-x     4 root  admin    136 Apr  6 15:41 .
drwxr-xr-x  1962 root  admin  66708 Apr  6 15:41 ..
drwxr-xr-x     3 root  admin    102 Apr  6 15:41 bin
drwxr-xr-x     3 root  admin    102 Apr  6 15:41 erlang

/opt/local/var/log/couchdb:
total 0
drwxrwxr-x  4 couchdb  couchdb  136 Apr  6 15:41 .
drwxr-xr-x  6 root     admin    204 Apr  6 15:00 ..
-rw-r--r--  2 root     couchdb    0 Apr  6 15:41 .turd_couchdb
-rw-rw-r--  1 couchdb  couchdb    0 Apr  6 15:26 couch.log


I should note that I created couch.log with

sudo -u couchdb touch /opt/local/var/log/couchdb/couch.log


I did this because I noticed that couchdb wasn't logging anything.
I also enabled debug level logging in my local.ini.

Finally, if I run kill the launchctl owned couchdb
(sudo launchctl remove couchdb) and do

localhost :: ~ » sudo -u couchdb /opt/local/bin/couchdb
Password:


The terminal sits and doesn't print the expected permissions error
message that I read I should see if this is a permissions error.

Strangely enough, I remember being able to curl the default page when
installed couchdb several months ago. However, doing a full uninstall,
clean, and reinstall doesn't help.

What else should/can I do?


Thanks much,
Trevor

Re: Macports OSX issues?

Posted by Gabor Ratky <rg...@rgabostyle.com>.
Use homebrew and get rid of MacPorts for good.

http://github.com/mxcl/homebrew

`brew install couchdb`

Gabor

On Apr 7, 2011, at 8:52 PM, Trevor Bain wrote:

> After installing couchdb and adding the launchctl startup item I tried to
> connect to couchdb
> 
> localhost :: ~ » curl -vX GET http://localhost:5984
> * About to connect() to localhost port 5984 (#0)
> *   Trying ::1... Connection refused
> *   Trying fe80::1... Connection refused
> *   Trying 127.0.0.1... Connection refused
> * couldn't connect to host
> * Closing connection #0
> curl: (7) couldn't connect to host
> 
> 
> then I confirmed that it was indeed running
> 
> localhost :: ~ » ps -e | grep couchdb
> 68183 ??         0:00.43 /opt/local/lib/erlang/erts-5.8.2/bin/beam.smp -Bd -K
> true -A 4 -- -root /opt/local/lib/erlang -progname erl -- -home ~ -- -noshell
> -noinput -sasl errlog_type error -couch_ini /opt/local/etc/couchdb/default.ini
> /opt/local/etc/couchdb/local.ini -s couch
> 
> 
> then I confirmed that the default port was correct
> 
> localhost :: ~ » grep port < /opt/local/etc/couchdb/default.ini
> port = 5984
> 
> 
> then I checked permission and ownership on {prefix}/var/log and
> {prefix}/{lib,etc}
> 
> localhost :: ~ » l /opt/local/var/log/couchdb /opt/local/lib/couchdb
> /opt/local/etc/couchdb
> 
> /opt/local/etc/couchdb:
> total 24
> drwxr-xr-x   4 root  admin   136 Apr  6 15:41 .
> drwxr-xr-x  52 root  admin  1768 Apr  6 15:41 ..
> -rw-r--r--   2 root  admin  5266 Apr  6 15:41 default.ini
> -rw-r--r--   2 root  admin  1613 Apr  6 15:41 local.ini
> 
> /opt/local/lib/couchdb:
> total 0
> drwxr-xr-x     4 root  admin    136 Apr  6 15:41 .
> drwxr-xr-x  1962 root  admin  66708 Apr  6 15:41 ..
> drwxr-xr-x     3 root  admin    102 Apr  6 15:41 bin
> drwxr-xr-x     3 root  admin    102 Apr  6 15:41 erlang
> 
> /opt/local/var/log/couchdb:
> total 0
> drwxrwxr-x  4 couchdb  couchdb  136 Apr  6 15:41 .
> drwxr-xr-x  6 root     admin    204 Apr  6 15:00 ..
> -rw-r--r--  2 root     couchdb    0 Apr  6 15:41 .turd_couchdb
> -rw-rw-r--  1 couchdb  couchdb    0 Apr  6 15:26 couch.log
> 
> 
> I should note that I created couch.log with
> 
> sudo -u couchdb touch /opt/local/var/log/couchdb/couch.log
> 
> 
> I did this because I noticed that couchdb wasn't logging anything.
> I also enabled debug level logging in my local.ini.
> 
> Finally, if I run kill the launchctl owned couchdb
> (sudo launchctl remove couchdb) and do
> 
> localhost :: ~ » sudo -u couchdb /opt/local/bin/couchdb
> Password:
> 
> 
> The terminal sits and doesn't print the expected permissions error
> message that I read I should see if this is a permissions error.
> 
> Strangely enough, I remember being able to curl the default page when
> installed couchdb several months ago. However, doing a full uninstall,
> clean, and reinstall doesn't help.
> 
> What else should/can I do?
> 
> 
> Thanks much,
> Trevor


RE: Macports OSX issues?

Posted by Nils Breunese <N....@vpro.nl>.
It does actually. But dependencies can be configured in the wrong way of course. If CouchDB needs Erlang with SSL, then the dependencies should reflect that. If they don't, it's a bug which should be reported to MacPorts.

I use MacPorts for some applications, but for CouchDB on Mac OS X I just grab the ready to go all-in-one Couchbase Server (formerly CouchDBX) application from the Couchbase website: http://www.couchbase.com/products-and-services/couchbase-server

Nils.
________________________________________
Van: Owen Davies [owen@odavies.com]
Verzonden: vrijdag 8 april 2011 8:28
Aan: user@couchdb.apache.org
Onderwerp: Re: Macports OSX issues?

I believe that Mac Ports does not do dependency tracking like Linux
package managers (correct me if I'm wrong, I'm not a Mac user, just
had to solve this problem on a colleges Mac at work).

Owen
------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------

Re: Macports OSX issues?

Posted by Owen Davies <ow...@odavies.com>.
I believe that Mac Ports does not do dependency tracking like Linux
package managers (correct me if I'm wrong, I'm not a Mac user, just
had to solve this problem on a colleges Mac at work).

Owen

On 7 April 2011 23:36, Dave Cottlehuber <da...@muse.net.nz> wrote:
> On 8 April 2011 09:41, Trevor Bain <tr...@gmail.com> wrote:
>>> Someone, recently, opened up a similar ticket to this in macports
>>> (for the erlang version error) and it was closed as fixed. So, I
>>> assumed that this wasn't the error (bad assumption). I guess the
>>> same problem happened again more recently - doesn't macports allow
>>> for build/runtime dependencies against specific versions?
>>
>> OK, it's a different issue.
>>
>> Erlang needs to be reinstalled with the +ssl variant.
>>
>> https://trac.macports.org/ticket/27686
>>
>> If if figure out, in retrospect, how I would have debugged this
>> I'll post something in case no one has a better method.
>
> Configure CouchDB local.ini [log] level=debug
> sudo to the right user. check permissions as you've done.
> Use couchdb -i to get an interactive erlang shell.
> if you don't see "1> Apache CouchDB 1.0.2 (LogLevel=debug) is
> starting." straight off, then
>
> run i(). to see if crypto_server is present. if not -> you've most
> likely got erlang without SSL. Either recompile from source, or use a
> different package - e.g. on debian erlang-ssl.
>
> then try couch:start().
>
> post results of i() and couch:start() to friendpaste, check in with
> IRC or list for further suggestions.
>
> A+
> Dave
>

Re: Macports OSX issues?

Posted by Dave Cottlehuber <da...@muse.net.nz>.
On 8 April 2011 09:41, Trevor Bain <tr...@gmail.com> wrote:
>> Someone, recently, opened up a similar ticket to this in macports
>> (for the erlang version error) and it was closed as fixed. So, I
>> assumed that this wasn't the error (bad assumption). I guess the
>> same problem happened again more recently - doesn't macports allow
>> for build/runtime dependencies against specific versions?
>
> OK, it's a different issue.
>
> Erlang needs to be reinstalled with the +ssl variant.
>
> https://trac.macports.org/ticket/27686
>
> If if figure out, in retrospect, how I would have debugged this
> I'll post something in case no one has a better method.

Configure CouchDB local.ini [log] level=debug
sudo to the right user. check permissions as you've done.
Use couchdb -i to get an interactive erlang shell.
if you don't see "1> Apache CouchDB 1.0.2 (LogLevel=debug) is
starting." straight off, then

run i(). to see if crypto_server is present. if not -> you've most
likely got erlang without SSL. Either recompile from source, or use a
different package - e.g. on debian erlang-ssl.

then try couch:start().

post results of i() and couch:start() to friendpaste, check in with
IRC or list for further suggestions.

A+
Dave

Re: Macports OSX issues?

Posted by Trevor Bain <tr...@gmail.com>.
> Someone, recently, opened up a similar ticket to this in macports 
> (for the erlang version error) and it was closed as fixed. So, I 
> assumed that this wasn't the error (bad assumption). I guess the 
> same problem happened again more recently - doesn't macports allow 
> for build/runtime dependencies against specific versions?

OK, it's a different issue. 

Erlang needs to be reinstalled with the +ssl variant.

https://trac.macports.org/ticket/27686

If if figure out, in retrospect, how I would have debugged this
I'll post something in case no one has a better method.








Re: Macports OSX issues?

Posted by Trevor Bain <tr...@gmail.com>.
> You can also recompile Erlang with the necessary switch. It's quite simple -
the same thing happened to me a
> number of weeks ago. I can no longer remember exactly what's needed, but it's
definitely in the archives of
> this list.
> 
> 	/ Peter
> 
> > It's because the new version of Erlang that is installed with Mac
> > Ports does not work with the current version of CouchDB. You need to
> > downgrade Erlang to the previous version.
> > 
> > Owen


Great - thanks!

Someone, recently, opened up a similar ticket to this in macports (for the
erlang version error) and it was closed as fixed. So, I assumed that this wasn't
the error (bad assumption). I guess the same problem happened again more
recently - doesn't macports allow for build/runtime dependencies against
specific versions?

BTW this was super annoying to debug - could I have, somehow, attached an erl
terminal to couchdb to see what was going on?

Thanks,
Trevor


Re: Macports OSX issues?

Posted by Peter Bengtson <pe...@peterbengtson.com>.
You can also recompile Erlang with the necessary switch. It's quite simple - the same thing happened to me a number of weeks ago. I can no longer remember exactly what's needed, but it's definitely in the archives of this list.

	/ Peter


7 apr 2011 kl. 21.16 skrev Owen Davies:

> It's because the new version of Erlang that is installed with Mac
> Ports does not work with the current version of CouchDB. You need to
> downgrade Erlang to the previous version.
> 
> Owen
> 
> On 7 April 2011 19:52, Trevor Bain <ba...@umn.edu> wrote:
>> After installing couchdb and adding the launchctl startup item I tried to
>> connect to couchdb
>> 
>> localhost :: ~ » curl -vX GET http://localhost:5984
>> * About to connect() to localhost port 5984 (#0)
>> *   Trying ::1... Connection refused
>> *   Trying fe80::1... Connection refused
>> *   Trying 127.0.0.1... Connection refused
>> * couldn't connect to host
>> * Closing connection #0
>> curl: (7) couldn't connect to host
>> 
>> 
>> then I confirmed that it was indeed running
>> 
>> localhost :: ~ » ps -e | grep couchdb
>> 68183 ??         0:00.43 /opt/local/lib/erlang/erts-5.8.2/bin/beam.smp -Bd -K
>> true -A 4 -- -root /opt/local/lib/erlang -progname erl -- -home ~ -- -noshell
>> -noinput -sasl errlog_type error -couch_ini /opt/local/etc/couchdb/default.ini
>> /opt/local/etc/couchdb/local.ini -s couch
>> 
>> 
>> then I confirmed that the default port was correct
>> 
>> localhost :: ~ » grep port < /opt/local/etc/couchdb/default.ini
>> port = 5984
>> 
>> 
>> then I checked permission and ownership on {prefix}/var/log and
>> {prefix}/{lib,etc}
>> 
>> localhost :: ~ » l /opt/local/var/log/couchdb /opt/local/lib/couchdb
>> /opt/local/etc/couchdb
>> 
>> /opt/local/etc/couchdb:
>> total 24
>> drwxr-xr-x   4 root  admin   136 Apr  6 15:41 .
>> drwxr-xr-x  52 root  admin  1768 Apr  6 15:41 ..
>> -rw-r--r--   2 root  admin  5266 Apr  6 15:41 default.ini
>> -rw-r--r--   2 root  admin  1613 Apr  6 15:41 local.ini
>> 
>> /opt/local/lib/couchdb:
>> total 0
>> drwxr-xr-x     4 root  admin    136 Apr  6 15:41 .
>> drwxr-xr-x  1962 root  admin  66708 Apr  6 15:41 ..
>> drwxr-xr-x     3 root  admin    102 Apr  6 15:41 bin
>> drwxr-xr-x     3 root  admin    102 Apr  6 15:41 erlang
>> 
>> /opt/local/var/log/couchdb:
>> total 0
>> drwxrwxr-x  4 couchdb  couchdb  136 Apr  6 15:41 .
>> drwxr-xr-x  6 root     admin    204 Apr  6 15:00 ..
>> -rw-r--r--  2 root     couchdb    0 Apr  6 15:41 .turd_couchdb
>> -rw-rw-r--  1 couchdb  couchdb    0 Apr  6 15:26 couch.log
>> 
>> 
>> I should note that I created couch.log with
>> 
>> sudo -u couchdb touch /opt/local/var/log/couchdb/couch.log
>> 
>> 
>> I did this because I noticed that couchdb wasn't logging anything.
>> I also enabled debug level logging in my local.ini.
>> 
>> Finally, if I run kill the launchctl owned couchdb
>> (sudo launchctl remove couchdb) and do
>> 
>> localhost :: ~ » sudo -u couchdb /opt/local/bin/couchdb
>> Password:
>> 
>> 
>> The terminal sits and doesn't print the expected permissions error
>> message that I read I should see if this is a permissions error.
>> 
>> Strangely enough, I remember being able to curl the default page when
>> installed couchdb several months ago. However, doing a full uninstall,
>> clean, and reinstall doesn't help.
>> 
>> What else should/can I do?
>> 
>> 
>> Thanks much,
>> Trevor
>> 


Re: Macports OSX issues?

Posted by Owen Davies <ow...@odavies.com>.
It's because the new version of Erlang that is installed with Mac
Ports does not work with the current version of CouchDB. You need to
downgrade Erlang to the previous version.

Owen

On 7 April 2011 19:52, Trevor Bain <ba...@umn.edu> wrote:
> After installing couchdb and adding the launchctl startup item I tried to
> connect to couchdb
>
> localhost :: ~ » curl -vX GET http://localhost:5984
> * About to connect() to localhost port 5984 (#0)
> *   Trying ::1... Connection refused
> *   Trying fe80::1... Connection refused
> *   Trying 127.0.0.1... Connection refused
> * couldn't connect to host
> * Closing connection #0
> curl: (7) couldn't connect to host
>
>
> then I confirmed that it was indeed running
>
> localhost :: ~ » ps -e | grep couchdb
> 68183 ??         0:00.43 /opt/local/lib/erlang/erts-5.8.2/bin/beam.smp -Bd -K
> true -A 4 -- -root /opt/local/lib/erlang -progname erl -- -home ~ -- -noshell
> -noinput -sasl errlog_type error -couch_ini /opt/local/etc/couchdb/default.ini
> /opt/local/etc/couchdb/local.ini -s couch
>
>
> then I confirmed that the default port was correct
>
> localhost :: ~ » grep port < /opt/local/etc/couchdb/default.ini
> port = 5984
>
>
> then I checked permission and ownership on {prefix}/var/log and
> {prefix}/{lib,etc}
>
> localhost :: ~ » l /opt/local/var/log/couchdb /opt/local/lib/couchdb
> /opt/local/etc/couchdb
>
> /opt/local/etc/couchdb:
> total 24
> drwxr-xr-x   4 root  admin   136 Apr  6 15:41 .
> drwxr-xr-x  52 root  admin  1768 Apr  6 15:41 ..
> -rw-r--r--   2 root  admin  5266 Apr  6 15:41 default.ini
> -rw-r--r--   2 root  admin  1613 Apr  6 15:41 local.ini
>
> /opt/local/lib/couchdb:
> total 0
> drwxr-xr-x     4 root  admin    136 Apr  6 15:41 .
> drwxr-xr-x  1962 root  admin  66708 Apr  6 15:41 ..
> drwxr-xr-x     3 root  admin    102 Apr  6 15:41 bin
> drwxr-xr-x     3 root  admin    102 Apr  6 15:41 erlang
>
> /opt/local/var/log/couchdb:
> total 0
> drwxrwxr-x  4 couchdb  couchdb  136 Apr  6 15:41 .
> drwxr-xr-x  6 root     admin    204 Apr  6 15:00 ..
> -rw-r--r--  2 root     couchdb    0 Apr  6 15:41 .turd_couchdb
> -rw-rw-r--  1 couchdb  couchdb    0 Apr  6 15:26 couch.log
>
>
> I should note that I created couch.log with
>
> sudo -u couchdb touch /opt/local/var/log/couchdb/couch.log
>
>
> I did this because I noticed that couchdb wasn't logging anything.
> I also enabled debug level logging in my local.ini.
>
> Finally, if I run kill the launchctl owned couchdb
> (sudo launchctl remove couchdb) and do
>
> localhost :: ~ » sudo -u couchdb /opt/local/bin/couchdb
> Password:
>
>
> The terminal sits and doesn't print the expected permissions error
> message that I read I should see if this is a permissions error.
>
> Strangely enough, I remember being able to curl the default page when
> installed couchdb several months ago. However, doing a full uninstall,
> clean, and reinstall doesn't help.
>
> What else should/can I do?
>
>
> Thanks much,
> Trevor
>