Re: Updating the CouchDB roadmap

2009-12-19 Thread Benoit Chesneau
On Sat, Dec 19, 2009 at 9:08 AM, Chris Anderson jch...@apache.org wrote:
 On Fri, Dec 18, 2009 at 9:02 AM, Noah Slater nsla...@tumbolia.org wrote:

 On 18 Dec 2009, at 16:45, Dirkjan Ochtman wrote:

 That said, it's perfectly alright if there's no roadmap at all, I'm
 just surprised by the lack of thoughts from the core developers (who
 are usually the ones to have these ideas) in this thread.

 Three of the core developers have been busy attending to real life for the 
 last few weeks. :)

 Heh,

 Mostly I've been dealing with real life by buckling down and writing code.

 I wrote up my ideas for 0.11 / 1.0 in this thread Nov 1st:

 http://mail-archives.apache.org/mod_mbox/couchdb-dev/200911.mbox/%3ce282921e0911011048sec6a907xbeac06651ae2c...@mail.gmail.com%3e

 Re-reading it they are still features I'm interested in, although I'm
 much less ambitious now. What I'd really like to see for 0.11:

 Account's tab for Futon:
  There's no reason app developers should have to write user account
 code or login/logout code. Users should just be able to log in and out
 of CouchDB (and sign up for accounts) via something like a Futon page
 that ships with the db. The userCtx is already available to Ajax apps
 via /_session so once we have a reliable way to log in and out this
 will be useful.

Maybe we could also make the auth really useful when you don't access
to CouchDB behind a proxy. My plan about this is :

- having authentification a little more modular than it is : cascading
across authentification modules and also add authentification via a
script
- authorization: having a way to protect read/write(so delete too) on
a db for a list of users or roles
- Protect access to the user database. Having it readable by public
isn't good for security purpose. Regardless of the length of the key
or the algorithm used, there will be a time where it isn't enough. Imo
we should hide access to this db behind an api.


 Design Doc Refactor:
  I've been heads down working on this patch in my spare time for the
 last 3 weeks. It is 90% a pure refactor (cleanup code not add new
 features.) It is nearing completion. This will change the query server
 protocol but not the HTTP API. You can look at what I've got here:
 http://github.com/jchris/couchdb/tree/ddoc-qs

What will be the changes in protocol ?


 Query Server Security:
  I haven't started on this yet but my plan is just to work from
 http://github.com/rcoder/couchdb/commits/master to make it more clear
 when the curl bindings are available to the JS sandbox. If anyone will
 pick this up and run with it I will jump for joy.

I failed to find the relation with security :) Isn't the point of this
fork to add an http client ?


- benoit


Re: Updating the CouchDB roadmap

2009-12-19 Thread Benoit Chesneau
On Fri, Dec 18, 2009 at 5:02 PM, Paul Davis paul.joseph.da...@gmail.com wrote:


 I'm not really a fan of roadmaps. We get new features when people
 write them. Everyone has the ability to write code, submit it and get
 a new feature. I can't tell you what feature you're going to write, so
 why would I tell everyone else that I expect you to write a given
 feature?

 Granted, I would be perfectly happy referring to versions by sha1 so
 maybe I'm a bit crazy.

 HTH,
 Paul Davis

Well roadmap in a sense would allow everyone to know who working on
what. Or if not who, what is the work in progress/planned.  Maybe more
than a roadmap we can put a todo list and at a time extract some items
done to make a release ?

- benoit


couchdb pubsub system

2009-12-19 Thread Benoit Chesneau
anyone working on a pubsub system ?

I'm thinking to start one that would work like this :
http://friendpaste.com/7TnIgB6zVyK6f3uhDbCiLw


Main point is to reduce number of connection when you want to suscribe
to more than one db per node. It could be useful for external indexer.

Also it may be used as an internal facility too to allow for example
automatic replication of a set of dbs.

- benoit


Reporting potential security issues

2009-12-19 Thread Florian Weimer
What are your preferences for reporting potential security issues?
Shall I post them here, open a bug, or send them through
secur...@apache.org?


Re: Reporting potential security issues

2009-12-19 Thread Chris Anderson
On Sat, Dec 19, 2009 at 9:19 AM, Florian Weimer f...@deneb.enyo.de wrote:
 What are your preferences for reporting potential security issues?
 Shall I post them here, open a bug, or send them through
 secur...@apache.org?


That's a good question. Development should occur on this list, so
unless you think it's a bad idea to make the security issues public,
this is the place. If you think it is more prudent to resolve the
issue privately, the most expedient method would be to privately mail
the people mentioned in:

http://svn.apache.org/repos/asf/couchdb/trunk/AUTHORS

Chris



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


Re: Reporting potential security issues

2009-12-19 Thread Dirk-Willem van Gulik

On 19 Dec 2009, at 17:19, Florian Weimer wrote:

 What are your preferences for reporting potential security issues?
 Shall I post them here, open a bug, or send them through
 secur...@apache.org?

If it is quite sensitive - please post to secur...@apaache.org; use pgp if/as 
needed. We'll pass it on to the developers in private. See 
http://www.apache.org/security/committers.html for more details.

Then security@project.org is the next level down (which auto cc to 
secur...@apache.org) - or  feel free to consults the AUTHORS file to directly 
mail the right developer - but do cc in secur...@apache.org org.

If it not very sensitive - dev is fine. Do note that security@ usually also 
trigger CVE and similar escalation if not yet done.

Shoot me or security@ a private mail if you need a hand with a judgment all.

Thanks,

Dw.



http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.



Re: Reporting potential security issues

2009-12-19 Thread Noah Slater

On 19 Dec 2009, at 20:54, Dirk-Willem van Gulik wrote:

 Then security@project.org is the next level down (which auto cc to 
 secur...@apache.org) - or  feel free to consults the AUTHORS file to directly 
 mail the right developer - but do cc in secur...@apache.org org.

Do we have a secur...@couchdb.apache.org? Who is on that list?

Re: Reporting potential security issues

2009-12-19 Thread Dirk-Willem van Gulik

On 19 Dec 2009, at 21:11, Noah Slater wrote:

 Do we have a secur...@couchdb.apache.org? Who is on that list?

If nothing is set up/asked for - it generally goes to pmc@ and cc security@ - 
but not all groups have asked for anything/set anything up.

I guess it is about time to consider as developers how you want to handle this 
and/or have a group of developers step up to timely act on the rare but 
important security@ reports. And commit to do so in a timely manner.

Dw 
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.



Re: Reporting potential security issues

2009-12-19 Thread Noah Slater
Who do we speak to to get that set up?

On 19 Dec 2009, at 21:37, Dirk-Willem van Gulik wrote:

 
 On 19 Dec 2009, at 21:11, Noah Slater wrote:
 
 Do we have a secur...@couchdb.apache.org? Who is on that list?
 
 If nothing is set up/asked for - it generally goes to pmc@ and cc security@ - 
 but not all groups have asked for anything/set anything up.
 
 I guess it is about time to consider as developers how you want to handle 
 this and/or have a group of developers step up to timely act on the rare but 
 important security@ reports. And commit to do so in a timely manner.
 
 Dw 
 http://www.bbc.co.uk/
 This e-mail (and any attachments) is confidential and may contain personal 
 views which are not the views of the BBC unless specifically stated.
 If you have received it in error, please delete it from your system.
 Do not use, copy or disclose the information in any way nor act in reliance 
 on it and notify the sender immediately.
 Please note that the BBC monitors e-mails sent or received.
 Further communication will signify your consent to this.
   



Re: couchdb pubsub system

2009-12-19 Thread Chris Anderson
On Sat, Dec 19, 2009 at 6:23 AM, Benoit Chesneau bchesn...@gmail.com wrote:
 anyone working on a pubsub system ?

 I'm thinking to start one that would work like this :
 http://friendpaste.com/7TnIgB6zVyK6f3uhDbCiLw


 Main point is to reduce number of connection when you want to suscribe
 to more than one db per node. It could be useful for external indexer.


This might be a good task for something like rabbitmq, maybe something
even more lightweight if it can be restarted via seq-num (so client
can handle accidentally dropped connections)

 Also it may be used as an internal facility too to allow for example
 automatic replication of a set of dbs.


It could be useful in a lot of places if it was a simple Erlang
abstraction. For instance in the new query server patch the way that
design docs are kept track of.

I'd like to use it for instance to dispatch _change events to all
waiting filter funs (buffered in a single JSON line) to the query
server.

Chris

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


Cannot Start Couchdb: init terminating in do_boot

2009-12-19 Thread viatropos

Hi there,

Every now and then I get this error when trying to start/use couchdb 0.9:

$ couchdb
Apache CouchDB 0.9.0 (LogLevel=info) is starting.
{init terminating in
do_boot,{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

The first part of the /usr/local/var/lib/couchdb/erl_crash.dump is at the
bottom of this post.

If I run it with sudo, sometimes it works, sometimes I get the above error. 
When I had it working a few days ago, I ran the couchdb command without sudo
and it was running fine.

If I run couchdb stop, I get this:

Apache CouchDB 0.9.0 (LogLevel=info) is starting.
{init terminating in
do_boot,{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}
init terminating in do_boot ()

So I've read that this is because I need to use a different port and that
something is using port 5984, but I would like to use the default one with
couchdb as I don't have anything else that would be using 5984.  I'm running
a Rails/CouchRest app.  Is there a way to just quit all couchdb processes
and start over without reinstalling?

Here's a list of my running processes, I'm on Ubuntu 8.10 running on
slicehost:

$ ps -A
  PID TTY  TIME CMD
1 ?00:00:00 init
2 ?00:00:00 kthreadd
3 ?00:00:00 migration/0
4 ?00:00:00 ksoftirqd/0
5 ?00:00:00 watchdog/0
6 ?00:00:02 events/0
7 ?00:00:00 khelper
   18 ?00:00:00 xenwatch
   19 ?00:00:00 xenbus
   28 ?00:00:00 migration/1
   29 ?00:00:00 ksoftirqd/1
   30 ?00:00:00 watchdog/1
   31 ?00:00:02 events/1
   32 ?00:00:00 migration/2
   33 ?00:00:00 ksoftirqd/2
   34 ?00:00:00 watchdog/2
   35 ?00:00:02 events/2
   36 ?00:00:00 migration/3
   37 ?00:00:00 ksoftirqd/3
   38 ?00:00:00 watchdog/3
   39 ?00:00:03 events/3
   65 ?00:00:00 kblockd/0
   66 ?00:00:00 kblockd/1
   67 ?00:00:00 kblockd/2
   68 ?00:00:00 kblockd/3
   78 ?00:00:00 kseriod
  125 ?00:00:00 pdflush
  126 ?00:00:00 pdflush
  127 ?00:00:02 kswapd0
  128 ?00:00:00 aio/0
  129 ?00:00:00 aio/1
  130 ?00:00:00 aio/2
  131 ?00:00:00 aio/3
  209 ?00:00:00 accel_watch/0
  210 ?00:00:00 accel_watch/1
  211 ?00:00:00 accel_watch/2
  212 ?00:00:00 accel_watch/3
 1103 ?00:00:00 ksnapd
 2079 ?00:00:00 kjournald
 2294 ?00:00:01 udevd
 3509 tty4 00:00:00 getty
 3510 tty5 00:00:00 getty
 3512 tty2 00:00:00 getty
 3513 tty3 00:00:00 getty
 3515 tty6 00:00:00 getty
 3546 ?00:00:01 syslogd
 3565 ?00:00:00 dd
 3568 ?00:00:00 klogd
 3586 ?00:00:00 sshd
 3634 ?00:00:00 mysqld_safe
 3676 ?00:00:40 mysqld
 3677 ?00:00:00 logger
 3821 ?00:00:00 nginx
 3822 ?00:00:04 nginx
 3823 ?00:00:04 nginx
 3825 ?00:00:00 nginx
 3826 ?00:00:04 nginx
 3842 ?00:02:25 ruby
 3846 ?00:02:25 ruby
 3862 ?00:00:03 monit
 3896 ?00:00:00 cron
 3906 tty1 00:00:00 getty
 3910 ?00:00:55 beam.smp
 5770 ?00:00:00 sshd
 5774 ?00:00:00 sshd
 5776 pts/100:00:00 bash
 5890 pts/100:00:00 ps


First page of output from erl_crash.dump:

=erl_crash_dump:0.1
Sat Dec 19 10:14:27 2009
Slogan: init terminating in do_boot ()
System version: Erlang (BEAM) emulator version 5.6.3 [source] [64-bit]
[smp:4] [async-threads:0] [kernel-po$
Compiled: Sat Jul 12 09:31:11 2008
Atoms: 6082
=memory
total: 6386480
processes: 1046494
processes_used: 1020814
system: 5339986
atom: 432593
atom_used: 400042
binary: 37338
code: 3593353
ets: 230688
=hash_table:atom_tab
size: 4813
used: 3422
objs: 6082
depth: 7
=index_table:atom_tab
size: 6144
limit: 1048576
entries: 6082
=hash_table:module_code
size: 97
used: 61
objs: 97
depth: 4
=index_table:module_code
size: 1024
limit: 65536
entries: 97
=hash_table:export_list
size: 2411
used: 1672
objs: 2831
depth: 7
=index_table:export_list
size: 3072
limit: 65536
entries: 2831
=hash_table:secondary_export_table
size: 97
used: 0
objs: 0
depth: 0
=hash_table:process_reg
size: 47
used: 27
objs: 33
depth: 2
=hash_table:fun_table
size: 397
used: 266
objs: 439
depth: 5
=hash_table:node_table
size: 11
used: 1
objs: 1


Thanks so much for your help.  I can't seem to find any simple way to start
and stop couchdb and avoid these errors...

Lance
-- 
View this message in context: 
http://n2.nabble.com/Cannot-Start-Couchdb-init-terminating-in-do-boot-tp4193056p4193056.html
Sent from the CouchDB Development mailing list archive at Nabble.com.


Re: Cannot Start Couchdb: init terminating in do_boot

2009-12-19 Thread viatropos

There are a few things that might have caused the problem I'm thinking:

1) Calling couchdb  multiple times?  I'm not sure what's best practice
for starting and knowing you've started couchdb...
2) I just installed ImageMagick on Ubuntu and had some problems with that,
and ended up installing an older version of it from source, so maybe it
messed with some dependencies?  How do I update couchdb without conflicting
with this?
3) Rebooting the Slicehost slice.  How does this impact couchdb?

When I check the couch.log file, it shows when I access my test website, but
I can't find where that process is...

Thanks so much for your help.
-- 
View this message in context: 
http://n2.nabble.com/Cannot-Start-Couchdb-init-terminating-in-do-boot-tp4193056p4193074.html
Sent from the CouchDB Development mailing list archive at Nabble.com.


Re: Cannot Start Couchdb: init terminating in do_boot

2009-12-19 Thread viatropos


Paul Davis-3 wrote:
 
 There's no good way to kill all couchdb processes safely. Generally,
 `ps ax | grep couch` should give you the list and then you can just
 `kill -KILL $PID` for each pid that comes back.
 
$ ps ax | grep couch
 3910 ?Sl 0:56 /usr/lib/erlang/erts-5.6.3/bin/beam.smp -Bd -K
true -- -root /usr/lib/erlang -progname erl -- -home /home/lance -noshell
-noinput -smp auto -sasl errlog_type error -pa
/usr/local/lib/couchdb/erlang/lib/couch-0.9.0/ebin
/usr/local/lib/couchdb/erlang/lib/mochiweb-r97/ebin
/usr/local/lib/couchdb/erlang/lib/ibrowse-1.4.1/ebin -eval
application:load(ibrowse) -eval application:load(crypto) -eval
application:load(couch) -eval crypto:start() -eval ibrowse:start() -eval
couch_server:start([ /usr/local/etc/couchdb/default.ini,
/usr/local/etc/couchdb/local.ini]), receive done - done end.
 5904 pts/1R+ 0:00 grep couch


Paul Davis-3 wrote:
 
 The most common errors for this sort of thing are that you haven't got
 correct permissions set on each of the directories that CouchDB needs
 access to. There's a list in the README of what needs to be set.
 
 Paul Davis
 
 On Sat, Dec 19, 2009 at 6:01 PM, viatropos lancejpoll...@gmail.com
 wrote:

 Hi there,

 Every now and then I get this error when trying to start/use couchdb 0.9:

 $ couchdb
 Apache CouchDB 0.9.0 (LogLevel=info) is starting.
 {init terminating in
 do_boot,{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}

 Crash dump was written to: erl_crash.dump
 init terminating in do_boot ()

 The first part of the /usr/local/var/lib/couchdb/erl_crash.dump is at the
 bottom of this post.

 If I run it with sudo, sometimes it works, sometimes I get the above
 error.
 When I had it working a few days ago, I ran the couchdb command without
 sudo
 and it was running fine.

 If I run couchdb stop, I get this:

 Apache CouchDB 0.9.0 (LogLevel=info) is starting.
 {init terminating in
 do_boot,{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}
 init terminating in do_boot ()

 So I've read that this is because I need to use a different port and that
 something is using port 5984, but I would like to use the default one
 with
 couchdb as I don't have anything else that would be using 5984.  I'm
 running
 a Rails/CouchRest app.  Is there a way to just quit all couchdb processes
 and start over without reinstalling?

 Here's a list of my running processes, I'm on Ubuntu 8.10 running on
 slicehost:

 $ ps -A
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:02 events/0
    7 ?        00:00:00 khelper
   18 ?        00:00:00 xenwatch
   19 ?        00:00:00 xenbus
   28 ?        00:00:00 migration/1
   29 ?        00:00:00 ksoftirqd/1
   30 ?        00:00:00 watchdog/1
   31 ?        00:00:02 events/1
   32 ?        00:00:00 migration/2
   33 ?        00:00:00 ksoftirqd/2
   34 ?        00:00:00 watchdog/2
   35 ?        00:00:02 events/2
   36 ?        00:00:00 migration/3
   37 ?        00:00:00 ksoftirqd/3
   38 ?        00:00:00 watchdog/3
   39 ?        00:00:03 events/3
   65 ?        00:00:00 kblockd/0
   66 ?        00:00:00 kblockd/1
   67 ?        00:00:00 kblockd/2
   68 ?        00:00:00 kblockd/3
   78 ?        00:00:00 kseriod
  125 ?        00:00:00 pdflush
  126 ?        00:00:00 pdflush
  127 ?        00:00:02 kswapd0
  128 ?        00:00:00 aio/0
  129 ?        00:00:00 aio/1
  130 ?        00:00:00 aio/2
  131 ?        00:00:00 aio/3
  209 ?        00:00:00 accel_watch/0
  210 ?        00:00:00 accel_watch/1
  211 ?        00:00:00 accel_watch/2
  212 ?        00:00:00 accel_watch/3
  1103 ?        00:00:00 ksnapd
  2079 ?        00:00:00 kjournald
  2294 ?        00:00:01 udevd
  3509 tty4     00:00:00 getty
  3510 tty5     00:00:00 getty
  3512 tty2     00:00:00 getty
  3513 tty3     00:00:00 getty
  3515 tty6     00:00:00 getty
  3546 ?        00:00:01 syslogd
  3565 ?        00:00:00 dd
  3568 ?        00:00:00 klogd
  3586 ?        00:00:00 sshd
  3634 ?        00:00:00 mysqld_safe
  3676 ?        00:00:40 mysqld
  3677 ?        00:00:00 logger
  3821 ?        00:00:00 nginx
  3822 ?        00:00:04 nginx
  3823 ?        00:00:04 nginx
  3825 ?        00:00:00 nginx
  3826 ?        00:00:04 nginx
  3842 ?        00:02:25 ruby
  3846 ?        00:02:25 ruby
  3862 ?        00:00:03 monit
  3896 ?        00:00:00 cron
  3906 tty1     00:00:00 getty
  3910 ?        00:00:55 beam.smp
  5770 ?        00:00:00 sshd
  5774 ?        00:00:00 sshd
  5776 pts/1    00:00:00 bash
  5890 pts/1    00:00:00 ps


 First page of output from erl_crash.dump:

 =erl_crash_dump:0.1
 Sat Dec 19 10:14:27 2009
 Slogan: init terminating in do_boot ()
 System version: 

Re: Cannot Start Couchdb: init terminating in do_boot

2009-12-19 Thread Paul Davis
On Sat, Dec 19, 2009 at 6:08 PM, viatropos lancejpoll...@gmail.com wrote:

 There are a few things that might have caused the problem I'm thinking:

 1) Calling couchdb  multiple times?  I'm not sure what's best practice
 for starting and knowing you've started couchdb...

Yeah, don't do that. When you start couchdb use 'couchdb -b` and
`couchdb -k` to start and stop a background process.

HTH,
Paul Davis

 2) I just installed ImageMagick on Ubuntu and had some problems with that,
 and ended up installing an older version of it from source, so maybe it
 messed with some dependencies?  How do I update couchdb without conflicting
 with this?
 3) Rebooting the Slicehost slice.  How does this impact couchdb?

 When I check the couch.log file, it shows when I access my test website, but
 I can't find where that process is...

 Thanks so much for your help.
 --
 View this message in context: 
 http://n2.nabble.com/Cannot-Start-Couchdb-init-terminating-in-do-boot-tp4193056p4193074.html
 Sent from the CouchDB Development mailing list archive at Nabble.com.



Re: Cannot Start Couchdb: init terminating in do_boot

2009-12-19 Thread viatropos


Noah Slater-2 wrote:
 
 
 On 19 Dec 2009, at 23:11, Paul Davis wrote:
 
 On Sat, Dec 19, 2009 at 6:08 PM, viatropos lancejpoll...@gmail.com
 wrote:
 
 There are a few things that might have caused the problem I'm thinking:
 
 1) Calling couchdb  multiple times?  I'm not sure what's best
 practice
 for starting and knowing you've started couchdb...
 
 Yeah, don't do that. When you start couchdb use 'couchdb -b` and
 `couchdb -k` to start and stop a background process.
 
 Or use the init.d script, and hook it into your runlevels so that it is
 started on boot.
 
 The README has more instructions for you.
 

Thank you guys!  Simplest thing, can't believe I forgot to check the README
:p.  It's working now.
-- 
View this message in context: 
http://n2.nabble.com/Cannot-Start-Couchdb-init-terminating-in-do-boot-tp4193056p4193181.html
Sent from the CouchDB Development mailing list archive at Nabble.com.


Re: Cannot Start Couchdb: init terminating in do_boot

2009-12-19 Thread Noah Slater
Awesome!

On 19 Dec 2009, at 23:51, viatropos wrote:

 
 
 Noah Slater-2 wrote:
 
 
 On 19 Dec 2009, at 23:11, Paul Davis wrote:
 
 On Sat, Dec 19, 2009 at 6:08 PM, viatropos lancejpoll...@gmail.com
 wrote:
 
 There are a few things that might have caused the problem I'm thinking:
 
 1) Calling couchdb  multiple times?  I'm not sure what's best
 practice
 for starting and knowing you've started couchdb...
 
 Yeah, don't do that. When you start couchdb use 'couchdb -b` and
 `couchdb -k` to start and stop a background process.
 
 Or use the init.d script, and hook it into your runlevels so that it is
 started on boot.
 
 The README has more instructions for you.
 
 
 Thank you guys!  Simplest thing, can't believe I forgot to check the README
 :p.  It's working now.
 -- 
 View this message in context: 
 http://n2.nabble.com/Cannot-Start-Couchdb-init-terminating-in-do-boot-tp4193056p4193181.html
 Sent from the CouchDB Development mailing list archive at Nabble.com.



upgrading to json2.js

2009-12-19 Thread Chris Anderson
It's well known that in order to take advantage of native JSON
libraries in the newest Mozilla JavaScript VMs, we'll need to change
our handling of 'undefined' in the toJSON() routine.

I propose we make this change now, by replacing our current JSON
handling with json2.js, the current reference implementation.

I've started the work here:

http://github.com/jchris/couchdb/tree/json2

Everything works except E4X. When I run the view_xml tests, I see this
error in the logs:

OS Process :: function raised exception (TypeError:
String.prototype.toJSON called on incompatible XML) with doc._id
43840f81289e03fec4e9f620b2c03799

In our old implementation of toJSON, we run value.toXMLString() to
convert XML to strings. json2.js takes a callback parameter to allow
modification of results, but the TypeError is triggered before the
callback, it seems.

If any of you JavaScript ninjas wanna give this a shot, please help me
finish it.

Chris

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


Re: upgrading to json2.js

2009-12-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Anderson wrote:
 I propose we make this change now, by replacing our current JSON
 handling with json2.js, the current reference implementation.

There is also a nasty bug in the older version currently used by couchjs.
If you specify a replacer function when calling JSON.stringify and the item
being examined is a function then the output of the replacer function is
completely ignored.  (I was returning a string.)

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkstkFoACgkQmOOfHg372QTSyQCgr9A8scp7Vxk+2ZCmPUba0e5P
P6oAoLIcQFWPquv4UTqz/+PRigsDQjZj
=d2vQ
-END PGP SIGNATURE-



Running CouchDB Futon on Remote Server

2009-12-19 Thread viatropos

Hi there,

I have an app running on Slicehost and am wondering, how do I run the
CouchDB Futon panel on an authenticated remote server?

I have to login with ssh n...@host.com in the terminal, not sure what this
means for using Futon.

Thanks for the help.
-- 
View this message in context: 
http://n2.nabble.com/Running-CouchDB-Futon-on-Remote-Server-tp4193550p4193550.html
Sent from the CouchDB Development mailing list archive at Nabble.com.


[jira] Updated: (COUCHDB-597) Replication tasks crash.

2009-12-19 Thread Adam Kocoloski (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Kocoloski updated COUCHDB-597:
---


Hi Robert, I can reproduce the crashes locally and I've discovered why they 
happen independently of the {ref(), integer()} problem.  The basic issue is 
that attachment downloads do not employ the same retry checks that we do for 
regular document GETs.  For instance, the attachment receiver process 
associated with a replication would be waiting an infinite amount for response 
headers, when in fact it had an error message in its mailbox informing it that 
the request had failed.  Eventually the changes feed times out and the 
replication crashes.

If I apply http://friendpaste.com/5IA5MlRx0OZhKmsLNPMeJe, crank up the changes 
feed timeout, and add the catchall handle_infos we've talked about before I can 
successfully run the script you posted here.  We have more work to do, though, 
namely

1) Reworking the changes feed timeout.  Currently it will trigger if there is 
no activity for X milliseconds on the connection handling the _changes feed.  
There are situations where this is actually normal, since the changes feed 
consumer is responsible for controlling the socket, and if the target is 
_really_ slow (or the documents are huge) it's quite possible that the changes 
feed will not be consulted for a long time.  I think the solution is to handle 
inactivity timeouts in couch_rep_changes_feed.erl instead of in the underlying 
ibrowse system.

2a) Attachment retry logic that handles redirects and limits the number of 
retries.  Basically, the same code as we have in couch_rep_httpc, but only 
applied until we receive the response headers.  My friendpaste above is a 
primitive form of what I'd ultimately like to see here.

2b) When an attachment body download has started and then fails, we can't 
simply retry it.  We need to do a Range request or find another way to skip the 
first N bytes of the retry.  Currently we just give up on the entire 
replication if an attachment request ever fails mid-download.

 Replication tasks crash.
 

 Key: COUCHDB-597
 URL: https://issues.apache.org/jira/browse/COUCHDB-597
 Project: CouchDB
  Issue Type: Bug
  Components: Database Core
Affects Versions: 0.11
Reporter: Robert Newson

 If I kick off 10 replication tasks in quick succession, occasionally one or 
 two of the replication tasks will die and not be resumed. It seems that the 
 stat tracking is a little buggy, and under stress can eventually cause a 
 permanent failure of the supervised replication task;
 [Fri, 11 Dec 2009 19:00:08 GMT] [error] [0.80.0] {error_report,0.30.0,
 {0.80.0,supervisor_report,
  [{supervisor,{local,couch_rep_sup}},
   {errorContext,shutdown_error},
   {reason,killed},
   {offender,
   [{pid,0.6700.11},
{name,fcbb13200a1618cf983b347f4d2c9835+create_target},
{mfa,
{gen_server,start_link,
[couch_rep,
 [fcbb13200a1618cf983b347f4d2c9835,
  {[{create_target,true},
{source,http://node:5984/perf-p2;},
{target,perf-p2}]},
  {user_ctx,null,[_admin]}],
 []]}},
{restart_type,temporary},
{shutdown,1},
{child_type,worker}]}]}}
 [Fri, 11 Dec 2009 19:00:08 GMT] [error] [emulator] Error in process 
 0.6705.11 with exit value: 
 {badarg,[{ets,insert,[stats_hit_table,{{couchdb,open_os_files},-1}]},{couch_stats_collector,decrement,1}]}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Running CouchDB Futon on Remote Server

2009-12-19 Thread Mark Gallop
Hello,

2009/12/19 viatropos lancejpoll...@gmail.com:

 I have to login with ssh n...@host.com in the terminal, not sure what this
 means for using Futon.

Try this:

ssh -fNg -L 5985:127.0.0.1:5984 n...@host.com

and then go to http://localhost:5985/_utils/ in your browser.

Cheers,
Mark


[jira] Updated: (COUCHDB-597) Replication tasks crash.

2009-12-19 Thread Adam Kocoloski (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Kocoloski updated COUCHDB-597:
---


Also, I don't really understand why the after clause is necessary in that 
paste.  I tried adding a connect_timeout to ibrowse but didn't get any 
conn_failed messages.  It really does seem like a connection is made but then 
the request just stalls.  I suppose it's possible that a connection took 9 
seconds (e.g. 3 consecutive TCP retransmits), and then CouchDB took more than 1 
second to respond with the headers.  Seems unlikely, though.  It makes me think 
we need to add this after' clause to couch_rep_httpc too.

 Replication tasks crash.
 

 Key: COUCHDB-597
 URL: https://issues.apache.org/jira/browse/COUCHDB-597
 Project: CouchDB
  Issue Type: Bug
  Components: Database Core
Affects Versions: 0.11
Reporter: Robert Newson

 If I kick off 10 replication tasks in quick succession, occasionally one or 
 two of the replication tasks will die and not be resumed. It seems that the 
 stat tracking is a little buggy, and under stress can eventually cause a 
 permanent failure of the supervised replication task;
 [Fri, 11 Dec 2009 19:00:08 GMT] [error] [0.80.0] {error_report,0.30.0,
 {0.80.0,supervisor_report,
  [{supervisor,{local,couch_rep_sup}},
   {errorContext,shutdown_error},
   {reason,killed},
   {offender,
   [{pid,0.6700.11},
{name,fcbb13200a1618cf983b347f4d2c9835+create_target},
{mfa,
{gen_server,start_link,
[couch_rep,
 [fcbb13200a1618cf983b347f4d2c9835,
  {[{create_target,true},
{source,http://node:5984/perf-p2;},
{target,perf-p2}]},
  {user_ctx,null,[_admin]}],
 []]}},
{restart_type,temporary},
{shutdown,1},
{child_type,worker}]}]}}
 [Fri, 11 Dec 2009 19:00:08 GMT] [error] [emulator] Error in process 
 0.6705.11 with exit value: 
 {badarg,[{ets,insert,[stats_hit_table,{{couchdb,open_os_files},-1}]},{couch_stats_collector,decrement,1}]}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Running CouchDB Futon on Remote Server

2009-12-19 Thread Paul Joseph Davis
You can use ssh to forward ports. Check the ssh man page for specifics  
but it's something like:


$ ssh -something 5984:127.0.0.1:5984

And then point your browser at http://127.0.0.1:5984/_utils/

HTH,
Paul Davis



On Dec 19, 2009, at 9:52 PM, viatropos lancejpoll...@gmail.com wrote:



Hi there,

I have an app running on Slicehost and am wondering, how do I run the
CouchDB Futon panel on an authenticated remote server?

I have to login with ssh n...@host.com in the terminal, not sure  
what this

means for using Futon.

Thanks for the help.
--
View this message in context: 
http://n2.nabble.com/Running-CouchDB-Futon-on-Remote-Server-tp4193550p4193550.html
Sent from the CouchDB Development mailing list archive at Nabble.com.


[jira] Updated: (COUCHDB-596) Replication tasks sometimes never complete

2009-12-19 Thread Adam Kocoloski (JIRA)

 [ 
https://issues.apache.org/jira/browse/COUCHDB-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Kocoloski updated COUCHDB-596:
---


It's possible that the issues I described in COUCHDB-597 could cause this too, 
if the changes feed had been fully downloaded.  That's the only timeout we 
have; everyone else is content to wait forever while the attachment receiver is 
stuck waiting for a message that will never come.

 Replication tasks sometimes never complete
 --

 Key: COUCHDB-596
 URL: https://issues.apache.org/jira/browse/COUCHDB-596
 Project: CouchDB
  Issue Type: Bug
  Components: Database Core
Affects Versions: 0.11
Reporter: Robert Newson

 In my recent testing with trunk, I kick off around 10 replication tasks in 
 quick succession, each for databases with at least a few thousand documents. 
 More often than not, one or two of these replication tasks never completes; 
 the response is never returned to the calling thread and the tasks remain 
 present in _active_tasks until the server is rebooted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.