You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Mark Hammond <sk...@gmail.com> on 2009/02/23 08:00:35 UTC
help getting svn version running on Windows
Hi all,
I'm playing with a project which uses couchdb and I'm trying to get
the project working on Windows.
I found the Wiki at
http://wiki.apache.org/couchdb/Installing_on_Windows, and while the
binaries worked well, the application was causing the following error:
"""
[info] [<0.75.0>] HTTP Error (code 500): {query_parse_error,"Bad URL
query key:include_docs"}
"""
A bit of time with google led me to believe that I needed a newer
version of couchdb for this to work. After pulling from SVN and
updating and recompiling the couchdb-0.8.1 directory, the
'couch_start.bat' batch file fails with:
"""
1> {"init terminating in
do_boot",{{badmatch,{error,{function_clause,[{couch_util,separate_cmd_args,[46,[]]},{couch_util,abs_pathname,1},{couch_config,load_ini_file,1},{couch_config,'-init/1-lc$^0/1-0-',1},{couch_config,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}}},[{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 ()
"""
I suspect the problem is the args we are passing to the start function
but I'm not experienced enough to decycpher it; for reference,
couch_start.bat consists of the single line:
"""
..\bin\werl.exe -smp auto -sasl errlog_type error -eval
"application:load(inets)" -eval "application:load(crypto)" -eval
"application:load(couch)" -eval "crypto:start()" -eval "inets:start()"
-eval "couch_server:start(\"../usr/couch.ini\"), receive done -> done end."
"""
If I try and start it via the Wiki instructions (ie, a simple
'couch_server:start().', I get:
"""
1> couch_server:start().
Apache CouchDB 0.0.0 (LogLevel=info) is starting.
** exception error: no function clause matching
filename:join({error,bad_name},"lib")
in function couch_server_sup:start_server/1
"""
Ultimately, all I really need is the initial 'include_docs' error
resolved; is updating couchdb the correct way to do that? If so, can
anyone offer any clues to what my problem is?
Thanks,
Mark
Re: help getting svn version running on Windows
Posted by Chris Anderson <jc...@apache.org>.
On Tue, Feb 24, 2009 at 4:24 AM, Mark Hammond <sk...@gmail.com> wrote:
> [{erlang,'++',[undefined,"."]},
> {couch_util,parse_term,1},
> {couch_httpd,make_arity_1_fun,1},
> {couch_httpd,handle_request,3},
> {mochiweb_http,headers,4},
> {proc_lib,init_p_do_apply,3}]}},
>
My guess is that you are missing "httpd", "authentication_handler"
from your ini. I'm guessing that based on reading the code that calls
make_arity_1_fun...
Looks like you are close!
--
Chris Anderson
http://jchris.mfdz.com
Re: help getting svn version running on Windows
Posted by Mark Hammond <sk...@gmail.com>.
On 23/02/2009 6:00 PM, I wrote:
> Hi all,
> I'm playing with a project which uses couchdb and I'm trying to get the
> project working on Windows.
I've had a little more luck today:
> 1> {"init terminating in
> do_boot",{{badmatch,{error,{function_clause,[{couch_util,separate_cmd_args,[46,[]]}, {couch_util,abs_pathname,1}, ...
The problem here is that the couch_server:start() function now takes a
*list* of INI files. Passing "../filename..." caused couch to see a
list of ints; chr(46)=='.'...
After realizing the .INI file layout has changed significantly since
0.8, I've now managed to get couch insisting I should relax (yay!), but
as soon as I issue *any* curl request - eg:
% curl -vX HEAD http://127.0.0.1:5984/
I get the following error (with curl reporting an empty reply):
"""
Erlang (BEAM) emulator version 5.6.5 [smp:4] [async-threads:0]
Eshell V5.6.5 (abort with ^G)
1> Apache CouchDB 0.0.0 (LogLevel=debug) is starting.
Configuration Settings ["../usr/couch.ini"]:
[couchdb] database_dir="c:/program files (x86)/erl5.6.5/usr/couch_data"
[couchdb] util_driver_dir="c:/program files
(x86)/erl5.6.5/lib/couchdb-0.8.1/priv/lib"
[daemons] httpd="{couch_httpd, start_link, []}"
[daemons] query_servers="{couch_query_servers, start_link, []}"
[daemons] view_manager="{couch_view, start_link, []}"
[httpd] bind_address="127.0.0.1"
[httpd] port="5984"
[httpd_db_handlers] _list="{couch_httpd_show, handle_view_list_req}"
[httpd_db_handlers] _show="{couch_httpd_show, handle_doc_show_req}"
[httpd_db_handlers] _temp_view="{couch_httpd_view, handle_temp_view_req}"
[httpd_db_handlers] _view="{couch_httpd_view, handle_view_req}"
[httpd_global_handlers] /="{couch_httpd_misc_handlers,
handle_welcome_req, <<\"Welcome\">>}"
[httpd_global_handlers] _active_tasks="{couch_httpd_misc_handlers,
handle_task_status_req}"
[httpd_global_handlers] _all_dbs="{couch_httpd_misc_handlers,
handle_all_dbs_req}"
[httpd_global_handlers] _config="{couch_httpd_misc_handlers,
handle_config_req}"
[httpd_global_handlers] _replicate="{couch_httpd_misc_handlers,
handle_replicate_req}"
[httpd_global_handlers] _restart="{couch_httpd_misc_handlers,
handle_restart_req}"
[httpd_global_handlers] _stats="{couch_httpd_stats_handlers,
handle_stats_req}"
[httpd_global_handlers] _utils="{couch_httpd_misc_handlers,
handle_utils_dir_req, \"c:/program files
(x86)/erl5.6.5/lib/couchdb-0.8.1/share/www\"}"
[httpd_global_handlers] _uuids="{couch_httpd_misc_handlers,
handle_uuids_req}"
[httpd_global_handlers] favicon.ico="{couch_httpd_misc_handlers,
handle_favicon_req, \"c:/program files
(x86)/erl5.6.5/lib/couchdb-0.8.1/share/www\"}"
[log] file="c:/program files (x86)/erl5.6.5/usr/couch_data/couch.log"
[log] level="debug"
[query_servers] javascript="couch_js \"c:/program files
(x86)/erl5.6.5/lib/couchdb-0.8.1/share/server/main.js\""
Apache CouchDB has started. Time to relax.
[error] [<0.60.0>] {error_report,<0.22.0>,
{<0.60.0>,crash_report,
[[{pid,<0.60.0>},
{registered_name,[]},
{error_info,
{error,badarg,
[{erlang,'++',[undefined,"."]},
{couch_util,parse_term,1},
{couch_httpd,make_arity_1_fun,1},
{couch_httpd,handle_request,3},
{mochiweb_http,headers,4},
{proc_lib,init_p_do_apply,3}]}},
{initial_call,{mochiweb_socket_server,acceptor_loop,['Argument__1']}},
{ancestors,
[couch_httpd,couch_secondary_services,couch_server_sup,<0.1.0>]},
{messages,[]},
{links,[<0.59.0>,#Port<0.1715>]},
{dictionary,[]},
{trap_exit,false},
{status,running},
{heap_size,987},
{stack_size,23},
{reductions,625}],
[]]}}
[error] [<0.59.0>] {error_report,<0.22.0>,
{<0.59.0>,std_error,
{mochiweb_socket_server,235,{child_error,badarg}}}}
=ERROR REPORT==== 24-Feb-2009::23:15:18 ===
{mochiweb_socket_server,235,{child_error,badarg}}
"""
Again, everything after the 'relax' message only occurs when I connect
via curl. I've not bothered with the contents of my INI file - the
debug logs above reflect the actual contents. All listed directories
exist and are writable (even the ones that need not be :)
I'd appreciate any advice to help get this going (and promise to hang
around long enough to assist with another Windows binary build... ;)
And thanks to the various people who have helped me out on #couchdb over
the last day or so...
Thanks,
Mark