Creating new View on brand new bucket fails


#1

I’m on Mac OSX Yosetmite, Couchbase 3.0 .
When I’m creating a new view for an bucket (which is empty at this point). I see following errors

Lost connection to server at 127.0.0.1:8091. Repeating in 2 seconds.

Repeating failed XHR request.

and when i look at following log files i see more errors.

views.log
[views:debug,2015-01-25T16:09:52.079,ns_1@127.0.0.1:capi_set_view_manager-tsky-events:capi_set_view_manager:maybe_define_group:381]
Calling couch_set_view:define_group(mapreduce_view, <<“app-events”>>, <<"_design/dev_events">>, [{set_view_params,64,[],[],false}])

where as app-events : is a bucket on which I’m trying to create a view.

error.log
[ns_server:error,2015-01-25T16:09:22.033,ns_1@127.0.0.1::menelaus_web:loop:170]Server error during processing: [“web request failed”,
{path,
"/pools/default/buckets/app-events/ddocs"},
{type,exit},
{what,
{{bad_return_value,
{error,
{error,
{dcp_socket_connect_failed,timeout}}}},
{gen_server,call,
[‘capi_set_view_manager-app-events’,
{foreach_doc,
#Fun},
infinity]}}},
{trace,
[{gen_server,call,3,
[{file,“gen_server.erl”},{line,188}]},
{capi_ddoc_replication_srv,
full_live_ddocs,2,
[{file,
“src/capi_ddoc_replication_srv.erl”},
{line,62}]},
{capi_ddoc_replication_srv,
sorted_full_live_ddocs,1,
[{file,
“src/capi_ddoc_replication_srv.erl”},
{line,76}]},
{menelaus_web_buckets,
do_handle_ddocs_list,3,
[{file,“src/menelaus_web_buckets.erl”},
{line,1253}]},
{request_throttler,do_request,3,
[{file,“src/request_throttler.erl”},
{line,59}]},
{menelaus_web,loop,2,
[{file,“src/menelaus_web.erl”},
{line,149}]},
{mochiweb_http,headers,5,
[{file,
"/Users/buildbot/buildbot_slave/mac-x64-300-builder/build/build/couchdb/src/mochiweb/mochiweb_http.erl"},
{line,94}]},
{proc_lib,init_p_do_apply,3,
[{file,“proc_lib.erl”},{line,239}]}]}]

I also tried uninstalling whole couchbase and reinstalling and creating brand new bucket and view - same issue.


#2

That does sound like an odd problem. Could you provide the view definition that you’re using? Also, are you using 3.0.0? If possible, could you repeat that test on 3.0.2 which has had the benefit of a number of maintenance fixes?

FWIW, I’ve tried a similar thing on my Mac running Yosemite with Couchbase Server 3.0.2 and it seems to work as expected.


#3

Hi Perry,

here is the view code

function (doc, meta)
{
if(doc._type && doc._type == ‘event_owner’ && doc.events && doc.events.length>0)
{
emit(doc.events[0]);
}
}

I tried exact same with our dev on ubuntu and works without any issue. So its not an issue with view. More and more there is something goofy about my config/setup of Couchbase server on mac. Everything else seems to working fine. Just that when I create view it goes in a endless loop and keeps spinning on that view page.


#4

Ahh that’s good to know, thank you.

Yes, sounds like something is wonky on your Mac. One thing to check would be the permissions on the directories under Couchbase Server. By chance did you change the default directory for data or index storage when you set this node up in the first place?


#5

Hi Perry,

No I did NOT change default directory that comes with setup . it is /Users/[myusername]/Library/Application Support/Couchbase/var/lib/couchdb for Data and Index both.

I have not tinkered with any permissions. Because if the permission was the issue even my regular bucket access via Java SDK would fail isn’t it ?.

Anything specific around permission I should go look?


#6

Hi Perry,

As per your recommendation I tried uninstalling 3.0 and reinstalled 3.0.2 and tried creating view. same issue.

What else can we try/ What else can I provider (log files?anything else) ?. I really need this thing to work

-Thanks
Rajesh