You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Stoo Goff <st...@gmail.com> on 2012/11/07 12:46:56 UTC

Remote view looks different to localhost

Hi,

I'm getting some strange differences when I view a database, depending on
whether I view the database remotely or locally.

The server:

Debian squeeze running Couchdb 0.11.0

The dev box:

Ubuntu 11.10 running Couchdb 1.0.1

I initially created the database on the dev machine, then replicated it to
an empty database on the server. I have a web app running on the server
connecting over localhost and everything seemed to be working fine - in
fact as far as the web app is concerned it's all running perfect.

I changed the Couchdb settings so I could view the data remotely.
Initially, I used Futon to take a look and that showed me a completely
different set of data. So I tried looking at the data using CURL. That
showed me the same as Futon.

CURL run on the server:

curl -X GET http://localhost:5984/muninn

{"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}

CURL run on the dev machine:

curl -X GET http://user:pass@odin:5984/muninn

{"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}

So, same disk size with completely different doc counts. With the remote
connection it looks like an historical view of the data, but why would it
do it?

Any help or insight would be appreciated!

Stoo

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
I've only got two machines with Couch running...

But from my dev machine using the IP address of the server I get the same
results:

{"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}


On 7 November 2012 11:54, Paul J Davis <pa...@gmail.com> wrote:

> Double check that you're not hitting two different machines.
>
> On Nov 7, 2012, at 12:46 PM, Stoo Goff <st...@gmail.com> wrote:
>
> > Hi,
> >
> > I'm getting some strange differences when I view a database, depending on
> > whether I view the database remotely or locally.
> >
> > The server:
> >
> > Debian squeeze running Couchdb 0.11.0
> >
> > The dev box:
> >
> > Ubuntu 11.10 running Couchdb 1.0.1
> >
> > I initially created the database on the dev machine, then replicated it
> to
> > an empty database on the server. I have a web app running on the server
> > connecting over localhost and everything seemed to be working fine - in
> > fact as far as the web app is concerned it's all running perfect.
> >
> > I changed the Couchdb settings so I could view the data remotely.
> > Initially, I used Futon to take a look and that showed me a completely
> > different set of data. So I tried looking at the data using CURL. That
> > showed me the same as Futon.
> >
> > CURL run on the server:
> >
> > curl -X GET http://localhost:5984/muninn
> >
> >
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> >
> > CURL run on the dev machine:
> >
> > curl -X GET http://user:pass@odin:5984/muninn
> >
> >
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> >
> > So, same disk size with completely different doc counts. With the remote
> > connection it looks like an historical view of the data, but why would it
> > do it?
> >
> > Any help or insight would be appreciated!
> >
> > Stoo
>

Re: Remote view looks different to localhost

Posted by Paul J Davis <pa...@gmail.com>.
Double check that you're not hitting two different machines. 

On Nov 7, 2012, at 12:46 PM, Stoo Goff <st...@gmail.com> wrote:

> Hi,
> 
> I'm getting some strange differences when I view a database, depending on
> whether I view the database remotely or locally.
> 
> The server:
> 
> Debian squeeze running Couchdb 0.11.0
> 
> The dev box:
> 
> Ubuntu 11.10 running Couchdb 1.0.1
> 
> I initially created the database on the dev machine, then replicated it to
> an empty database on the server. I have a web app running on the server
> connecting over localhost and everything seemed to be working fine - in
> fact as far as the web app is concerned it's all running perfect.
> 
> I changed the Couchdb settings so I could view the data remotely.
> Initially, I used Futon to take a look and that showed me a completely
> different set of data. So I tried looking at the data using CURL. That
> showed me the same as Futon.
> 
> CURL run on the server:
> 
> curl -X GET http://localhost:5984/muninn
> 
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> 
> CURL run on the dev machine:
> 
> curl -X GET http://user:pass@odin:5984/muninn
> 
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> 
> So, same disk size with completely different doc counts. With the remote
> connection it looks like an historical view of the data, but why would it
> do it?
> 
> Any help or insight would be appreciated!
> 
> Stoo

Re: Remote view looks different to localhost

Posted by Paul Davis <pa...@gmail.com>.
That is a tough question. Also, I would be concerned about corruption. I'd
suggest booting one with a different data directory and replicate over if
you can.

Having two writers to the same data file isn't something that we attempt to
protect against.


On Wed, Nov 7, 2012 at 2:20 PM, Stoo Goff <st...@gmail.com> wrote:

> OK, that definitely is the case. I've used /etc/init.d/couchdb stop to stop
> the server. ps ax shows one instance running now. If I make a request using
> curl on the server it gives me the same results I've been seeing all along,
> if I do it from the remote machine I get a failure to connect to host
>
> So there were definitely two instances running. The currently running
> instance has the correct data. If I stop the remaining instance of couch
> and restart which set of data will I end up with?
>
>
> On 7 November 2012 13:11, Stoo Goff <st...@gmail.com> wrote:
>
> > I think you might have it...
> >
> > 16592 ?        S    267:59 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true
> > -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> > -noshell -noinput -sasl errlog_type error -couch_ini
> > /etc/couchdb/default.ini /etc/couchdb/local.ini /etc/couchdb/default.ini
> > /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid
> -heart
> > 17665 ?        S    202:21 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true
> > -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> > -noshell -noinput -sasl errlog_type error -couch_ini
> > /etc/couchdb/default.ini /etc/couchdb/local.ini /etc/couchdb/default.ini
> > /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid
> -heart
> >
> >
> > On 7 November 2012 12:58, Paul J Davis <paul.joseph.davis@gmail.com
> >wrote:
> >
> >> Forgot to add that you should also do a "ps ax | grep beam" and make
> sure
> >> you don't have two servers running bound to two different ports.
> >>
> >> On Nov 7, 2012, at 1:56 PM, Stoo Goff <st...@gmail.com> wrote:
> >>
> >> > Also, why would the sequence numbers be so different?
> >> >
> >> > Logged in to the server I get update_seq of 1194. Viewing the same
> date
> >> > remotely the udpate_seq is 102.
> >> >
> >> > On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:
> >> >
> >> >> Adding ?_all_docs=true gives me the same result as before. Do you
> mean
> >> >> database/_all_docs?
> >> >>
> >> >>
> >> >> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
> >> >>
> >> >>> and if u add ?_all_docs=true what docs would u get?
> >> >>> (do check the syntax)
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Wed, 7 Nov 2012 11:46:56 +0000
> >> >>> Stoo Goff <st...@gmail.com> wrote:
> >> >>>
> >> >>>> Hi,
> >> >>>>
> >> >>>> I'm getting some strange differences when I view a database,
> >> >>>> depending on whether I view the database remotely or locally.
> >> >>>>
> >> >>>> The server:
> >> >>>>
> >> >>>> Debian squeeze running Couchdb 0.11.0
> >> >>>>
> >> >>>> The dev box:
> >> >>>>
> >> >>>> Ubuntu 11.10 running Couchdb 1.0.1
> >> >>>>
> >> >>>> I initially created the database on the dev machine, then
> replicated
> >> >>>> it to an empty database on the server. I have a web app running on
> >> >>>> the server connecting over localhost and everything seemed to be
> >> >>>> working fine - in fact as far as the web app is concerned it's all
> >> >>>> running perfect.
> >> >>>>
> >> >>>> I changed the Couchdb settings so I could view the data remotely.
> >> >>>> Initially, I used Futon to take a look and that showed me a
> >> completely
> >> >>>> different set of data. So I tried looking at the data using CURL.
> >> That
> >> >>>> showed me the same as Futon.
> >> >>>>
> >> >>>> CURL run on the server:
> >> >>>>
> >> >>>> curl -X GET http://localhost:5984/muninn
> >> >>>
> >>
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> >> >>>>
> >> >>>> CURL run on the dev machine:
> >> >>>>
> >> >>>> curl -X GET http://user:pass@odin:5984/muninn
> >> >>>
> >>
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> >> >>>>
> >> >>>> So, same disk size with completely different doc counts. With the
> >> >>>> remote connection it looks like an historical view of the data, but
> >> >>>> why would it do it?
> >> >>>>
> >> >>>> Any help or insight would be appreciated!
> >> >>>>
> >> >>>> Stoo
> >> >>
> >> >>
> >>
> >
> >
>

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
I used database/_all_docs?include_docs=true and piped it to a file. It's
very handy being able to do that!

I've killed the process and restarted Couch and it seems to be using the
dataset that I want, which is good.

I think what happened is when I changed the bind value to the external IP I
either started a new instance then or the old instance didn't shut down
correctly.

Thanks a lot for everyone's help!

On 7 November 2012 13:31, Robert Newson <rn...@apache.org> wrote:

> I'd be very careful here. Assuming database_dir is the same for both
> instance, only one of them is pointing to the same data that the filesystem
> is. If it's not the one you want, do not stop either instance, use the
> /proc/<pid>/fd links to find the actual data and copy it out. Verify it by
> copying that data to another server before you stop either instance.
>
>
> On 7 November 2012 13:20, Stoo Goff <st...@gmail.com> wrote:
>
> > OK, that definitely is the case. I've used /etc/init.d/couchdb stop to
> stop
> > the server. ps ax shows one instance running now. If I make a request
> using
> > curl on the server it gives me the same results I've been seeing all
> along,
> > if I do it from the remote machine I get a failure to connect to host
> >
> > So there were definitely two instances running. The currently running
> > instance has the correct data. If I stop the remaining instance of couch
> > and restart which set of data will I end up with?
> >
> >
> > On 7 November 2012 13:11, Stoo Goff <st...@gmail.com> wrote:
> >
> > > I think you might have it...
> > >
> > > 16592 ?        S    267:59 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K
> true
> > > -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> > > -noshell -noinput -sasl errlog_type error -couch_ini
> > > /etc/couchdb/default.ini /etc/couchdb/local.ini
> /etc/couchdb/default.ini
> > > /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid
> > -heart
> > > 17665 ?        S    202:21 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K
> true
> > > -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> > > -noshell -noinput -sasl errlog_type error -couch_ini
> > > /etc/couchdb/default.ini /etc/couchdb/local.ini
> /etc/couchdb/default.ini
> > > /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid
> > -heart
> > >
> > >
> > > On 7 November 2012 12:58, Paul J Davis <paul.joseph.davis@gmail.com
> > >wrote:
> > >
> > >> Forgot to add that you should also do a "ps ax | grep beam" and make
> > sure
> > >> you don't have two servers running bound to two different ports.
> > >>
> > >> On Nov 7, 2012, at 1:56 PM, Stoo Goff <st...@gmail.com> wrote:
> > >>
> > >> > Also, why would the sequence numbers be so different?
> > >> >
> > >> > Logged in to the server I get update_seq of 1194. Viewing the same
> > date
> > >> > remotely the udpate_seq is 102.
> > >> >
> > >> > On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:
> > >> >
> > >> >> Adding ?_all_docs=true gives me the same result as before. Do you
> > mean
> > >> >> database/_all_docs?
> > >> >>
> > >> >>
> > >> >> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
> > >> >>
> > >> >>> and if u add ?_all_docs=true what docs would u get?
> > >> >>> (do check the syntax)
> > >> >>>
> > >> >>>
> > >> >>>
> > >> >>> On Wed, 7 Nov 2012 11:46:56 +0000
> > >> >>> Stoo Goff <st...@gmail.com> wrote:
> > >> >>>
> > >> >>>> Hi,
> > >> >>>>
> > >> >>>> I'm getting some strange differences when I view a database,
> > >> >>>> depending on whether I view the database remotely or locally.
> > >> >>>>
> > >> >>>> The server:
> > >> >>>>
> > >> >>>> Debian squeeze running Couchdb 0.11.0
> > >> >>>>
> > >> >>>> The dev box:
> > >> >>>>
> > >> >>>> Ubuntu 11.10 running Couchdb 1.0.1
> > >> >>>>
> > >> >>>> I initially created the database on the dev machine, then
> > replicated
> > >> >>>> it to an empty database on the server. I have a web app running
> on
> > >> >>>> the server connecting over localhost and everything seemed to be
> > >> >>>> working fine - in fact as far as the web app is concerned it's
> all
> > >> >>>> running perfect.
> > >> >>>>
> > >> >>>> I changed the Couchdb settings so I could view the data remotely.
> > >> >>>> Initially, I used Futon to take a look and that showed me a
> > >> completely
> > >> >>>> different set of data. So I tried looking at the data using CURL.
> > >> That
> > >> >>>> showed me the same as Futon.
> > >> >>>>
> > >> >>>> CURL run on the server:
> > >> >>>>
> > >> >>>> curl -X GET http://localhost:5984/muninn
> > >> >>>
> > >>
> >
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> > >> >>>>
> > >> >>>> CURL run on the dev machine:
> > >> >>>>
> > >> >>>> curl -X GET http://user:pass@odin:5984/muninn
> > >> >>>
> > >>
> >
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> > >> >>>>
> > >> >>>> So, same disk size with completely different doc counts. With the
> > >> >>>> remote connection it looks like an historical view of the data,
> but
> > >> >>>> why would it do it?
> > >> >>>>
> > >> >>>> Any help or insight would be appreciated!
> > >> >>>>
> > >> >>>> Stoo
> > >> >>
> > >> >>
> > >>
> > >
> > >
> >
>

Re: Remote view looks different to localhost

Posted by Robert Newson <rn...@apache.org>.
I'd be very careful here. Assuming database_dir is the same for both
instance, only one of them is pointing to the same data that the filesystem
is. If it's not the one you want, do not stop either instance, use the
/proc/<pid>/fd links to find the actual data and copy it out. Verify it by
copying that data to another server before you stop either instance.


On 7 November 2012 13:20, Stoo Goff <st...@gmail.com> wrote:

> OK, that definitely is the case. I've used /etc/init.d/couchdb stop to stop
> the server. ps ax shows one instance running now. If I make a request using
> curl on the server it gives me the same results I've been seeing all along,
> if I do it from the remote machine I get a failure to connect to host
>
> So there were definitely two instances running. The currently running
> instance has the correct data. If I stop the remaining instance of couch
> and restart which set of data will I end up with?
>
>
> On 7 November 2012 13:11, Stoo Goff <st...@gmail.com> wrote:
>
> > I think you might have it...
> >
> > 16592 ?        S    267:59 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true
> > -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> > -noshell -noinput -sasl errlog_type error -couch_ini
> > /etc/couchdb/default.ini /etc/couchdb/local.ini /etc/couchdb/default.ini
> > /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid
> -heart
> > 17665 ?        S    202:21 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true
> > -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> > -noshell -noinput -sasl errlog_type error -couch_ini
> > /etc/couchdb/default.ini /etc/couchdb/local.ini /etc/couchdb/default.ini
> > /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid
> -heart
> >
> >
> > On 7 November 2012 12:58, Paul J Davis <paul.joseph.davis@gmail.com
> >wrote:
> >
> >> Forgot to add that you should also do a "ps ax | grep beam" and make
> sure
> >> you don't have two servers running bound to two different ports.
> >>
> >> On Nov 7, 2012, at 1:56 PM, Stoo Goff <st...@gmail.com> wrote:
> >>
> >> > Also, why would the sequence numbers be so different?
> >> >
> >> > Logged in to the server I get update_seq of 1194. Viewing the same
> date
> >> > remotely the udpate_seq is 102.
> >> >
> >> > On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:
> >> >
> >> >> Adding ?_all_docs=true gives me the same result as before. Do you
> mean
> >> >> database/_all_docs?
> >> >>
> >> >>
> >> >> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
> >> >>
> >> >>> and if u add ?_all_docs=true what docs would u get?
> >> >>> (do check the syntax)
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Wed, 7 Nov 2012 11:46:56 +0000
> >> >>> Stoo Goff <st...@gmail.com> wrote:
> >> >>>
> >> >>>> Hi,
> >> >>>>
> >> >>>> I'm getting some strange differences when I view a database,
> >> >>>> depending on whether I view the database remotely or locally.
> >> >>>>
> >> >>>> The server:
> >> >>>>
> >> >>>> Debian squeeze running Couchdb 0.11.0
> >> >>>>
> >> >>>> The dev box:
> >> >>>>
> >> >>>> Ubuntu 11.10 running Couchdb 1.0.1
> >> >>>>
> >> >>>> I initially created the database on the dev machine, then
> replicated
> >> >>>> it to an empty database on the server. I have a web app running on
> >> >>>> the server connecting over localhost and everything seemed to be
> >> >>>> working fine - in fact as far as the web app is concerned it's all
> >> >>>> running perfect.
> >> >>>>
> >> >>>> I changed the Couchdb settings so I could view the data remotely.
> >> >>>> Initially, I used Futon to take a look and that showed me a
> >> completely
> >> >>>> different set of data. So I tried looking at the data using CURL.
> >> That
> >> >>>> showed me the same as Futon.
> >> >>>>
> >> >>>> CURL run on the server:
> >> >>>>
> >> >>>> curl -X GET http://localhost:5984/muninn
> >> >>>
> >>
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> >> >>>>
> >> >>>> CURL run on the dev machine:
> >> >>>>
> >> >>>> curl -X GET http://user:pass@odin:5984/muninn
> >> >>>
> >>
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> >> >>>>
> >> >>>> So, same disk size with completely different doc counts. With the
> >> >>>> remote connection it looks like an historical view of the data, but
> >> >>>> why would it do it?
> >> >>>>
> >> >>>> Any help or insight would be appreciated!
> >> >>>>
> >> >>>> Stoo
> >> >>
> >> >>
> >>
> >
> >
>

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
OK, that definitely is the case. I've used /etc/init.d/couchdb stop to stop
the server. ps ax shows one instance running now. If I make a request using
curl on the server it gives me the same results I've been seeing all along,
if I do it from the remote machine I get a failure to connect to host

So there were definitely two instances running. The currently running
instance has the correct data. If I stop the remaining instance of couch
and restart which set of data will I end up with?


On 7 November 2012 13:11, Stoo Goff <st...@gmail.com> wrote:

> I think you might have it...
>
> 16592 ?        S    267:59 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true
> -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> -noshell -noinput -sasl errlog_type error -couch_ini
> /etc/couchdb/default.ini /etc/couchdb/local.ini /etc/couchdb/default.ini
> /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid -heart
> 17665 ?        S    202:21 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true
> -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb --
> -noshell -noinput -sasl errlog_type error -couch_ini
> /etc/couchdb/default.ini /etc/couchdb/local.ini /etc/couchdb/default.ini
> /etc/couchdb/local.ini -s couch -pidfile /var/run/couchdb/couchdb.pid -heart
>
>
> On 7 November 2012 12:58, Paul J Davis <pa...@gmail.com>wrote:
>
>> Forgot to add that you should also do a "ps ax | grep beam" and make sure
>> you don't have two servers running bound to two different ports.
>>
>> On Nov 7, 2012, at 1:56 PM, Stoo Goff <st...@gmail.com> wrote:
>>
>> > Also, why would the sequence numbers be so different?
>> >
>> > Logged in to the server I get update_seq of 1194. Viewing the same date
>> > remotely the udpate_seq is 102.
>> >
>> > On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:
>> >
>> >> Adding ?_all_docs=true gives me the same result as before. Do you mean
>> >> database/_all_docs?
>> >>
>> >>
>> >> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
>> >>
>> >>> and if u add ?_all_docs=true what docs would u get?
>> >>> (do check the syntax)
>> >>>
>> >>>
>> >>>
>> >>> On Wed, 7 Nov 2012 11:46:56 +0000
>> >>> Stoo Goff <st...@gmail.com> wrote:
>> >>>
>> >>>> Hi,
>> >>>>
>> >>>> I'm getting some strange differences when I view a database,
>> >>>> depending on whether I view the database remotely or locally.
>> >>>>
>> >>>> The server:
>> >>>>
>> >>>> Debian squeeze running Couchdb 0.11.0
>> >>>>
>> >>>> The dev box:
>> >>>>
>> >>>> Ubuntu 11.10 running Couchdb 1.0.1
>> >>>>
>> >>>> I initially created the database on the dev machine, then replicated
>> >>>> it to an empty database on the server. I have a web app running on
>> >>>> the server connecting over localhost and everything seemed to be
>> >>>> working fine - in fact as far as the web app is concerned it's all
>> >>>> running perfect.
>> >>>>
>> >>>> I changed the Couchdb settings so I could view the data remotely.
>> >>>> Initially, I used Futon to take a look and that showed me a
>> completely
>> >>>> different set of data. So I tried looking at the data using CURL.
>> That
>> >>>> showed me the same as Futon.
>> >>>>
>> >>>> CURL run on the server:
>> >>>>
>> >>>> curl -X GET http://localhost:5984/muninn
>> >>>
>> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
>> >>>>
>> >>>> CURL run on the dev machine:
>> >>>>
>> >>>> curl -X GET http://user:pass@odin:5984/muninn
>> >>>
>> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
>> >>>>
>> >>>> So, same disk size with completely different doc counts. With the
>> >>>> remote connection it looks like an historical view of the data, but
>> >>>> why would it do it?
>> >>>>
>> >>>> Any help or insight would be appreciated!
>> >>>>
>> >>>> Stoo
>> >>
>> >>
>>
>
>

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
I think you might have it...

16592 ?        S    267:59 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true --
-root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb -- -noshell
-noinput -sasl errlog_type error -couch_ini /etc/couchdb/default.ini
/etc/couchdb/local.ini /etc/couchdb/default.ini /etc/couchdb/local.ini -s
couch -pidfile /var/run/couchdb/couchdb.pid -heart
17665 ?        S    202:21 /usr/lib/erlang/erts-5.8/bin/beam -Bd -K true --
-root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb -- -noshell
-noinput -sasl errlog_type error -couch_ini /etc/couchdb/default.ini
/etc/couchdb/local.ini /etc/couchdb/default.ini /etc/couchdb/local.ini -s
couch -pidfile /var/run/couchdb/couchdb.pid -heart


On 7 November 2012 12:58, Paul J Davis <pa...@gmail.com> wrote:

> Forgot to add that you should also do a "ps ax | grep beam" and make sure
> you don't have two servers running bound to two different ports.
>
> On Nov 7, 2012, at 1:56 PM, Stoo Goff <st...@gmail.com> wrote:
>
> > Also, why would the sequence numbers be so different?
> >
> > Logged in to the server I get update_seq of 1194. Viewing the same date
> > remotely the udpate_seq is 102.
> >
> > On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:
> >
> >> Adding ?_all_docs=true gives me the same result as before. Do you mean
> >> database/_all_docs?
> >>
> >>
> >> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
> >>
> >>> and if u add ?_all_docs=true what docs would u get?
> >>> (do check the syntax)
> >>>
> >>>
> >>>
> >>> On Wed, 7 Nov 2012 11:46:56 +0000
> >>> Stoo Goff <st...@gmail.com> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I'm getting some strange differences when I view a database,
> >>>> depending on whether I view the database remotely or locally.
> >>>>
> >>>> The server:
> >>>>
> >>>> Debian squeeze running Couchdb 0.11.0
> >>>>
> >>>> The dev box:
> >>>>
> >>>> Ubuntu 11.10 running Couchdb 1.0.1
> >>>>
> >>>> I initially created the database on the dev machine, then replicated
> >>>> it to an empty database on the server. I have a web app running on
> >>>> the server connecting over localhost and everything seemed to be
> >>>> working fine - in fact as far as the web app is concerned it's all
> >>>> running perfect.
> >>>>
> >>>> I changed the Couchdb settings so I could view the data remotely.
> >>>> Initially, I used Futon to take a look and that showed me a completely
> >>>> different set of data. So I tried looking at the data using CURL. That
> >>>> showed me the same as Futon.
> >>>>
> >>>> CURL run on the server:
> >>>>
> >>>> curl -X GET http://localhost:5984/muninn
> >>>
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> >>>>
> >>>> CURL run on the dev machine:
> >>>>
> >>>> curl -X GET http://user:pass@odin:5984/muninn
> >>>
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> >>>>
> >>>> So, same disk size with completely different doc counts. With the
> >>>> remote connection it looks like an historical view of the data, but
> >>>> why would it do it?
> >>>>
> >>>> Any help or insight would be appreciated!
> >>>>
> >>>> Stoo
> >>
> >>
>

Re: Remote view looks different to localhost

Posted by Paul J Davis <pa...@gmail.com>.
Forgot to add that you should also do a "ps ax | grep beam" and make sure you don't have two servers running bound to two different ports. 

On Nov 7, 2012, at 1:56 PM, Stoo Goff <st...@gmail.com> wrote:

> Also, why would the sequence numbers be so different?
> 
> Logged in to the server I get update_seq of 1194. Viewing the same date
> remotely the udpate_seq is 102.
> 
> On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:
> 
>> Adding ?_all_docs=true gives me the same result as before. Do you mean
>> database/_all_docs?
>> 
>> 
>> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
>> 
>>> and if u add ?_all_docs=true what docs would u get?
>>> (do check the syntax)
>>> 
>>> 
>>> 
>>> On Wed, 7 Nov 2012 11:46:56 +0000
>>> Stoo Goff <st...@gmail.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I'm getting some strange differences when I view a database,
>>>> depending on whether I view the database remotely or locally.
>>>> 
>>>> The server:
>>>> 
>>>> Debian squeeze running Couchdb 0.11.0
>>>> 
>>>> The dev box:
>>>> 
>>>> Ubuntu 11.10 running Couchdb 1.0.1
>>>> 
>>>> I initially created the database on the dev machine, then replicated
>>>> it to an empty database on the server. I have a web app running on
>>>> the server connecting over localhost and everything seemed to be
>>>> working fine - in fact as far as the web app is concerned it's all
>>>> running perfect.
>>>> 
>>>> I changed the Couchdb settings so I could view the data remotely.
>>>> Initially, I used Futon to take a look and that showed me a completely
>>>> different set of data. So I tried looking at the data using CURL. That
>>>> showed me the same as Futon.
>>>> 
>>>> CURL run on the server:
>>>> 
>>>> curl -X GET http://localhost:5984/muninn
>>> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
>>>> 
>>>> CURL run on the dev machine:
>>>> 
>>>> curl -X GET http://user:pass@odin:5984/muninn
>>> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
>>>> 
>>>> So, same disk size with completely different doc counts. With the
>>>> remote connection it looks like an historical view of the data, but
>>>> why would it do it?
>>>> 
>>>> Any help or insight would be appreciated!
>>>> 
>>>> Stoo
>> 
>> 

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
Also, why would the sequence numbers be so different?

Logged in to the server I get update_seq of 1194. Viewing the same date
remotely the udpate_seq is 102.

On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:

> Adding ?_all_docs=true gives me the same result as before. Do you mean
> database/_all_docs?
>
>
> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
>
>> and if u add ?_all_docs=true what docs would u get?
>> (do check the syntax)
>>
>>
>>
>> On Wed, 7 Nov 2012 11:46:56 +0000
>> Stoo Goff <st...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > I'm getting some strange differences when I view a database,
>> > depending on whether I view the database remotely or locally.
>> >
>> > The server:
>> >
>> > Debian squeeze running Couchdb 0.11.0
>> >
>> > The dev box:
>> >
>> > Ubuntu 11.10 running Couchdb 1.0.1
>> >
>> > I initially created the database on the dev machine, then replicated
>> > it to an empty database on the server. I have a web app running on
>> > the server connecting over localhost and everything seemed to be
>> > working fine - in fact as far as the web app is concerned it's all
>> > running perfect.
>> >
>> > I changed the Couchdb settings so I could view the data remotely.
>> > Initially, I used Futon to take a look and that showed me a completely
>> > different set of data. So I tried looking at the data using CURL. That
>> > showed me the same as Futon.
>> >
>> > CURL run on the server:
>> >
>> > curl -X GET http://localhost:5984/muninn
>> >
>> >
>> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
>> >
>> > CURL run on the dev machine:
>> >
>> > curl -X GET http://user:pass@odin:5984/muninn
>> >
>> >
>> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
>> >
>> > So, same disk size with completely different doc counts. With the
>> > remote connection it looks like an historical view of the data, but
>> > why would it do it?
>> >
>> > Any help or insight would be appreciated!
>> >
>> > Stoo
>>
>
>

Re: Remote view looks different to localhost

Posted by Robert Newson <rn...@apache.org>.
That instance_start_time is different strongly implies you're looking at
two different systems.


On 7 November 2012 12:53, Stoo Goff <st...@gmail.com> wrote:

> Adding ?_all_docs=true gives me the same result as before. Do you mean
> database/_all_docs?
>
>
> On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:
>
> > and if u add ?_all_docs=true what docs would u get?
> > (do check the syntax)
> >
> >
> >
> > On Wed, 7 Nov 2012 11:46:56 +0000
> > Stoo Goff <st...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I'm getting some strange differences when I view a database,
> > > depending on whether I view the database remotely or locally.
> > >
> > > The server:
> > >
> > > Debian squeeze running Couchdb 0.11.0
> > >
> > > The dev box:
> > >
> > > Ubuntu 11.10 running Couchdb 1.0.1
> > >
> > > I initially created the database on the dev machine, then replicated
> > > it to an empty database on the server. I have a web app running on
> > > the server connecting over localhost and everything seemed to be
> > > working fine - in fact as far as the web app is concerned it's all
> > > running perfect.
> > >
> > > I changed the Couchdb settings so I could view the data remotely.
> > > Initially, I used Futon to take a look and that showed me a completely
> > > different set of data. So I tried looking at the data using CURL. That
> > > showed me the same as Futon.
> > >
> > > CURL run on the server:
> > >
> > > curl -X GET http://localhost:5984/muninn
> > >
> > >
> >
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> > >
> > > CURL run on the dev machine:
> > >
> > > curl -X GET http://user:pass@odin:5984/muninn
> > >
> > >
> >
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> > >
> > > So, same disk size with completely different doc counts. With the
> > > remote connection it looks like an historical view of the data, but
> > > why would it do it?
> > >
> > > Any help or insight would be appreciated!
> > >
> > > Stoo
> >
>

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
Adding ?_all_docs=true gives me the same result as before. Do you mean
database/_all_docs?


On 7 November 2012 12:30, svilen <az...@svilendobrev.com> wrote:

> and if u add ?_all_docs=true what docs would u get?
> (do check the syntax)
>
>
>
> On Wed, 7 Nov 2012 11:46:56 +0000
> Stoo Goff <st...@gmail.com> wrote:
>
> > Hi,
> >
> > I'm getting some strange differences when I view a database,
> > depending on whether I view the database remotely or locally.
> >
> > The server:
> >
> > Debian squeeze running Couchdb 0.11.0
> >
> > The dev box:
> >
> > Ubuntu 11.10 running Couchdb 1.0.1
> >
> > I initially created the database on the dev machine, then replicated
> > it to an empty database on the server. I have a web app running on
> > the server connecting over localhost and everything seemed to be
> > working fine - in fact as far as the web app is concerned it's all
> > running perfect.
> >
> > I changed the Couchdb settings so I could view the data remotely.
> > Initially, I used Futon to take a look and that showed me a completely
> > different set of data. So I tried looking at the data using CURL. That
> > showed me the same as Futon.
> >
> > CURL run on the server:
> >
> > curl -X GET http://localhost:5984/muninn
> >
> >
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> >
> > CURL run on the dev machine:
> >
> > curl -X GET http://user:pass@odin:5984/muninn
> >
> >
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> >
> > So, same disk size with completely different doc counts. With the
> > remote connection it looks like an historical view of the data, but
> > why would it do it?
> >
> > Any help or insight would be appreciated!
> >
> > Stoo
>

Re: Remote view looks different to localhost

Posted by Stoo Goff <st...@gmail.com>.
The replication was a single run, rather than continuous and it was before
I set up any user accounts. It's not really the replication that's the
issue, though. If I ssh into the server and run

curl -X GET http://localhost:5894/muninn

I get different results to when I run the following command from my dev
machine:

curl -X GET http://user:pass@odin:5894/muninn

Where user:pass would be the admin account and odin is the remote server.

On 7 November 2012 12:44, Dave Cottlehuber <dc...@jsonified.com> wrote:

> On 7 November 2012 13:30, svilen <az...@svilendobrev.com> wrote:
> > and if u add ?_all_docs=true what docs would u get?
> > (do check the syntax)
>
> Hi Stoo,
>
> I'd check that the DBs really are the same. Did you use filtered
> replication, or not replicate as an admin? Was is a continuous repl or
> not?
>
> Use `curl http://localhost:5984/<dbname>/_all_docs` and diff the
> output of both DBs. What's missing?
>
> A+
> Dave
>

Re: Remote view looks different to localhost

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 7 November 2012 13:30, svilen <az...@svilendobrev.com> wrote:
> and if u add ?_all_docs=true what docs would u get?
> (do check the syntax)

Hi Stoo,

I'd check that the DBs really are the same. Did you use filtered
replication, or not replicate as an admin? Was is a continuous repl or
not?

Use `curl http://localhost:5984/<dbname>/_all_docs` and diff the
output of both DBs. What's missing?

A+
Dave

Re: Remote view looks different to localhost

Posted by svilen <az...@svilendobrev.com>.
and if u add ?_all_docs=true what docs would u get? 
(do check the syntax)



On Wed, 7 Nov 2012 11:46:56 +0000
Stoo Goff <st...@gmail.com> wrote:

> Hi,
> 
> I'm getting some strange differences when I view a database,
> depending on whether I view the database remotely or locally.
> 
> The server:
> 
> Debian squeeze running Couchdb 0.11.0
> 
> The dev box:
> 
> Ubuntu 11.10 running Couchdb 1.0.1
> 
> I initially created the database on the dev machine, then replicated
> it to an empty database on the server. I have a web app running on
> the server connecting over localhost and everything seemed to be
> working fine - in fact as far as the web app is concerned it's all
> running perfect.
> 
> I changed the Couchdb settings so I could view the data remotely.
> Initially, I used Futon to take a look and that showed me a completely
> different set of data. So I tried looking at the data using CURL. That
> showed me the same as Futon.
> 
> CURL run on the server:
> 
> curl -X GET http://localhost:5984/muninn
> 
> {"db_name":"muninn","doc_count":25,"doc_del_count":33,"update_seq":1194,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1351793407368363","disk_format_version":5}
> 
> CURL run on the dev machine:
> 
> curl -X GET http://user:pass@odin:5984/muninn
> 
> {"db_name":"muninn","doc_count":9,"doc_del_count":34,"update_seq":102,"purge_seq":0,"compact_running":false,"disk_size":16826462,"instance_start_time":"1352219217053672","disk_format_version":5}
> 
> So, same disk size with completely different doc counts. With the
> remote connection it looks like an historical view of the data, but
> why would it do it?
> 
> Any help or insight would be appreciated!
> 
> Stoo