You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Jan Lehnardt <ja...@apache.org> on 2013/07/14 11:13:43 UTC
couchdb -n vs couchdb -n -a couch.ini
Heya,
I’m running into an odd issue:
couchdb -n starts just fine
couchdb -n -a couch.ini (where couch.ini is an empty file) fails:
Apache CouchDB 1.3.0 (LogLevel=info) is starting.
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
Why would that be? :)
(note that the ini files you see in the trace are hardcoded on build-time and are not actually used here.)
Best
Jan
--
Re: couchdb -n vs couchdb -n -a couch.ini
Posted by Alexander Shorin <kx...@gmail.com>.
> CouchDB can’t start without any ini files (which it should, but doesn’t)
this would be problematically because of:
- paths: database, view index and util driver dirs;
- query servers commands;
- explicit http resource handlers and internal services;
- system database names and some other parameters which could be moved
to code as default fallback values;
So it's possible to minimize set of required options in config file,
but it's not possible to have it empty. I think, there are not a lot
software of the same level as CouchDB which is able to run without any
config files.
Just a thoughts...
Ok, http handlers and internal services definition could be also moved
into the source and instead of their explicitly definition in config
files it would be possible to explicitly turn them off or override by
something.
Query servers...if only we had something embed like lua server or
dsl-based, this problem also goes away.
Paths are not easy. Probably there should be possible to pass them via
cli arguments or env variables to keep them portable and less
system-depended.
> So, both the description of -n (that it resets *all* ini files, including the system defaults) is incorrect as well as CouchDB not starting without default.ini (at least)
> should be a bug
But still, I think it's not a bug, since you're explicitly trying to
override default config chain (/etc/couchdb/default.ini ;
/etc/couchdb/default.d/*.ini ; /etc/couchdb/local.ini ;
/etc/couchdb/local.d/*.ini ) with your own. If your config files
doesn't have required options - CouchDB fails to start. Keep configs
well and it will be run without any problems.
--
,,,^..^,,,
On Sun, Jul 14, 2013 at 5:18 PM, Alexander Shorin <kx...@gmail.com> wrote:
> To see what happening:
>
> $ couchdb -n -a /tmp/couch.ini -c
> /tmp/couch.ini
>
> --
> ,,,^..^,,,
>
>
> On Sun, Jul 14, 2013 at 1:39 PM, Jan Lehnardt <ja...@apache.org> wrote:
>>
>> On Jul 14, 2013, at 11:30 , Jan Lehnardt <ja...@apache.org> wrote:
>>
>>>
>>> On Jul 14, 2013, at 11:23 , Jan Lehnardt <ja...@apache.org> wrote:
>>>
>>>>
>>>> On Jul 14, 2013, at 11:13 , Jan Lehnardt <ja...@apache.org> wrote:
>>>>
>>>>> Heya,
>>>>>
>>>>> I’m running into an odd issue:
>>>>>
>>>>> couchdb -n starts just fine
>>>>> couchdb -n -a couch.ini (where couch.ini is an empty file) fails:
>>>>>
>>>>> Apache CouchDB 1.3.0 (LogLevel=info) is starting.
>>>>> {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>>>>>
>>>>> Why would that be? :)
>>>>
>>>> It is because CouchDB expects at least two ini files. Thanks all :)
>>>
>>> Hm, no, that’s not it.
>>>
>>> Stay tuned for more live debugging. (no seriously, any help would be greatly appreciated :)
>>
>> it seems like couchdb -n still keeps the system default ini files and couchdb -n /tmp/couchdb.ini uses only this empty one and CouchDB can’t start without any ini files (which it should, but doesn’t)
>>
>> So, both the description of -n (that it resets *all* ini files, including the system defaults) is incorrect as well as CouchDB not starting without default.ini (at least) should be a bug
>>
>> Jan
>> --
>>
>>
>>>
>>>
>>>>
>>>>
>>>>>
>>>>> (note that the ini files you see in the trace are hardcoded on build-time and are not actually used here.)
>>>>>
>>>>> Best
>>>>> Jan
>>>>> --
>>>>>
>>>>
>>>
>>
Re: couchdb -n vs couchdb -n -a couch.ini
Posted by Alexander Shorin <kx...@gmail.com>.
To see what happening:
$ couchdb -n -a /tmp/couch.ini -c
/tmp/couch.ini
--
,,,^..^,,,
On Sun, Jul 14, 2013 at 1:39 PM, Jan Lehnardt <ja...@apache.org> wrote:
>
> On Jul 14, 2013, at 11:30 , Jan Lehnardt <ja...@apache.org> wrote:
>
>>
>> On Jul 14, 2013, at 11:23 , Jan Lehnardt <ja...@apache.org> wrote:
>>
>>>
>>> On Jul 14, 2013, at 11:13 , Jan Lehnardt <ja...@apache.org> wrote:
>>>
>>>> Heya,
>>>>
>>>> I’m running into an odd issue:
>>>>
>>>> couchdb -n starts just fine
>>>> couchdb -n -a couch.ini (where couch.ini is an empty file) fails:
>>>>
>>>> Apache CouchDB 1.3.0 (LogLevel=info) is starting.
>>>> {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>>>>
>>>> Why would that be? :)
>>>
>>> It is because CouchDB expects at least two ini files. Thanks all :)
>>
>> Hm, no, that’s not it.
>>
>> Stay tuned for more live debugging. (no seriously, any help would be greatly appreciated :)
>
> it seems like couchdb -n still keeps the system default ini files and couchdb -n /tmp/couchdb.ini uses only this empty one and CouchDB can’t start without any ini files (which it should, but doesn’t)
>
> So, both the description of -n (that it resets *all* ini files, including the system defaults) is incorrect as well as CouchDB not starting without default.ini (at least) should be a bug
>
> Jan
> --
>
>
>>
>>
>>>
>>>
>>>>
>>>> (note that the ini files you see in the trace are hardcoded on build-time and are not actually used here.)
>>>>
>>>> Best
>>>> Jan
>>>> --
>>>>
>>>
>>
>
Re: couchdb -n vs couchdb -n -a couch.ini
Posted by Jan Lehnardt <ja...@apache.org>.
On Jul 14, 2013, at 11:30 , Jan Lehnardt <ja...@apache.org> wrote:
>
> On Jul 14, 2013, at 11:23 , Jan Lehnardt <ja...@apache.org> wrote:
>
>>
>> On Jul 14, 2013, at 11:13 , Jan Lehnardt <ja...@apache.org> wrote:
>>
>>> Heya,
>>>
>>> I’m running into an odd issue:
>>>
>>> couchdb -n starts just fine
>>> couchdb -n -a couch.ini (where couch.ini is an empty file) fails:
>>>
>>> Apache CouchDB 1.3.0 (LogLevel=info) is starting.
>>> {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>>>
>>> Why would that be? :)
>>
>> It is because CouchDB expects at least two ini files. Thanks all :)
>
> Hm, no, that’s not it.
>
> Stay tuned for more live debugging. (no seriously, any help would be greatly appreciated :)
it seems like couchdb -n still keeps the system default ini files and couchdb -n /tmp/couchdb.ini uses only this empty one and CouchDB can’t start without any ini files (which it should, but doesn’t)
So, both the description of -n (that it resets *all* ini files, including the system defaults) is incorrect as well as CouchDB not starting without default.ini (at least) should be a bug
Jan
--
>
>
>>
>>
>>>
>>> (note that the ini files you see in the trace are hardcoded on build-time and are not actually used here.)
>>>
>>> Best
>>> Jan
>>> --
>>>
>>
>
Re: couchdb -n vs couchdb -n -a couch.ini
Posted by Jan Lehnardt <ja...@apache.org>.
On Jul 14, 2013, at 11:23 , Jan Lehnardt <ja...@apache.org> wrote:
>
> On Jul 14, 2013, at 11:13 , Jan Lehnardt <ja...@apache.org> wrote:
>
>> Heya,
>>
>> I’m running into an odd issue:
>>
>> couchdb -n starts just fine
>> couchdb -n -a couch.ini (where couch.ini is an empty file) fails:
>>
>> Apache CouchDB 1.3.0 (LogLevel=info) is starting.
>> {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>>
>> Why would that be? :)
>
> It is because CouchDB expects at least two ini files. Thanks all :)
Hm, no, that’s not it.
Stay tuned for more live debugging. (no seriously, any help would be greatly appreciated :)
>
>
>>
>> (note that the ini files you see in the trace are hardcoded on build-time and are not actually used here.)
>>
>> Best
>> Jan
>> --
>>
>
Re: couchdb -n vs couchdb -n -a couch.ini
Posted by Jan Lehnardt <ja...@apache.org>.
On Jul 14, 2013, at 11:13 , Jan Lehnardt <ja...@apache.org> wrote:
> Heya,
>
> I’m running into an odd issue:
>
> couchdb -n starts just fine
> couchdb -n -a couch.ini (where couch.ini is an empty file) fails:
>
> Apache CouchDB 1.3.0 (LogLevel=info) is starting.
> {"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1,[{file,"couch_server_sup.erl"},{line,98}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,274}]}]}}}}}},[{couch,start,0,[{file,"couch.erl"},{line,18}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
>
> Why would that be? :)
It is because CouchDB expects at least two ini files. Thanks all :)
>
> (note that the ini files you see in the trace are hardcoded on build-time and are not actually used here.)
>
> Best
> Jan
> --
>