We are running Couchbase 4.1 on Windows 2012 R2. When we try to enable audit log via the admin gui nothing happens. Checking the check box and hitting save just returns the page with the checkbox still unchecked.
We decided to try the same process using couchbase-cli to see if an error is thrown. Here are two attempts:
C:\Program Files\Couchbase\Server\bin>couchbase-cli setting-audit -c dcxxxa.corp.dom:8091 -u Administrator -p XXXXX --audit-enabled 1 --audit-log-path "c:/Program Files/Couchbase/Server/var/lib/couchbase/logs"
ERROR: unable to set audit settings (500) Internal Server Error
[“Unexpected server error, request logged.”]
C:\Program Files\Couchbase\Server\bin>couchbase-cli setting-audit -c dcxxxa.corp.dom:8091 -u Administrator -p XXXXX --audit-enabled 1 --audit-log-path "c:\Program Files\Couchbase\Server\var\lib\couchbase\logs"
ERROR: unable to set audit settings (500) Internal Server Error
[“Unexpected server error, request logged.”]
The corresponding error in error.log is:
ns_server:error,2016-03-22T15:27:58.547-04:00,ns_1@dccbp01a.corp.dom:ns_config<0.143.0>:ns_config:handle_call:905]Failed to update config: {throw,{config_key_not_found,audit}}
Stacktrace:
[{ns_config,’-update_key/2-fun-0-’,4,[{file,“src/ns_config.erl”},{line,336}]},
{ns_config,handle_call,3,[{file,“src/ns_config.erl”},{line,893}]},
{gen_server,handle_msg,5,[{file,“gen_server.erl”},{line,585}]},
{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,239}]}]
[ns_server:error,2016-03-22T15:27:58.547-04:00,ns_1@dcxxxa.corp.dom:<0.18600.497>:menelaus_web:loop:184]Server error during processing: [“web request failed”,
{path,"/settings/audit"},
{method,‘POST’},
{type,error},
{what,
{badmatch,
{throw,
{config_key_not_found,audit},
[{ns_config,’-update_key/2-fun-0-’,4,
[{file,“src/ns_config.erl”},{line,336}]},
{ns_config,handle_call,3,
[{file,“src/ns_config.erl”},{line,893}]},
{gen_server,handle_msg,5,
[{file,“gen_server.erl”},{line,585}]},
{proc_lib,init_p_do_apply,3,
[{file,“proc_lib.erl”},{line,239}]}]}}},
{trace,
[{ns_config,set_sub,2,
[{file,“src/ns_config.erl”},{line,402}]},
{menelaus_web,
’-handle_settings_audit_post/1-fun-0-’,2,
[{file,“src/menelaus_web.erl”},
{line,3924}]},
{request_throttler,do_request,3,
[{file,“src/request_throttler.erl”},
{line,59}]},
{menelaus_web,loop,2,
[{file,“src/menelaus_web.erl”},
{line,162}]},
{mochiweb_http,headers,5,
[{file,
“c:/Jenkins/workspace/sherlock-windows/couchbase/couchdb/src/mochiweb/mochiweb_http.erl”},
{line,94}]},
{proc_lib,init_p_do_apply,3,
[{file,“proc_lib.erl”},{line,239}]}]}]
Does any one have ideas on what is wrong?