You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Zachary Zolton <za...@gmail.com> on 2009/10/19 18:40:04 UTC

Enable Erlang for views?

Guys,

I noticed that the test suite creates a design document with an Erlang
view, however I can't execute it from curl.

$ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
{"error":"unknown_query_language","reason":"erlang"}

Are we supposed to be able to map/reduce our docs in Erlang?


Cheers,

Zach


PS. I'm using CouchDB 0.10 FWIW

PPS. Yes, I found this thread http://is.gd/4r6oG but erlview doesn't
look like it's been touched in quite a while...

Re: Enable Erlang for views?

Posted by Paul Davis <pa...@gmail.com>.
On Mon, Oct 19, 2009 at 4:22 PM, Robert Dionne
<di...@dionne-associates.com> wrote:
> aren't those views in the test suite temporary?
>

Not sure I follow. I meant check that the test exists to make sure
that erlang views are in the running CouchDB node.

Paul Davis

Re: Enable Erlang for views?

Posted by Robert Dionne <di...@dionne-associates.com>.
aren't those views in the test suite temporary?





On Oct 19, 2009, at 4:19 PM, Paul Davis wrote:

> Zachary,
>
> Did you restart CouchDB after making that change? Also, can you double
> check that there's an erlang_views.js in your Futon's Test suite? I'm
> pretty sure that's in 0.10.0.
>
> Paul Davis
>
> On Mon, Oct 19, 2009 at 4:12 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Hm... Not so fast, I put the following in my local.ini:
>>
>> [native_query_servers]
>> erlang = {couch_native_process, start_link, []}
>>
>> But now when I try it, I'm still getting the error:
>>
>> $ curl localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>> {"error":"unknown_query_language","reason":"erlang"}
>>
>> Anything else I should need to configure?
>>
>> On Mon, Oct 19, 2009 at 2:59 PM, Zachary Zolton
>> <za...@gmail.com> wrote:
>>> Understood—my couch doesn't accept design docs from outside sources,
>>> so this should be "safe enough" for my uses... Thanks!
>>>
>>> On Mon, Oct 19, 2009 at 12:37 PM, Paul Davis
>>> <pa...@gmail.com> wrote:
>>>> On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
>>>> <za...@gmail.com> wrote:
>>>>> Guys,
>>>>>
>>>>> I noticed that the test suite creates a design document with an  
>>>>> Erlang
>>>>> view, however I can't execute it from curl.
>>>>>
>>>>> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>>>>> {"error":"unknown_query_language","reason":"erlang"}
>>>>>
>>>>> Are we supposed to be able to map/reduce our docs in Erlang?
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Zach
>>>>>
>>>>>
>>>>> PS. I'm using CouchDB 0.10 FWIW
>>>>>
>>>>> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview  
>>>>> doesn't
>>>>> look like it's been touched in quite a while...
>>>>>
>>>>
>>>> Erlang views are disabled by default because they allow arbitrary  
>>>> code
>>>> execution in the server process. To enable them add a section to  
>>>> your
>>>> local.ini like:
>>>>
>>>> [native_query_servers]
>>>> erlang = {couch_native_process, start_link, []}
>>>>
>>>> HTH,
>>>> Paul Davis
>>>>
>>>
>>


Re: Enable Erlang for views?

Posted by Zachary Zolton <za...@gmail.com>.
Ah, my launchd setup is apparently borked, cuz stop/start'ing the
server didn't work, but rebooting my system did. Drat!

Well anyways, it does seem to be working!

Thanks again,
Zach

On Mon, Oct 19, 2009 at 3:19 PM, Paul Davis <pa...@gmail.com> wrote:
> Zachary,
>
> Did you restart CouchDB after making that change? Also, can you double
> check that there's an erlang_views.js in your Futon's Test suite? I'm
> pretty sure that's in 0.10.0.
>
> Paul Davis
>
> On Mon, Oct 19, 2009 at 4:12 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Hm... Not so fast, I put the following in my local.ini:
>>
>> [native_query_servers]
>> erlang = {couch_native_process, start_link, []}
>>
>> But now when I try it, I'm still getting the error:
>>
>> $ curl localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>> {"error":"unknown_query_language","reason":"erlang"}
>>
>> Anything else I should need to configure?
>>
>> On Mon, Oct 19, 2009 at 2:59 PM, Zachary Zolton
>> <za...@gmail.com> wrote:
>>> Understood—my couch doesn't accept design docs from outside sources,
>>> so this should be "safe enough" for my uses... Thanks!
>>>
>>> On Mon, Oct 19, 2009 at 12:37 PM, Paul Davis
>>> <pa...@gmail.com> wrote:
>>>> On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
>>>> <za...@gmail.com> wrote:
>>>>> Guys,
>>>>>
>>>>> I noticed that the test suite creates a design document with an Erlang
>>>>> view, however I can't execute it from curl.
>>>>>
>>>>> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>>>>> {"error":"unknown_query_language","reason":"erlang"}
>>>>>
>>>>> Are we supposed to be able to map/reduce our docs in Erlang?
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Zach
>>>>>
>>>>>
>>>>> PS. I'm using CouchDB 0.10 FWIW
>>>>>
>>>>> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview doesn't
>>>>> look like it's been touched in quite a while...
>>>>>
>>>>
>>>> Erlang views are disabled by default because they allow arbitrary code
>>>> execution in the server process. To enable them add a section to your
>>>> local.ini like:
>>>>
>>>> [native_query_servers]
>>>> erlang = {couch_native_process, start_link, []}
>>>>
>>>> HTH,
>>>> Paul Davis
>>>>
>>>
>>
>

Re: Enable Erlang for views?

Posted by Paul Davis <pa...@gmail.com>.
Zachary,

Did you restart CouchDB after making that change? Also, can you double
check that there's an erlang_views.js in your Futon's Test suite? I'm
pretty sure that's in 0.10.0.

Paul Davis

On Mon, Oct 19, 2009 at 4:12 PM, Zachary Zolton
<za...@gmail.com> wrote:
> Hm... Not so fast, I put the following in my local.ini:
>
> [native_query_servers]
> erlang = {couch_native_process, start_link, []}
>
> But now when I try it, I'm still getting the error:
>
> $ curl localhost:5984/test_suite_db/_design/erlview/_view/simple_view
> {"error":"unknown_query_language","reason":"erlang"}
>
> Anything else I should need to configure?
>
> On Mon, Oct 19, 2009 at 2:59 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Understood—my couch doesn't accept design docs from outside sources,
>> so this should be "safe enough" for my uses... Thanks!
>>
>> On Mon, Oct 19, 2009 at 12:37 PM, Paul Davis
>> <pa...@gmail.com> wrote:
>>> On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
>>> <za...@gmail.com> wrote:
>>>> Guys,
>>>>
>>>> I noticed that the test suite creates a design document with an Erlang
>>>> view, however I can't execute it from curl.
>>>>
>>>> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>>>> {"error":"unknown_query_language","reason":"erlang"}
>>>>
>>>> Are we supposed to be able to map/reduce our docs in Erlang?
>>>>
>>>>
>>>> Cheers,
>>>>
>>>> Zach
>>>>
>>>>
>>>> PS. I'm using CouchDB 0.10 FWIW
>>>>
>>>> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview doesn't
>>>> look like it's been touched in quite a while...
>>>>
>>>
>>> Erlang views are disabled by default because they allow arbitrary code
>>> execution in the server process. To enable them add a section to your
>>> local.ini like:
>>>
>>> [native_query_servers]
>>> erlang = {couch_native_process, start_link, []}
>>>
>>> HTH,
>>> Paul Davis
>>>
>>
>

Re: Enable Erlang for views?

Posted by Jan Lehnardt <ja...@apache.org>.
On 19 Oct 2009, at 22:12, Zachary Zolton wrote:

> Hm... Not so fast, I put the following in my local.ini:
>
> [native_query_servers]
> erlang = {couch_native_process, start_link, []}

Do you have a newline after this last line?

Cheers
Jan
--

>
> But now when I try it, I'm still getting the error:
>
> $ curl localhost:5984/test_suite_db/_design/erlview/_view/simple_view
> {"error":"unknown_query_language","reason":"erlang"}
>
> Anything else I should need to configure?
>
> On Mon, Oct 19, 2009 at 2:59 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Understood—my couch doesn't accept design docs from outside sources,
>> so this should be "safe enough" for my uses... Thanks!
>>
>> On Mon, Oct 19, 2009 at 12:37 PM, Paul Davis
>> <pa...@gmail.com> wrote:
>>> On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
>>> <za...@gmail.com> wrote:
>>>> Guys,
>>>>
>>>> I noticed that the test suite creates a design document with an  
>>>> Erlang
>>>> view, however I can't execute it from curl.
>>>>
>>>> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>>>> {"error":"unknown_query_language","reason":"erlang"}
>>>>
>>>> Are we supposed to be able to map/reduce our docs in Erlang?
>>>>
>>>>
>>>> Cheers,
>>>>
>>>> Zach
>>>>
>>>>
>>>> PS. I'm using CouchDB 0.10 FWIW
>>>>
>>>> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview  
>>>> doesn't
>>>> look like it's been touched in quite a while...
>>>>
>>>
>>> Erlang views are disabled by default because they allow arbitrary  
>>> code
>>> execution in the server process. To enable them add a section to  
>>> your
>>> local.ini like:
>>>
>>> [native_query_servers]
>>> erlang = {couch_native_process, start_link, []}
>>>
>>> HTH,
>>> Paul Davis
>>>
>>
>


Re: Enable Erlang for views?

Posted by Zachary Zolton <za...@gmail.com>.
Hm... Not so fast, I put the following in my local.ini:

[native_query_servers]
erlang = {couch_native_process, start_link, []}

But now when I try it, I'm still getting the error:

$ curl localhost:5984/test_suite_db/_design/erlview/_view/simple_view
{"error":"unknown_query_language","reason":"erlang"}

Anything else I should need to configure?

On Mon, Oct 19, 2009 at 2:59 PM, Zachary Zolton
<za...@gmail.com> wrote:
> Understood—my couch doesn't accept design docs from outside sources,
> so this should be "safe enough" for my uses... Thanks!
>
> On Mon, Oct 19, 2009 at 12:37 PM, Paul Davis
> <pa...@gmail.com> wrote:
>> On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
>> <za...@gmail.com> wrote:
>>> Guys,
>>>
>>> I noticed that the test suite creates a design document with an Erlang
>>> view, however I can't execute it from curl.
>>>
>>> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>>> {"error":"unknown_query_language","reason":"erlang"}
>>>
>>> Are we supposed to be able to map/reduce our docs in Erlang?
>>>
>>>
>>> Cheers,
>>>
>>> Zach
>>>
>>>
>>> PS. I'm using CouchDB 0.10 FWIW
>>>
>>> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview doesn't
>>> look like it's been touched in quite a while...
>>>
>>
>> Erlang views are disabled by default because they allow arbitrary code
>> execution in the server process. To enable them add a section to your
>> local.ini like:
>>
>> [native_query_servers]
>> erlang = {couch_native_process, start_link, []}
>>
>> HTH,
>> Paul Davis
>>
>

Re: Enable Erlang for views?

Posted by Zachary Zolton <za...@gmail.com>.
Understood—my couch doesn't accept design docs from outside sources,
so this should be "safe enough" for my uses... Thanks!

On Mon, Oct 19, 2009 at 12:37 PM, Paul Davis
<pa...@gmail.com> wrote:
> On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
> <za...@gmail.com> wrote:
>> Guys,
>>
>> I noticed that the test suite creates a design document with an Erlang
>> view, however I can't execute it from curl.
>>
>> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
>> {"error":"unknown_query_language","reason":"erlang"}
>>
>> Are we supposed to be able to map/reduce our docs in Erlang?
>>
>>
>> Cheers,
>>
>> Zach
>>
>>
>> PS. I'm using CouchDB 0.10 FWIW
>>
>> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview doesn't
>> look like it's been touched in quite a while...
>>
>
> Erlang views are disabled by default because they allow arbitrary code
> execution in the server process. To enable them add a section to your
> local.ini like:
>
> [native_query_servers]
> erlang = {couch_native_process, start_link, []}
>
> HTH,
> Paul Davis
>

Re: Enable Erlang for views?

Posted by Paul Davis <pa...@gmail.com>.
On Mon, Oct 19, 2009 at 12:40 PM, Zachary Zolton
<za...@gmail.com> wrote:
> Guys,
>
> I noticed that the test suite creates a design document with an Erlang
> view, however I can't execute it from curl.
>
> $ curl http://localhost:5984/test_suite_db/_design/erlview/_view/simple_view
> {"error":"unknown_query_language","reason":"erlang"}
>
> Are we supposed to be able to map/reduce our docs in Erlang?
>
>
> Cheers,
>
> Zach
>
>
> PS. I'm using CouchDB 0.10 FWIW
>
> PPS. Yes, I found this thread http://is.gd/4r6oG but erlview doesn't
> look like it's been touched in quite a while...
>

Erlang views are disabled by default because they allow arbitrary code
execution in the server process. To enable them add a section to your
local.ini like:

[native_query_servers]
erlang = {couch_native_process, start_link, []}

HTH,
Paul Davis