You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Andreas Wenk <a....@netzmeister-st-pauli.de> on 2009/10/04 21:29:57 UTC

Starting CouchDB on Ubuntu (trunk rev 821585)

Hi there,

I have some trouble getting CouchDB to start.

I have a local Ubuntu (Linux duke 2.6.28-15-generic #49-Ubuntu SMP Tue 
Aug 18 18:40:08 UTC 2009 i686 GNU/Linux) and CouchDB trunk (rev 821585). 
As usual, I followed the advice in the README (adduser, chmod, chown). 
Now starting CouchDB:

$ sudo -i -u couchdb couchdb -b
Apache CouchDB has started, time to relax.

$ ps -ef
couchdb   9203     1  0 21:21 pts/1    00:00:00 /bin/sh -e 
/usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /
couchdb   9212  9203  0 21:21 pts/1    00:00:00 /bin/sh -e 
/usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /
couchdb   9213  9212  4 21:21 pts/1    00:00:00 
/usr/local/lib/erlang/erts-5.7.3/bin/beam -Bd -K true -- -root /usr/local/li
couchdb   9218  9213  0 21:21 ?        00:00:00 heart -pid 9213 -ht 11

but:

$ curl http://127.0.0.1:5984
curl: (7) couldn't connect to host

and

$ sudo -i -u couchdb couchdb -d
Apache CouchDB is not running.

Any idea what's going wrong? I did the same in the office on a VM Debian 
Lenny without having any problems.

Thanks a lot in advance

Cheers

Andy Wenk




Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Hi Paul,

Paul Davis wrote:
> What's the IP you listed for the bind_address? Did you perhaps specify
> something like 192.168.10.1? If so that means CouchDB isn't listening
> on 127.0.0.1.

it's 127.0.0.1

> To check if the port is open, try:
> 
> $ netstat -tap tcp | grep 5984

hm - but no output here

Thanks for the help

Cheers

Andy



Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
What's the IP you listed for the bind_address? Did you perhaps specify
something like 192.168.10.1? If so that means CouchDB isn't listening
on 127.0.0.1.

To check if the port is open, try:

$ netstat -tap tcp | grep 5984

HTH,
Paul Davis

On Sun, Oct 4, 2009 at 3:29 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Hi there,
>
> I have some trouble getting CouchDB to start.
>
> I have a local Ubuntu (Linux duke 2.6.28-15-generic #49-Ubuntu SMP Tue Aug
> 18 18:40:08 UTC 2009 i686 GNU/Linux) and CouchDB trunk (rev 821585). As
> usual, I followed the advice in the README (adduser, chmod, chown). Now
> starting CouchDB:
>
> $ sudo -i -u couchdb couchdb -b
> Apache CouchDB has started, time to relax.
>
> $ ps -ef
> couchdb   9203     1  0 21:21 pts/1    00:00:00 /bin/sh -e
> /usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /
> couchdb   9212  9203  0 21:21 pts/1    00:00:00 /bin/sh -e
> /usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /
> couchdb   9213  9212  4 21:21 pts/1    00:00:00
> /usr/local/lib/erlang/erts-5.7.3/bin/beam -Bd -K true -- -root /usr/local/li
> couchdb   9218  9213  0 21:21 ?        00:00:00 heart -pid 9213 -ht 11
>
> but:
>
> $ curl http://127.0.0.1:5984
> curl: (7) couldn't connect to host
>
> and
>
> $ sudo -i -u couchdb couchdb -d
> Apache CouchDB is not running.
>
> Any idea what's going wrong? I did the same in the office on a VM Debian
> Lenny without having any problems.
>
> Thanks a lot in advance
>
> Cheers
>
> Andy Wenk
>
>
>
>

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Brian Candler <B....@pobox.com>.
On Tue, Oct 06, 2009 at 09:04:14AM +0200, Andreas Wenk wrote:
> Hm, I am not sure which Erlang Version is shipped with a newly installed  
> Lenny (maybe two months old ...). And I am quite sure that this was the  
> first CouchDB installaton on this machine. But does this matter anyway?  
> I thought if compiling first Erlang newly and then CouchDB it should be  
> linked to this Erlang version ... ?

I had a similar problem, where if there were old versions of couchdb lying
around it would end up trying to start components from a wrong (old)
version, and would freeze before it bound to port 5984.

https://issues.apache.org/jira/browse/COUCHDB-505

http://mail-archives.apache.org/mod_mbox/couchdb-dev/200909.mbox/<20...@uk.tiscali.com>
(+ subsequent thread)

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Fidel Viegas <fi...@gmail.com>.
On Tue, Oct 6, 2009 at 11:22 AM, Paul Davis <pa...@gmail.com> wrote:

>
> I was going on the theory that you build CouchDB with one version of
> Erlang, upgraded Erlang, tried rebuilding again, but the previous
> build artefacts prevented anything from building. The, running .beam
> files with a different version of Erlang made things hurt. That sounds
> not to be the case though.
>
> Paul
>

Hi Paul,

In my case it was more or less what you mention. I installed CouchDB
from the repository, and then I installed erlang. That caused it to
crash. Once I removed Erlang, it was working. I had two conflicting
versions of erlang.

Regards,

Fidel.

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Tue, Oct 6, 2009 at 3:04 AM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Paul Davis wrote:
>>
>> What version of Erlang did you originally upgrade from? Perhaps you
>> had a version of CouchDB compiled with an old version of Erlang that
>> was causing issues? Ie, no make clean left CouchDB beam files?
>>
>> Paul
>
> Hm, I am not sure which Erlang Version is shipped with a newly installed
> Lenny (maybe two months old ...). And I am quite sure that this was the
> first CouchDB installaton on this machine. But does this matter anyway? I
> thought if compiling first Erlang newly and then CouchDB it should be linked
> to this Erlang version ... ?
>
> Actually I removed everything completely. Means rm the source folder where I
> compiled Erlang and CouchDB. Means IMHO there have been no files left for
> CouchDB.
>
> Cheers
>
> Andy
>

I was going on the theory that you build CouchDB with one version of
Erlang, upgraded Erlang, tried rebuilding again, but the previous
build artefacts prevented anything from building. The, running .beam
files with a different version of Erlang made things hurt. That sounds
not to be the case though.

Paul

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
> What version of Erlang did you originally upgrade from? Perhaps you
> had a version of CouchDB compiled with an old version of Erlang that
> was causing issues? Ie, no make clean left CouchDB beam files?
> 
> Paul

Hm, I am not sure which Erlang Version is shipped with a newly installed 
Lenny (maybe two months old ...). And I am quite sure that this was the 
first CouchDB installaton on this machine. But does this matter anyway? 
I thought if compiling first Erlang newly and then CouchDB it should be 
linked to this Erlang version ... ?

Actually I removed everything completely. Means rm the source folder 
where I compiled Erlang and CouchDB. Means IMHO there have been no files 
left for CouchDB.

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Mon, Oct 5, 2009 at 5:38 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Benoit Chesneau wrote:
>>
>> i can test for the trunk but couchdb 0.10 (latest svn branch) + erlang
>> R13B02 just work here on freebsd 7.2. will let you know about latest
>> trunk.
>>
>> - benoīt
>
> Hi ,
>
> ok this is kind of strange. Yesterday I announced that I will uninstall both
> erlang R13B01 and couchdb trunk. Actually I thought maybe I first only
> uninstall Erlang and install R13B02-1. So I downloaded it newly and compiled
> it. And then - tatata:
>
> $ sudo -i -u couchdb couchdb -b
> Apache CouchDB has started, time to relax.
> $ curl http://127.0.0.1:5984
> {"couchdb":"Welcome","version":"0.11.0b821618"}
>
> It work's. I don't know, but maybe it got something to do that CouchDB trunk
> was compiled with installed R13B01 and it's librarys. That would mean, that
> upgrading Erlang (or new install) to R13B02-1 works but a complete new
> installation of both does not ...
>
> To get more light into this, I uninstalled couchdb and reinstalled it again
> from source with existing R13B02-1. The result:
>
> $ sudo -i -u couchdb couchdb -b
> Apache CouchDB has started, time to relax.
> $ curl http://127.0.0.1:5984
> {"couchdb":"Welcome","version":"0.11.0b822006"}
>
> It works also. Ok remove both completely and reinstall ...
>
> $ sudo -i -u couchdb couchdb -b
> Apache CouchDB has started, time to relax.
> $ curl http://127.0.0.1:5984
> {"couchdb":"Welcome","version":"0.11.0b822019"}
>
> Running - so to be honest - I can't reproduce yesterdays the behaviour.
>
> Cheers
>
> Andy
>

What version of Erlang did you originally upgrade from? Perhaps you
had a version of CouchDB compiled with an old version of Erlang that
was causing issues? Ie, no make clean left CouchDB beam files?

Paul

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Benoit Chesneau wrote:
> i can test for the trunk but couchdb 0.10 (latest svn branch) + erlang
> R13B02 just work here on freebsd 7.2. will let you know about latest
> trunk.
> 
> - benoît

Hi ,

ok this is kind of strange. Yesterday I announced that I will uninstall 
both erlang R13B01 and couchdb trunk. Actually I thought maybe I first 
only uninstall Erlang and install R13B02-1. So I downloaded it newly and 
compiled it. And then - tatata:

$ sudo -i -u couchdb couchdb -b
Apache CouchDB has started, time to relax.
$ curl http://127.0.0.1:5984
{"couchdb":"Welcome","version":"0.11.0b821618"}

It work's. I don't know, but maybe it got something to do that CouchDB 
trunk was compiled with installed R13B01 and it's librarys. That would 
mean, that upgrading Erlang (or new install) to R13B02-1 works but a 
complete new installation of both does not ...

To get more light into this, I uninstalled couchdb and reinstalled it 
again from source with existing R13B02-1. The result:

$ sudo -i -u couchdb couchdb -b
Apache CouchDB has started, time to relax.
$ curl http://127.0.0.1:5984
{"couchdb":"Welcome","version":"0.11.0b822006"}

It works also. Ok remove both completely and reinstall ...

$ sudo -i -u couchdb couchdb -b
Apache CouchDB has started, time to relax.
$ curl http://127.0.0.1:5984
{"couchdb":"Welcome","version":"0.11.0b822019"}

Running - so to be honest - I can't reproduce yesterdays the behaviour.

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Benoit Chesneau <bc...@gmail.com>.
On Mon, Oct 5, 2009 at 9:56 AM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Paul Davis wrote:
>>
>> That crash report says that you don't have the correct permissions on
>> your log directory. I can't believe that was the root cause of the
>> R13B02 not working. Later tonight or tomorrow I'll upgrade and see for
>> myself.
>>
>> Paul Davis
>>
>
> that's what I thought also ... will be interesting if you're running in the
> same problems ...
>
> Cheers
>
> Andy
>
>
>
>

i can test for the trunk but couchdb 0.10 (latest svn branch) + erlang
R13B02 just work here on freebsd 7.2. will let you know about latest
trunk.

- benoît

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Chris Anderson wrote:
> Glad you got it working. I had a similar issue with the R13B02 build
> of CouchDBX on a Leopard Mac Mini, and switching to R13B01 got it to
> work.
> 
> Wish I'd seen the thread earlier.
> 
> Chris
> 

ok - that means that I will uninstall and reinstall couch and erlang 
(R13B02) again (can do that tonight) to hopefully get an idea what is 
going wrong. Unfortunately I just can do that again and say if it worked 
or not. If you (Paul, Chris) have any advice for debugging just drop me 
a note - I will try to report then ...

If you found a reason in the meantime please keep me informed also ;-)

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Chris Anderson <jc...@apache.org>.
On Sun, Oct 4, 2009 at 5:15 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Andreas Wenk wrote:
> So the conclusion 'could' be that trunk did not run with the newest Erlang
> version. If it helps, I could uninstall both Erlang and CouchDB again,
> install the latest Erlang version again, install CouchDB again to see if the
> error is still there. Then it would be save to say that CouchDB trunk is not
> running with the latest Erlang version - in my environment.
>

Glad you got it working. I had a similar issue with the R13B02 build
of CouchDBX on a Leopard Mac Mini, and switching to R13B01 got it to
work.

Wish I'd seen the thread earlier.

Chris

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

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
> That crash report says that you don't have the correct permissions on
> your log directory. I can't believe that was the root cause of the
> R13B02 not working. Later tonight or tomorrow I'll upgrade and see for
> myself.
> 
> Paul Davis
> 

that's what I thought also ... will be interesting if you're running in 
the same problems ...

Cheers

Andy




Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Andreas Wenk wrote:
> Unfortunately the results are the same. So what I will do is to 
> uninstall erlang and couchdb and install it again. How knows, maybe 
> there is something what went wrong. If the problems are the same, I will 
> downgrade erlang to the version before. I hope that at least this will 
> make it work.
> 
> I will keep you informed.
> 
> Good night and thanks for everything
> 
> Andy
> 
> 
> 

I have installed Erlang R13B01 and couchdb trunk. Directly after 
installing both I entered

$ couchdb

The result is the attached crashreport.

I think the reason are the missing rights ... so I don't worry too much 
about that ...

Ok - doing it with sudo:

$ sudo couchdb
Apache CouchDB 0.11.0b821618 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.32.0>] Apache CouchDB has started on http://127.0.0.1:5984/
[info] [<0.95.0>] 127.0.0.1 - - 'GET' / 200

(other shell)
$ curl http://127.0.0.1:5984
{"couchdb":"Welcome","version":"0.11.0b821618"}

So with this Erlang version trunk seems to run.

Then I chmod and chown the directorys and did it with the couchdb user:

$ sudo -i -u couchdb couchdb -b
Apache CouchDB has started, time to relax.
duke@duke:~$ curl http://127.0.0.1:5984
{"couchdb":"Welcome","version":"0.11.0b821618"}

So the conclusion 'could' be that trunk did not run with the newest 
Erlang version. If it helps, I could uninstall both Erlang and CouchDB 
again, install the latest Erlang version again, install CouchDB again to 
see if the error is still there. Then it would be save to say that 
CouchDB trunk is not running with the latest Erlang version - in my 
environment.

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
> Jan had the thought that this could be a weird lib conflict in Erlang.
> 
> Try blowing away /usr/local/lib/erlang and going back to the Erlang
> source tree and re-running 'sudo make install' and see if that fixes
> things.
> 
> Paul Davis

Unfortunately the results are the same. So what I will do is to 
uninstall erlang and couchdb and install it again. How knows, maybe 
there is something what went wrong. If the problems are the same, I will 
downgrade erlang to the version before. I hope that at least this will 
make it work.

I will keep you informed.

Good night and thanks for everything

Andy




Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Oct 4, 2009 at 5:56 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Paul Davis wrote:
>>
>> To be honest, I have absolutely no idea. And I'm running out of ideas
>> on how best to start figuring out what's going on here.
>>
>> The only thing I can think of is to start tearing into the init
>> scripts and boot sequence bit by bit until you find something
>> surprising. And by that I mean:
>>
>> Find the exact erl command used to start couchdb by echoing from the
>> script.
>> Run that directly, see if it gives any usable info.
>> If not, start tearing into the startup procedure with Erlang print
>> statements to see where it gets to.
>>
>> That's obviously not a lot of awesome, but I really can't think of
>> anything better right now.
>
> I don't think that I am able to do that ...
>
>> Oh, though, you might throw an strace in to see if the VM is halting
>> on something tragic. Something like:
>>
>> $ sudo su - couchdb
>> $ strace -f couchdb
>>
>> You'll want to put that output on friendpaste or somewhere though
>> rather than directly in the email cause it should be fairly large.
>>
>> Paul
>
> Thats what I can do ;-). Her is the URL:
>
> http://www.friendpaste.com/qA0EhBi5VnNY6mbyxmSwh
>
> By the way ... the output stopped here (withe some lines before):
>
> [pid 16930]
> open("/usr/local/lib/erlang/lib/stdlib-1.16.3/ebin/erl_posix_msg.beam",
> O_RDONLY|O_LARGEFILE) = 8
> [pid 16930] read(8, "FOR1\0\0$0BEAMAtom\0\0\4\303\0\0\0\217\rerl_posi"...,
> 9272) = 9272
> [pid 16930] close(8)                    = 0
> [pid 16930] epoll_wait(3, {}, 256, 0)   = 0
> [pid 16930] clock_gettime(CLOCK_MONOTONIC, {21987, 677071837}) = 0
> [pid 16930] getcwd("/usr/local/var/lib/couchdb"..., 8191) = 27
> [pid 16930] clock_gettime(CLOCK_MONOTONIC, {21987, 678609183}) = 0
> [pid 16930] epoll_wait(3,  <unfinished ...>
> [pid 16941] <... futex resumed> )       = -1 ETIMEDOUT (Connection timed
> out)
> [pid 16941] munmap(0xb77d7000, 1048576) = 0
> [pid 16941] futex(0x8221880, FUTEX_WAKE_PRIVATE, 1) = 0
> [pid 16941] futex(0x8221904, FUTEX_WAIT_PRIVATE, 9, NULL^C <unfinished ...>
> Process 16941 detached
>
> Maybe this is not a normal behaviour. You can see that I stopped after NULL.
>
> I hope it helps ...
>
> Cheers
>
> Andy
>

Jan had the thought that this could be a weird lib conflict in Erlang.

Try blowing away /usr/local/lib/erlang and going back to the Erlang
source tree and re-running 'sudo make install' and see if that fixes
things.

Paul Davis

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
> To be honest, I have absolutely no idea. And I'm running out of ideas
> on how best to start figuring out what's going on here.
> 
> The only thing I can think of is to start tearing into the init
> scripts and boot sequence bit by bit until you find something
> surprising. And by that I mean:
> 
> Find the exact erl command used to start couchdb by echoing from the script.
> Run that directly, see if it gives any usable info.
> If not, start tearing into the startup procedure with Erlang print
> statements to see where it gets to.
> 
> That's obviously not a lot of awesome, but I really can't think of
> anything better right now.

I don't think that I am able to do that ...

> Oh, though, you might throw an strace in to see if the VM is halting
> on something tragic. Something like:
> 
> $ sudo su - couchdb
> $ strace -f couchdb
> 
> You'll want to put that output on friendpaste or somewhere though
> rather than directly in the email cause it should be fairly large.
> 
> Paul

Thats what I can do ;-). Her is the URL:

http://www.friendpaste.com/qA0EhBi5VnNY6mbyxmSwh

By the way ... the output stopped here (withe some lines before):

[pid 16930] 
open("/usr/local/lib/erlang/lib/stdlib-1.16.3/ebin/erl_posix_msg.beam", 
O_RDONLY|O_LARGEFILE) = 8
[pid 16930] read(8, 
"FOR1\0\0$0BEAMAtom\0\0\4\303\0\0\0\217\rerl_posi"..., 9272) = 9272
[pid 16930] close(8)                    = 0
[pid 16930] epoll_wait(3, {}, 256, 0)   = 0
[pid 16930] clock_gettime(CLOCK_MONOTONIC, {21987, 677071837}) = 0
[pid 16930] getcwd("/usr/local/var/lib/couchdb"..., 8191) = 27
[pid 16930] clock_gettime(CLOCK_MONOTONIC, {21987, 678609183}) = 0
[pid 16930] epoll_wait(3,  <unfinished ...>
[pid 16941] <... futex resumed> )       = -1 ETIMEDOUT (Connection timed 
out)
[pid 16941] munmap(0xb77d7000, 1048576) = 0
[pid 16941] futex(0x8221880, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 16941] futex(0x8221904, FUTEX_WAIT_PRIVATE, 9, NULL^C <unfinished ...>
Process 16941 detached

Maybe this is not a normal behaviour. You can see that I stopped after NULL.

I hope it helps ...

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
> Do you think it's a bug or misconfiguration in my system? Waht should I do
> to help finding the solution?

To be honest, I have absolutely no idea. And I'm running out of ideas
on how best to start figuring out what's going on here.

The only thing I can think of is to start tearing into the init
scripts and boot sequence bit by bit until you find something
surprising. And by that I mean:

Find the exact erl command used to start couchdb by echoing from the script.
Run that directly, see if it gives any usable info.
If not, start tearing into the startup procedure with Erlang print
statements to see where it gets to.

That's obviously not a lot of awesome, but I really can't think of
anything better right now.

Oh, though, you might throw an strace in to see if the VM is halting
on something tragic. Something like:

$ sudo su - couchdb
$ strace -f couchdb

You'll want to put that output on friendpaste or somewhere though
rather than directly in the email cause it should be fairly large.

Paul

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
> You could try R13B01, but like I say, I haven't heard of anyone else
> having R13B02 issues.
> 
> Can you try make dev and ./utils/run in the CouchDB source tree?
> 
> # edit ./etc/couchdb/local_dev.ini setting log level to debug
> $ make dev
> $ ./utils/run
> 
> See what that gives

No luck - no output

...
it creates development ini files as well as a
./tmp structure for development runtime files.
Use ./utils/run to launch CouchDB from the source tree.
mkdir -p ./tmp/lib
mkdir -p ./tmp/log
mkdir -p ./tmp/run
duke@duke:/tmp/couchdb-trunk$ ./utils/run


I made sure that no other couch processes are running.

Do you think it's a bug or misconfiguration in my system? Waht should I 
do to help finding the solution?

Cheers

Andy




Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Oct 4, 2009 at 4:52 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Paul Davis wrote:
>>
>> On Sun, Oct 4, 2009 at 4:17 PM, Andreas Wenk
>> What in the world. R13B02 should be just fine. I haven't heard any
>> complaints by people upgrading.
>>
>> I assume this won't give much newness, but maybe:
>>
>> $ sudo su - couchdb
>> $ couchdb -i
>>
>> Also, double check that there's not another Couch instance running.
>>
>> Paul
>
> ok here we go ...
>
> ps -ef shows no couchdb processes are running.
>
> $ sudo su - couchdb
> couchdb@duke:~$ couchdb -i
> Erlang R13B02 (erts-5.7.3) [source] [rq:1] [async-threads:0] [hipe]
> [kernel-poll:true]
>
> Eshell V5.7.3  (abort with ^G)
> 1>
>
> Should I uninstall Erlang and CouchDB and install it again with a lower
> Erlang version? Just to see what happens ?
>
> Thanks for examination ;-)
>
> Cheers
>
> Andy
>

You could try R13B01, but like I say, I haven't heard of anyone else
having R13B02 issues.

Can you try make dev and ./utils/run in the CouchDB source tree?

# edit ./etc/couchdb/local_dev.ini setting log level to debug
$ make dev
$ ./utils/run

See what that gives

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
> On Sun, Oct 4, 2009 at 4:17 PM, Andreas Wenk
> What in the world. R13B02 should be just fine. I haven't heard any
> complaints by people upgrading.
> 
> I assume this won't give much newness, but maybe:
> 
> $ sudo su - couchdb
> $ couchdb -i
> 
> Also, double check that there's not another Couch instance running.
> 
> Paul

ok here we go ...

ps -ef shows no couchdb processes are running.

$ sudo su - couchdb
couchdb@duke:~$ couchdb -i
Erlang R13B02 (erts-5.7.3) [source] [rq:1] [async-threads:0] [hipe] 
[kernel-poll:true]

Eshell V5.7.3  (abort with ^G)
1>

Should I uninstall Erlang and CouchDB and install it again with a lower 
Erlang version? Just to see what happens ?

Thanks for examination ;-)

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Oct 4, 2009 at 4:17 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Paul Davis wrote:
>  > Nothing? You did update the log level right? Quite odd that there's
>>
>> nothing written.
>
> yes I did ...
>
> [log]
> level = debug
>
>> Can you run Erlang?
>>
>> $ erll
>> Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:2:2] [rq:2]
>> [async-threads:0] [kernel-poll:false]
>>
>> Eshell V5.7.2  (abort with ^G)
>> 1>
>
> $ erl
> Erlang R13B02 (erts-5.7.3) [source] [rq:1] [async-threads:0] [hipe]
> [kernel-poll:false]
>
> Eshell V5.7.3  (abort with ^G)
> 1>
>
> Maybe this version is too new?
>
> Thanks a lot
>
> Cheers
>
> Andy
>

What in the world. R13B02 should be just fine. I haven't heard any
complaints by people upgrading.

I assume this won't give much newness, but maybe:

$ sudo su - couchdb
$ couchdb -i

Also, double check that there's not another Couch instance running.

Paul

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:
  > Nothing? You did update the log level right? Quite odd that there's
> nothing written.

yes I did ...

[log]
level = debug

> Can you run Erlang?
> 
> $ erll
> Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:2:2] [rq:2]
> [async-threads:0] [kernel-poll:false]
> 
> Eshell V5.7.2  (abort with ^G)
> 1>

$ erl
Erlang R13B02 (erts-5.7.3) [source] [rq:1] [async-threads:0] [hipe] 
[kernel-poll:false]

Eshell V5.7.3  (abort with ^G)
1>

Maybe this version is too new?

Thanks a lot

Cheers

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Oct 4, 2009 at 4:02 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Paul Davis wrote:
>
>>
>> Huh. Try this:
>>
>> # Update local.ini and set the log level to debug
>> $ sudo su - couchdb
>> $ couchdb
>>
>> And paste the output from that.
>
> $ sudo su - couchdb
> couchdb@duke:~$ couchdb
>
>
> There is no output ... couchdb.stderr and couchdb.stdout are not changed.
>
> Cheers
>
> Andy
>
>

Nothing? You did update the log level right? Quite odd that there's
nothing written.

Can you run Erlang?

$ erll
Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [kernel-poll:false]

Eshell V5.7.2  (abort with ^G)
1>

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Paul Davis wrote:

> 
> Huh. Try this:
> 
> # Update local.ini and set the log level to debug
> $ sudo su - couchdb
> $ couchdb
> 
> And paste the output from that.

$ sudo su - couchdb
couchdb@duke:~$ couchdb


There is no output ... couchdb.stderr and couchdb.stdout are not changed.

Cheers

Andy


Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Noah Slater wrote:
> 
>>> Crash dump was written to: erl_crash.dump
>>> Kernel pid terminated (heart) ()
>>> heart: Sun Oct  4 21:20:31 2009: Erlang has closed.
>>> heart: Sun Oct  4 21:20:31 2009: Executed "/usr/local/bin/couchdb -k".
>>> Terminating.
> 
> Erlang is crashing. What's in your erl_crash.dump?

you can have a look to the attached file ...

Thanks a lot

Andy

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Noah Slater <ns...@tumbolia.org>.
>> Crash dump was written to: erl_crash.dump
>> Kernel pid terminated (heart) ()
>> heart: Sun Oct  4 21:20:31 2009: Erlang has closed.
>> heart: Sun Oct  4 21:20:31 2009: Executed "/usr/local/bin/couchdb - 
>> k".
>> Terminating.

Erlang is crashing. What's in your erl_crash.dump?

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Paul Davis <pa...@gmail.com>.
On Sun, Oct 4, 2009 at 3:48 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Hi Noah,
>
> Noah Slater wrote:
>>>
>>> $ sudo -i -u couchdb couchdb -b
>>> Apache CouchDB has started, time to relax.
>>
>> What is the output when you don't use -b?
>
> I did try that and there's no output ...
>
>> What is the contents of couchdb.stdout and couchdb.stderr?
>>
>
> # The last lines from couchdb.stderr
>
> Crash dump was written to: erl_crash.dump
> Kernel pid terminated (heart) ()
> heart: Sun Oct  4 21:20:31 2009: Erlang has closed.
> heart: Sun Oct  4 21:20:31 2009: Executed "/usr/local/bin/couchdb -k".
> Terminating.
>
> heart_beat_kill_pid = 9213
> heart_beat_timeout = 11
>
> heart_beat_kill_pid = 9338
> heart_beat_timeout = 11
>
> heart_beat_kill_pid = 10006
> heart_beat_timeout = 11
>
> # The only line of couchdb.stsdtout
>
> {"Kernel pid
> terminated",heart,{port_terminated,{heart,loop,[<0.0.0>,#Port<0.12>,[]]}}}
>
> Thanks a lot for the help
>
> Cheers
>
> Andy
>
>
>

Huh. Try this:

# Update local.ini and set the log level to debug
$ sudo su - couchdb
$ couchdb

And paste the output from that.

Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Andreas Wenk <a....@netzmeister-st-pauli.de>.
Hi Noah,

Noah Slater wrote:
>> $ sudo -i -u couchdb couchdb -b
>> Apache CouchDB has started, time to relax.
> 
> What is the output when you don't use -b?

I did try that and there's no output ...

> What is the contents of couchdb.stdout and couchdb.stderr?
> 

# The last lines from couchdb.stderr

Crash dump was written to: erl_crash.dump
Kernel pid terminated (heart) ()
heart: Sun Oct  4 21:20:31 2009: Erlang has closed.
heart: Sun Oct  4 21:20:31 2009: Executed "/usr/local/bin/couchdb -k". 
Terminating.

heart_beat_kill_pid = 9213
heart_beat_timeout = 11

heart_beat_kill_pid = 9338
heart_beat_timeout = 11

heart_beat_kill_pid = 10006
heart_beat_timeout = 11

# The only line of couchdb.stsdtout

{"Kernel pid 
terminated",heart,{port_terminated,{heart,loop,[<0.0.0>,#Port<0.12>,[]]}}}

Thanks a lot for the help

Cheers

Andy



Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Noah Slater <ns...@tumbolia.org>.
> $ sudo -i -u couchdb couchdb -b
> Apache CouchDB has started, time to relax.

What is the output when you don't use -b?

What is the contents of couchdb.stdout and couchdb.stderr?


Re: Starting CouchDB on Ubuntu (trunk rev 821585)

Posted by Fidel Viegas <fi...@gmail.com>.
Hi Andy,

On Sun, Oct 4, 2009 at 8:29 PM, Andreas Wenk
<a....@netzmeister-st-pauli.de> wrote:
> Hi there,
>
> I have some trouble getting CouchDB to start.
>
> I have a local Ubuntu (Linux duke 2.6.28-15-generic #49-Ubuntu SMP Tue Aug
> 18 18:40:08 UTC 2009 i686 GNU/Linux) and CouchDB trunk (rev 821585). As
> usual, I followed the advice in the README (adduser, chmod, chown). Now
> starting CouchDB:
>
> $ sudo -i -u couchdb couchdb -b
> Apache CouchDB has started, time to relax.
>
> $ ps -ef
> couchdb   9203     1  0 21:21 pts/1    00:00:00 /bin/sh -e
> /usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /
> couchdb   9212  9203  0 21:21 pts/1    00:00:00 /bin/sh -e
> /usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /
> couchdb   9213  9212  4 21:21 pts/1    00:00:00
> /usr/local/lib/erlang/erts-5.7.3/bin/beam -Bd -K true -- -root /usr/local/li
> couchdb   9218  9213  0 21:21 ?        00:00:00 heart -pid 9213 -ht 11
>
> but:
>
> $ curl http://127.0.0.1:5984
> curl: (7) couldn't connect to host
>
> and
>
> $ sudo -i -u couchdb couchdb -d
> Apache CouchDB is not running.
>
> Any idea what's going wrong? I did the same in the office on a VM Debian
> Lenny without having any problems.


I have actually experienced the same as you on the same environment. I
didn't install from the trunk, but from the repositories.

What I did was install couchdb with apt-get install couchdb, and when
I installed erlang this problem came up.

So, I think it has to do with the version of the erlang interpreter,
because as soon as I removed it, couchdb was running again.

I haven't really played much with couchdb, but it was nice you raised
this issue as I am using the same environment as you and I will start
playing with couchdb soon.

If you happen to find out the real cause, please report back your experience.

Regards,

Fidel.