Re: Adding spatial views with REST API

137 views
Skip to first unread message

Volker Mische

unread,
Sep 14, 2012, 11:37:19 AM9/14/12
to couc...@googlegroups.com, Patrick Heneise
Hi Patrick,

sorry that I haven't seen your mail earlier.

From build 1554 on, the function takes two parameters, the meta
information an the document. See [1] for more. Perhaps that's the problem.

[1]
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-server-rn_2-0-0f.html


Cheers,
Volker

On 09/11/2012 11:47 PM, Patrick Heneise wrote:
> I'm just testing the design document REST API and Couchbase (1554 osx
> build) is crashing completely after adding a spatial view with the API.
> That's the PUT for the design view:
>
> { method: 'PUT',
> headers:
> { 'content-type': 'application/json',
> accept: 'application/json' },
> uri: 'http://127.0.0.1:8092/default/_design/dev_geoView',
> body: '{"views":{},"spatial":{"points":"function(doc) {if
> (doc.location) { emit({type: \\"Point\\", coordinates: [doc.location[0],
> doc.location[1]]}, doc.test);}}"}}' }
>
> I get results in the admin console but as soon as I try to call the
> view, the server crashes and won't start again. Below you'll find the logs.
>
> Any idea how to solve this?
>
> Thanks
>
> Launching '/Applications/Couchbase
> Server.app/Contents/Resources/start-server.sh'
> DYLD_LIBRARY_PATH is /Applications/Couchbase
> Server.app/Contents/Resources/couchbase-core:/Applications/Couchbase
> Server.app/Contents/Resources/couchbase-core/lib
> Eshell V5.8.5 (abort with ^G)
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,sasl_safe_sup}
> started: [{pid,<0.46.0>},
> {name,alarm_handler},
> {mfargs,{alarm_handler,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,sasl_safe_sup}
> started: [{pid,<0.47.0>},
> {name,overload},
> {mfargs,{overload,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,sasl_sup}
> started: [{pid,<0.45.0>},
> {name,sasl_safe_sup},
> {mfargs,
> {supervisor,start_link,
> [{local,sasl_safe_sup},sasl,safe]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,sasl_sup}
> started: [{pid,<0.48.0>},
> {name,release_handler},
> {mfargs,{release_handler,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> application: sasl
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,os_mon_sup}
> started: [{pid,<0.54.0>},
> {name,disksup},
> {mfargs,{disksup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,os_mon_sup}
> started: [{pid,<0.55.0>},
> {name,memsup},
> {mfargs,{memsup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> supervisor: {local,os_mon_sup}
> started: [{pid,<0.59.0>},
> {name,cpu_sup},
> {mfargs,{cpu_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:20 ===
> application: os_mon
> started_at: nonode@nohost
>
> =INFO REPORT==== 11-Sep-2012::21:53:21 ===
> alarm_handler: {set,{{disk_almost_full,"24468471"},[]}}
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,kernel_safe_sup}
> started: [{pid,<0.61.0>},
> {name,timer_server},
> {mfargs,{timer,start_link,[]}},
> {restart_type,permanent},
> {shutdown,1000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,kernel_safe_sup}
> started: [{pid,<0.67.0>},
> {name,disk_log_sup},
> {mfargs,{disk_log_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,1000},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,kernel_safe_sup}
> started: [{pid,<0.68.0>},
> {name,disk_log_server},
> {mfargs,{disk_log_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.66.0>},
> {name,'sink-disk_default'},
> {mfargs,
> {ale_disk_sink,start_link,
> ['sink-disk_default',
> "/Users/me/Library/Application
> Support/Couchbase/var/lib/couchbase/logs/info",
> [{size,{10485760,20}}]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.71.0>},
> {name,'sink-disk_error'},
> {mfargs,
> {ale_disk_sink,start_link,
> ['sink-disk_error',
> "/Users/me/Library/Application
> Support/Couchbase/var/lib/couchbase/logs/error",
> [{size,{10485760,20}}]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.74.0>},
> {name,'sink-disk_views'},
> {mfargs,
> {ale_disk_sink,start_link,
> ['sink-disk_views',
> "/Users/me/Library/Application
> Support/Couchbase/var/lib/couchbase/logs/views",
> [{size,{10485760,20}}]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.77.0>},
> {name,'sink-disk_mapreduce_errors'},
> {mfargs,
> {ale_disk_sink,start_link,
> ['sink-disk_mapreduce_errors',
> "/Users/me/Library/Application
> Support/Couchbase/var/lib/couchbase/logs/mapreduce_errors",
> [{size,{10485760,20}}]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.80.0>},
> {name,'sink-disk_couchdb'},
> {mfargs,
> {ale_disk_sink,start_link,
> ['sink-disk_couchdb',
> "/Users/me/Library/Application
> Support/Couchbase/var/lib/couchbase/logs/couchdb",
> [{size,{10485760,20}}]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.83.0>},
> {name,'sink-disk_debug'},
> {mfargs,
> {ale_disk_sink,start_link,
> ['sink-disk_debug',
> "/Users/me/Library/Application
> Support/Couchbase/var/lib/couchbase/logs/debug",
> [{size,{10485760,20}}]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.86.0>},
> {name,'sink-ns_log'},
> {mfargs,{ns_log_sink,start_link,['sink-ns_log']}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ale_dynamic_sup}
> started: [{pid,<0.161.0>},
> {name,'sink-stderr'},
> {mfargs,{ale_stderr_sink,start_link,['sink-stderr']}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: couch_view_parser
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,crypto_sup}
> started: [{pid,<0.193.0>},
> {name,crypto_server},
> {mfargs,{crypto_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: crypto
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: public_key
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,inets_sup}
> started: [{pid,<0.199.0>},
> {name,ftp_sup},
> {mfargs,{ftp_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,httpc_profile_sup}
> started: [{pid,<0.202.0>},
> {name,httpc_manager},
> {mfargs,
> {httpc_manager,start_link,
> [default,only_session_cookies,inets]}},
> {restart_type,permanent},
> {shutdown,4000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,httpc_sup}
> started: [{pid,<0.201.0>},
> {name,httpc_profile_sup},
> {mfargs,
> {httpc_profile_sup,start_link,
> [[{httpc,{default,only_session_cookies}}]]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,httpc_sup}
> started: [{pid,<0.203.0>},
> {name,httpc_handler_sup},
> {mfargs,{httpc_handler_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,inets_sup}
> started: [{pid,<0.200.0>},
> {name,httpc_sup},
> {mfargs,
> {httpc_sup,start_link,
> [[{httpc,{default,only_session_cookies}}]]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,inets_sup}
> started: [{pid,<0.204.0>},
> {name,httpd_sup},
> {mfargs,{httpd_sup,start_link,[[]]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,inets_sup}
> started: [{pid,<0.205.0>},
> {name,tftp_sup},
> {mfargs,{tftp_sup,start_link,[[]]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: inets
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: oauth
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ssl_sup}
> started: [{pid,<0.211.0>},
> {name,ssl_broker_sup},
> {mfargs,{ssl_broker_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ssl_sup}
> started: [{pid,<0.212.0>},
> {name,ssl_manager},
> {mfargs,{ssl_manager,start_link,[[]]}},
> {restart_type,permanent},
> {shutdown,4000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ssl_sup}
> started: [{pid,<0.213.0>},
> {name,ssl_connection},
> {mfargs,{ssl_connection_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,4000},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: ssl
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,ssl_sup}
> started: [{pid,<0.220.0>},
> {name,ssl_server},
> {mfargs,{ssl_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,lhttpc_sup}
> started: [{pid,<0.218.0>},
> {name,lhttpc_manager},
> {mfargs,
> {lhttpc_manager,start_link,
> [[{name,lhttpc_manager}]]}},
> {restart_type,permanent},
> {shutdown,10000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: lhttpc
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: mochiweb
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: couch_set_view
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: couch_index_merger
> started_at: nonode@nohost
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> application: mapreduce
> started_at: nonode@nohost
> Apache CouchDB 1.2.0a-7fed5be-git (LogLevel=info) is starting.
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_server_sup}
> started: [{pid,<0.228.0>},
> {name,couch_config},
> {mfargs,
> {couch_server_sup,couch_config_start_link_wrapper,
> [["/Applications/Couchbase
> Server.app/Contents/Resources/couchbase-core/etc/couchdb/default.ini",
> "/Applications/Couchbase
> Server.app/Contents/Resources/couchbase-core/etc/couchdb/default.d/capi.ini",
> "/Applications/Couchbase
> Server.app/Contents/Resources/couchbase-core/etc/couchdb/default.d/geocouch.ini",
> "/Applications/Couchbase
> Server.app/Contents/Resources/couchbase-core/etc/couchdb/local.ini",
>
> "/Users/me/Library/Preferences/couchbase-server.ini",
> "/Users/me/Library/Application
> Support/Couchbase/etc/couch-platform.ini",
> "/Users/me/Library/Application
> Support/Couchbase/etc/couch-custom.ini"],
> <0.228.0>]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.231.0>},
> {name,collation_driver},
> {mfargs,{couch_drv,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.232.0>},
> {name,couch_task_events},
> {mfargs,
>
> {gen_event,start_link,[{local,couch_task_events}]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.233.0>},
> {name,couch_task_status},
> {mfargs,{couch_task_status,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.234.0>},
> {name,couch_file_write_guard},
> {mfargs,{couch_file_write_guard,sup_start_link,[]}},
> {restart_type,permanent},
> {shutdown,10000},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.235.0>},
> {name,couch_server},
> {mfargs,{couch_server,sup_start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.236.0>},
> {name,couch_db_update_event},
> {mfargs,
> {gen_event,start_link,[{local,couch_db_update}]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.237.0>},
> {name,couch_replication_event},
> {mfargs,
>
> {gen_event,start_link,[{local,couch_replication}]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.238.0>},
> {name,couch_replication_supervisor},
> {mfargs,{couch_rep_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.239.0>},
> {name,couch_log},
> {mfargs,{couch_log,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.242.0>},
> {name,couch_main_index_barrier},
> {mfargs,
> {couch_index_barrier,start_link,
> [couch_main_index_barrier,
> "max_parallel_indexers"]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_primary_services}
> started: [{pid,<0.243.0>},
> {name,couch_replica_index_barrier},
> {mfargs,
> {couch_index_barrier,start_link,
> [couch_replica_index_barrier,
> "max_parallel_replica_indexers"]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_server_sup}
> started: [{pid,<0.230.0>},
> {name,couch_primary_services},
> {mfargs,{couch_primary_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:21 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.245.0>},
> {name,couch_db_update_notifier_sup},
> {mfargs,{couch_db_update_notifier_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.246.0>},
> {name,auth_cache},
> {mfargs,{couch_auth_cache,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.256.0>},
> {name,set_view_manager},
> {mfargs,{couch_set_view,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.259.0>},
> {name,spatial_manager},
> {mfargs,{couch_spatial,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.260.0>},
> {name,index_merger_pool},
> {mfargs,
> {lhttpc_manager,start_link,
> [[{connection_timeout,90000},
> {pool_size,10000},
>
> {name,couch_index_merger_connection_pool}]]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.261.0>},
> {name,query_servers},
> {mfargs,{couch_query_servers,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.263.0>},
> {name,couch_set_view_ddoc_cache},
> {mfargs,{couch_set_view_ddoc_cache,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.265.0>},
> {name,view_manager},
> {mfargs,{couch_view,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.267.0>},
> {name,httpd},
> {mfargs,{couch_httpd,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
> Apache CouchDB has started. Time to relax.
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_secondary_services}
> started: [{pid,<0.284.0>},
> {name,uuids},
> {mfargs,{couch_uuids,start,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,couch_server_sup}
> started: [{pid,<0.244.0>},
> {name,couch_secondary_services},
> {mfargs,{couch_secondary_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,infinity},
> {child_type,supervisor}]
> [info] [<0.187.0>] Apache CouchDB has started on http://0.0.0.0:8092/
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,cb_couch_sup}
> started: [{pid,<0.229.0>},
> {name,couch_app},
> {mfargs,
> {couch_app,start,
> [fake,
> ["/opt/couchbase/etc/couchdb/default.ini",
> "/opt/couchbase/etc/couchdb/local.ini"]]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,supervisor}]
>
> =PROGRESS REPORT==== 11-Sep-2012::21:53:22 ===
> supervisor: {local,ns_server_cluster_sup}
> started: [{pid,<0.187.0>},
> {name,cb_couch_sup},
> {mfargs,{cb_couch_sup,start_link,[]}},
> {restart_type,permanent},
> {shutdown,5000},
> {child_type,supervisor}]
> [error] [<0.296.0>] {error_report,<0.9.0>,
> {<0.296.0>,crash_report,
> [[{initial_call,{net_kernel,init,['Argument__1']}},
> {pid,<0.296.0>},
> {registered_name,[]},
> {error_info,
> {exit,
> {error,badarg},
> [{gen_server,init_it,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,[net_sup,kernel_sup,<0.10.0>]},
> {messages,[]},
> {links,[#Port<0.5701>,<0.293.0>]},
> {dictionary,[{longnames,true}]},
> {trap_exit,true},
> {status,running},
> {heap_size,610},
> {stack_size,24},
> {reductions,616}],
> []]}}
> [error] [<0.293.0>] {error_report,<0.9.0>,
> {<0.293.0>,supervisor_report,
> [{supervisor,{local,net_sup}},
> {errorContext,start_error},
> {reason,{'EXIT',nodistribution}},
> {offender,
> [{pid,undefined},
> {name,net_kernel},
> {mfargs,
> {net_kernel,start_link,
> [['ns...@127.0.0.1',longnames]]}},
> {restart_type,permanent},
> {shutdown,2000},
> {child_type,worker}]}]}}
> [error] [<0.290.0>] {error_report,<0.63.0>,
> {<0.290.0>,crash_report,
> [[{initial_call,{dist_manager,init,['Argument__1']}},
> {pid,<0.290.0>},
> {registered_name,[]},
> {error_info,
> {exit,
> {function_clause,
> [{dist_manager,decode_status,
> [{error,
> {shutdown,
> {child,undefined,net_sup_dynamic,
> {erl_distribution,start_link,
> [['ns...@127.0.0.1',longnames]]},
> permanent,1000,supervisor,
> [erl_distribution]}}}]},
> {dist_manager,bringup,1},
> {dist_manager,init,1},
> {gen_server,init_it,6},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,init_it,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,[ns_server_cluster_sup,<0.64.0>]},
> {messages,[]},
> {links,[<0.186.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,running},
> {heap_size,2584},
> {stack_size,24},
> {reductions,3177}],
> []]}}
> [error] [<0.186.0>] {error_report,<0.63.0>,
> {<0.186.0>,supervisor_report,
> [{supervisor,{local,ns_server_cluster_sup}},
> {errorContext,start_error},
> {reason,
> {function_clause,
> [{dist_manager,decode_status,
> [{error,
> {shutdown,
> {child,undefined,net_sup_dynamic,
> {erl_distribution,start_link,
> [['ns...@127.0.0.1',longnames]]},
> permanent,1000,supervisor,
> [erl_distribution]}}}]},
> {dist_manager,bringup,1},
> {dist_manager,init,1},
> {gen_server,init_it,6},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,undefined},
> {name,dist_manager},
> {mfargs,{dist_manager,start_link,[]}},
> {restart_type,permanent},
> {shutdown,1000},
> {child_type,worker}]}]}}
> {"init terminating in
> do_boot",{{badmatch,{error,{shutdown,{ns_server,start,[normal,[]]}}}},[{init,start_it,1},{init,start_em,1}]}}
> Terminated with status 1

Patrick Heneise

unread,
Sep 15, 2012, 5:46:00 AM9/15/12
to Volker Mische, couc...@googlegroups.com
Hi Volker,

thanks for the reply. The document doesn't really cover the API changes. Why do I need to supply the meta data when creating a view? Shouldn't that be automatic? The server crashes only when working with spatial views, the regular views are created and deleted just fine, without meta information.

It's for the node.js library 'baseview', https://github.com/PatrickHeneise/baseview.

Thanks a lot,

Patrick

Volker Mische

unread,
Sep 15, 2012, 3:31:56 PM9/15/12
to Patrick Heneise, couc...@googlegroups.com
Hi Patrick,

I'm sorry about the comment about the "meta", it was invalid. I had in
mind that the parameters are function(meta, doc) and not (doc, meta).
That would have made a difference, but they *are* (doc, meta), so when
you don't need meta, just using function(doc) will be fine.

Back to your problem. Can you try again using a different port? After
looking into the Python SDK code, here's how you should insert design
documents (Couchbasers, please correct me if I'm wrong):

1. Request <your-server>/pools/default
2. Get the value from "couchApiBase". This is the host/port you should use
3. The URL to PUT the design document to is the value from
"couchApiBase" and plus <bucket-name>/_design/<design_doc_name>

Please let me know if it works now or if you still see crashes.

Cheers,
Volker

Matt Ingenthron

unread,
Sep 15, 2012, 4:25:09 PM9/15/12
to couc...@googlegroups.com
On 9/15/12 12:31 PM, "Volker Mische" <volker...@gmail.com> wrote:

here's how you should insert design
documents (Couchbasers, please correct me if I'm wrong):

1. Request <your-server>/pools/default
2. Get the value from "couchApiBase". This is the host/port you should use
3. The URL to PUT the design document to is the value from
"couchApiBase" and plus <bucket-name>/_design/<design_doc_name>

Please let me know if it works now or if you still see crashes.


Technically speaking, a client should... 

  1. start with the bootstrap URI: http://<your-server>:8091/pools
  2. Then search for default in the response, chase that URI…  (pools is there for future flexibility on resource pools in a cluster)
  3. Then search for buckets in the response, chase that URI…
  4. Then search for the bucket the user specified, chase that URI…
  5. And then look for the couchApiBase URI for that bucket
Requests under this couchApiBase aren't hypertext driven, and instead uses URL construction, as it's derived from CouchDB.  The docs here cover making queries and working with design docs (sections 10.7 and 10.8):

Generally using an already built SDK is preferred, but I know Patrick is building one (nice!) definitely let us know if you need help.

By the way, the reason the admin API is hypertext driven is flexibility.  Imagine we change things in 2.1 server or allow for moving a bucket from one cluster to another (or one pool to another).  Or, imagine that we decide serving stats up would be more efficient if we send your request to another host in the cluster.  If you're hypertext driven, all still works.  If you have to construct URLs, there's a very tight coupling between the client code and server implementation.

All of that said, I'm well aware that URL construction is the popular (and arguably simple) way to do things.  It just ties the hands of the REST interface provider.

Thanks,

Matt

Patrick Heneise

unread,
Sep 19, 2012, 10:20:14 AM9/19/12
to couc...@googlegroups.com
Thanks Matt.

I'll try these things out in the next couple of days and let you know!

Pat
Reply all
Reply to author
Forward
0 new messages