couchdb not listening on its port

376 views
Skip to first unread message

Mark Crispin

unread,
Mar 8, 2012, 2:20:45 PM3/8/12
to us...@couchdb.apache.org
I've been giving the delightful task of figuring out how to make the
current version of couchdb run under SLES 2.6.32.54-0.3-pae (not my
choice!), and have had a miserable time of it. Here is the procedure that
I've followed:

----------
Install Mozilla Spider Monkey:
http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz

Install icu:
http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-RHEL6-i386.tgz


Install CouchDB:
http://apache.mirrors.hoobly.com//couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz
requires: Mozilla Spider Monkey
requires: icu

Install Erlang:
http://www.erlang.org/download/otp_src_R15B.tar.gz
wants: wxWidgets (for wx)?
wants: fop (documentation only?)?
wants: Java compiler (for jinterface)?

useradd couchdb

sudo mkdir ~couchdb

sudo chown couchdb ~couchdb

sudo chgrp users ~couchdb

Remove the -e from the first line of /usr/local/etc/rc.d/couchdb

start couchdb - sudo /usr/local/etc/rc.d/couchdb start

See if couchdb is listening on its port? - FAIL

----------

OK, so I then find
http://permalink.gmane.org/gmane.comp.db.couchdb.user/5639
and indeed couchdb is not listening on port 5984 (nor, as far as I can
tell from lsof, any other port) but seems to be running according to ps:

couchdb 22204 0.0 0.0 2848 1268 ? S Mar07 0:00 /bin/sh -e /usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /usr/local/etc/couchdb/local.ini -b -r 5 -p /usr/local/var/run/couchdb/couchdb.pid -o /dev/null -e /dev/null -R
couchdb 22214 0.0 0.0 2848 652 ? S Mar07 0:00 /bin/sh -e /usr/local/bin/couchdb -a /usr/local/etc/couchdb/default.ini -a /usr/local/etc/couchdb/local.ini -b -r 5 -p /usr/local/var/run/couchdb/couchdb.pid -o /dev/null -e /dev/null -R
couchdb 22215 0.0 0.5 14192 7968 ? Sl Mar07 0:34 /usr/local/lib/erlang/erts-5.9/bin/beam -Bd -K true -A 4 -- -root /usr/local/lib/erlang -progname erl -- -home /home/couchdb -- -noshell -noinput -sasl errlog_type error -couch_ini /usr/local/etc/couchdb/default.ini /usr/local/etc/couchdb/local.ini /usr/local/etc/couchdb/default.ini /usr/local/etc/couchdb/local.ini -s couch -pidfile /usr/local/var/run/couchdb/couchdb.pid -heart
couchdb 22223 0.0 0.0 1664 416 ? Ss Mar07 0:14 heart -pid 22215 -ht 11

I tried the solution in that web page and it doesn't seem to make a
difference, so now I'm stumped. I've spent days on this going through web
pages wnd trying various things with no luck.

I'm certain that this is something truly simple and stupid, but it has
eluded me. Anyone willing to give me a clue-by-four?

mark crispin: senior software engineer
mark.c...@netmail.com | +1.514.392.9220 ext 297 | +1.866.497.0101

www.netmail.com | scan | secure | store | search || business driven email
eliminate risk - ensure compliance - enhance productivity



http://help.netmail.com | find | learn | contribute
the only place for everything netmail

Marcos Ortiz

unread,
Mar 8, 2012, 3:21:55 PM3/8/12
to us...@couchdb.apache.org, Mark Crispin
Regards, Mark.
Can you provide a little more information?
For example:
1- Which were the options that you used on the couchdb´s compilation?
2- What about the couchdb´s log? What says to you?

Best wishes

--
Marcos Luis Ortíz Valmaseda
Sr. Software Engineer (UCI)
http://marcosluis2186.posterous.com
http://postgresql.uci.cu/blog/38

Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com

Mark Crispin

unread,
Mar 8, 2012, 3:28:46 PM3/8/12
to us...@couchdb.apache.org
Thank you Marcos -

In all compilations (couchdb, erl, etc.) the build command was
make && sudo make install
Thus, everything should be the source default.

The directory /usr/local/var/log/couchdb is empty. That is the directory
pointed to by /usr/local/etc/logrotate.d/couchdb

Regards,

-- Mark --

Marcos Ortiz

unread,
Mar 8, 2012, 3:39:39 PM3/8/12
to us...@couchdb.apache.org, Mark Crispin
Well, in my laptop that runs Linux Mint 12, the service that is
listening on the port 5984 is beam. Look for the
nestat -pla command in my system:

Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 localhost:ipp *:*
LISTEN 950/cupsd
tcp 0 0 localhost:postgresql *:*
LISTEN 1261/postgres
tcp 0 0 localhost:9050 *:*
LISTEN 1640/tor
tcp 0 0 localhost:8123 *:*
LISTEN 1631/polipo
tcp 0 0 localhost:5984 *:*
LISTEN 1602/beam
tcp 0 0 localhost:4001 *:*
LISTEN 1549/mix

What shows this command in your system?

regards

On 03/08/2012 03:28 PM, Mark Crispin wrote:
> Thank you Marcos -
>
> In all compilations (couchdb, erl, etc.) the build command was

> make&& sudo make install

Mark Crispin

unread,
Mar 8, 2012, 3:51:10 PM3/8/12
to Marcos Ortiz, us...@couchdb.apache.org
Here is the output from "sudo netstat -pla":

Active Internet connections (servers and established)


Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 Jusenkyou:sunproxyadmin *:* LISTEN 2369/ndsd
tcp 0 0 *:ssh *:* LISTEN 2623/sshd
tcp 0 0 localhost:postgresql *:* LISTEN 2768/postmaster
tcp 0 0 *:ldaps *:* LISTEN 2369/ndsd
tcp 0 0 Jusenkyou.P:pcsync-http *:* LISTEN 2369/ndsd
tcp 0 0 localhost:radsec *:* LISTEN 2799/soffice.bin
tcp 0 0 *:ldap *:* LISTEN 2369/ndsd
tcp 0 0 localhost:11211 *:* LISTEN 2331/memcached
tcp 0 0 Jusenkyou.Panda.COM:ncp *:* LISTEN 2369/ndsd
tcp 0 0 localhost:ncp *:* LISTEN 2369/ndsd
tcp 0 0 *:sunrpc *:* LISTEN 2366/rpcbind
tcp 0 0 Jusenkyou.Panda.COM:ssh DHCP-205.Panda.CO:49445 ESTABLISHED 20303/sshd: debug [
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45795 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:47728 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ssh DHCP-200.Panda.CO:54194 ESTABLISHED 9416/sshd: debug [p
tcp 0 0 Jusenkyou.Panda.C:45796 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:47947 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:47946 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:47946 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45790 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45794 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ssh DHCP-205.Panda.CO:49354 ESTABLISHED 3098/sshd: debug [p
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:47960 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45796 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:47959 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45799 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45791 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:47960 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45791 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:47947 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45793 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45789 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ssh DHCP-200.Panda.CO:56012 ESTABLISHED 7404/sshd: debug [p
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45794 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45789 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:47959 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45790 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.COM:ncp Jusenkyou.Panda.C:45792 ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:47728 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45793 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45792 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45795 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 Jusenkyou.Panda.C:45799 Jusenkyou.Panda.COM:ncp ESTABLISHED 2369/ndsd
tcp 0 0 *:ssh *:* LISTEN 2623/sshd
tcp 0 0 localhost:postgresql *:* LISTEN 2768/postmaster
tcp 0 0 *:sunrpc *:* LISTEN 2366/rpcbind
udp 0 0 Jusenkyou.Panda.COM:ntp *:* 2885/ntpd
udp 0 0 127.0.0.2:ntp *:* 2885/ntpd
udp 0 0 localhost:ntp *:* 2885/ntpd
udp 0 0 *:ntp *:* 2885/ntpd
udp 0 0 Jusenkyou.Panda.COM:ncp *:* 2369/ndsd
udp 0 0 localhost:ncp *:* 2369/ndsd
udp 0 0 localhost:47429 *:* 2369/ndsd
udp 0 0 localhost:11211 *:* 2331/memcached
udp 0 0 *:844 *:* 2366/rpcbind
udp 0 0 *:sunrpc *:* 2366/rpcbind
udp 0 0 fe80::a00:27ff:fe49:ntp *:* 2885/ntpd
udp 0 0 localhost:ntp *:* 2885/ntpd
udp 0 0 *:ntp *:* 2885/ntpd
udp 0 0 localhost:55870 localhost:55870 ESTABLISHED 2768/postmaster
udp 0 0 *:844 *:* 2366/rpcbind
udp 0 0 *:sunrpc *:* 2366/rpcbind
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 6076 2768/postmaster /tmp/.s.PGSQL.5432
unix 2 [ ACC ] STREAM LISTENING 6095 2799/soffice.bin /tmp/OSL_PIPE_0_SingleOfficeIPC_6474b982b398a01e2cba5b2c351464e
unix 2 [ ACC ] STREAM LISTENING 5550 2601/nscd /var/run/nscd/socket
unix 2 [ ] DGRAM 1547 521/udevd @/org/kernel/udev/udevd
unix 2 [ ACC ] STREAM LISTENING 5056 2366/rpcbind /var/run/rpcbind.sock
unix 2 [ ACC ] STREAM LISTENING 5092 2369/ndsd /opt/ma/data/netmail/nds/data/s-n4ucmd
unix 5 [ ] DGRAM 3707 1488/syslog-ng /dev/log
unix 2 [ ] DGRAM 3886 1551/hald @/org/freedesktop/hal/udev_event
unix 2 [ ACC ] STREAM LISTENING 3821 1551/hald @/var/run/hald/dbus-o32qARokGG
unix 2 [ ACC ] STREAM LISTENING 3846 1551/hald @/var/run/hald/dbus-cmDXcDBiSw
unix 2 [ ACC ] STREAM LISTENING 3654 1482/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ] DGRAM 3705 1488/syslog-ng /var/lib/named/dev/log
unix 2 [ ] DGRAM 99555 12366/sudo
unix 3 [ ] STREAM CONNECTED 91111 9416/sshd: debug [p
unix 3 [ ] STREAM CONNECTED 91110 9420/6
unix 3 [ ] STREAM CONNECTED 27742 20303/sshd: debug [
unix 3 [ ] STREAM CONNECTED 27741 20306/2
unix 3 [ ] STREAM CONNECTED 16173 7404/sshd: debug [p
unix 3 [ ] STREAM CONNECTED 16172 7424/3
unix 3 [ ] STREAM CONNECTED 7247 3098/sshd: debug [p
unix 3 [ ] STREAM CONNECTED 7246 3102/1
unix 2 [ ] DGRAM 7133 3081/sudo
unix 3 [ ] STREAM CONNECTED 6915 1482/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 6914 2994/login -- admin
unix 2 [ ] DGRAM 6193 2885/ntpd
unix 2 [ ] DGRAM 5164 2426/cron
unix 3 [ ] STREAM CONNECTED 5127 2369/ndsd
unix 3 [ ] STREAM CONNECTED 5126 2369/ndsd
unix 3 [ ] STREAM CONNECTED 5091 2369/ndsd
unix 3 [ ] STREAM CONNECTED 5090 2369/ndsd
unix 3 [ ] STREAM CONNECTED 5011 2331/memcached
unix 3 [ ] STREAM CONNECTED 5010 2331/memcached
unix 3 [ ] STREAM CONNECTED 5008 2331/memcached
unix 3 [ ] STREAM CONNECTED 5007 2331/memcached
unix 3 [ ] STREAM CONNECTED 5005 2331/memcached
unix 3 [ ] STREAM CONNECTED 5004 2331/memcached
unix 3 [ ] STREAM CONNECTED 5001 2331/memcached
unix 3 [ ] STREAM CONNECTED 5000 2331/memcached
unix 3 [ ] STREAM CONNECTED 4998 2331/memcached
unix 3 [ ] STREAM CONNECTED 4997 2331/memcached
unix 3 [ ] STREAM CONNECTED 4278 1551/hald @/var/run/hald/dbus-o32qARokGG
unix 3 [ ] STREAM CONNECTED 4277 1704/hald-addon-acp
unix 3 [ ] STREAM CONNECTED 4266 1551/hald @/var/run/hald/dbus-o32qARokGG
unix 3 [ ] STREAM CONNECTED 4257 1697/sr0 (every 16
unix 3 [ ] STREAM CONNECTED 4244 1482/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 4243 1697/sr0 (every 16
unix 3 [ ] STREAM CONNECTED 4092 1551/hald @/var/run/hald/dbus-o32qARokGG
unix 3 [ ] STREAM CONNECTED 4080 1672/event2
unix 2 [ ] DGRAM 4000 1489/klogd
unix 3 [ ] STREAM CONNECTED 3874 1551/hald @/var/run/hald/dbus-cmDXcDBiSw
unix 3 [ ] STREAM CONNECTED 3871 1560/hald-runner
unix 3 [ ] STREAM CONNECTED 3849 1482/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 3848 1559/console-kit-da
unix 3 [ ] STREAM CONNECTED 3823 1482/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 3822 1551/hald
unix 3 [ ] STREAM CONNECTED 3664 1482/dbus-daemon
unix 3 [ ] STREAM CONNECTED 3663 1482/dbus-daemon

Also, ps shows that beam is running:

couchdb 22215 0.0 0.5 14192 7968 ? Sl Mar07 0:36 /usr/local/lib/erlang/erts-5.9/bin/beam -Bd -K true -A 4 -- -root /usr/local/lib/erlang -progname erl -- -home /home/couchdb -- -noshell -noinput -sasl errlog_type error -couch_ini /usr/local/etc/couchdb/default.ini /usr/local/etc/couchdb/local.ini /usr/local/etc/couchdb/default.ini /usr/local/etc/couchdb/local.ini -s couch -pidfile /usr/local/var/run/couchdb/couchdb.pid -heart

Marcos Ortiz

unread,
Mar 8, 2012, 3:59:13 PM3/8/12
to Mark Crispin, us...@couchdb.apache.org, d...@couchdb.apache.org
Well, my friend, It's a very tricky issue.
CC to couchdb-dev list

regards

Randall Leeds

unread,
Mar 8, 2012, 4:24:52 PM3/8/12
to us...@couchdb.apache.org, Mark Crispin, d...@couchdb.apache.org
Things to check:

Default places couchdb needs permissions:
/var/lib/couchdb (for the database files)
/var/log/couchdb (for the log)
/var/run/couchdb (for the .pid file and .uri file)

Check the log. Any errors?
Try starting couchdb interactively with "sudo -u couchdb couchdb". What happens?

If you watch the process list, is beam restarting over and over or is
the process hanging around like everything is okay, but not listening
on the port?

-R

CGS

unread,
Mar 8, 2012, 4:31:51 PM3/8/12
to us...@couchdb.apache.org
Hi,

Is that the order you installed them?

------------

Install icu:

http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-RHEL6-i386.tgz


Install CouchDB:

Install Erlang:
http://www.erlang.org/download/otp_src_R15B.tar.gz
wants: wxWidgets (for wx)?
wants: fop (documentation only?)?
wants: Java compiler (for jinterface)?

--------------

CouchDB requires MANDATORY Erlang. For Erlang you don't need wxWidget or
many other default options (see ./configure --help in the Erlang top
directory). Also, I don't know about 1.1.1, but you may need to use R14B...
and not R15B.

Could you provide a log from your installation (don't forget to remove
sensitive data from it)? It may be CouchDB exited with errors before
finishing to compile everything.

CGS

Paul Davis

unread,
Mar 8, 2012, 4:45:05 PM3/8/12
to us...@couchdb.apache.org
On Thu, Mar 8, 2012 at 1:20 PM, Mark Crispin
<Mark.C...@messagingarchitects.com> wrote:
> I've been giving the delightful task of figuring out how to make the
> current version of couchdb run under SLES 2.6.32.54-0.3-pae (not my
> choice!), and have had a miserable time of it. Here is the procedure that
> I've followed:
>
> ----------
> Install Mozilla Spider Monkey:
>        http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
>
> Install icu:
>        http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-RHEL6-i386.tgz
>
>
> Install CouchDB:
>        http://apache.mirrors.hoobly.com//couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz
>        requires: Mozilla Spider Monkey
>        requires: icu
>
> Install Erlang:
>        http://www.erlang.org/download/otp_src_R15B.tar.gz
>        wants: wxWidgets (for wx)?
>        wants: fop (documentation only?)?
>        wants: Java compiler (for jinterface)?
>

For Erlang you should be able to "touch lib/wx/SKIP" to disable its
requirement for wx. fop and the JVM are soft dependencies. You can
compile without either of those just fine. I usually force java to not
build by specifying --without-javac just so I don't have to groan as
it compiles jinterface.

Mark Crispin

unread,
Mar 8, 2012, 5:37:26 PM3/8/12
to us...@couchdb.apache.org
Thank you everuybody for your help.

It appears that the problem was that I installed erlang AFTER I installed
couchdb. Changing the installation order fixed it. Thank you!

Robert Newson

unread,
Mar 8, 2012, 6:25:03 PM3/8/12
to us...@couchdb.apache.org
Mark, please tell me you received error messages when you did 'make &&
sudo make install' for couchdb when erlang was not installed? Without
a './configure' first, there shouldn't even be a Makefile.

B.

On 8 March 2012 22:37, Mark Crispin

Mark Crispin

unread,
Mar 8, 2012, 6:35:18 PM3/8/12
to us...@couchdb.apache.org
Robert,

Unfortunately, I don't have any transcripts from my build attempt. I just
know that doing a fresh "make && sudo make install" for couchdb made the
problem go away.

As near as I can guess, perhaps an abortive erlang build was enough to
satisfy couchdb's build, because couchdb was launching erl. It just wasn't
started the web browser or otherwise doing anything useful.

Sorry that I don't have more information. But maybe the possibility that
an abortive erlang build that let the couchdb build complete is enough
info?

Robert Newson

unread,
Mar 8, 2012, 6:38:56 PM3/8/12
to us...@couchdb.apache.org
It isn't, but I'm happy not to pursue this. :)

B.

On 8 March 2012 23:35, Mark Crispin

Reply all
Reply to author
Forward
0 new messages