# Query using lang-javascript hangs under Ubuntu 12.04

**URL:** <https://discuss.elastic.co/t/query-using-lang-javascript-hangs-under-ubuntu-12-04/11579>\
**Category:** Elasticsearch\
**Created:** [April 15, 2013, 3:21am UTC](https://discuss.elastic.co/t/query-using-lang-javascript-hangs-under-ubuntu-12-04/11579 "2013-04-15T03:21:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![troy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/troy/32/2547_2.png) [@troy](https://discuss.elastic.co/u/troy)\
**Post date:** [April 15, 2013, 3:21am UTC](https://discuss.elastic.co/t/query-using-lang-javascript-hangs-under-ubuntu-12-04/11579/1 "2013-04-15T03:21:17Z")

</div>

I installed lang-javascript and I see this in my log:

[2013-04-14 19:15:19,426][INFO][plugins] [Moondark]  
loaded [lang-javascript], sites []

When I post the following to the \_search api elasticsearch does not respond  
and the http request times out:

{  
"query":{  
"filtered":{  
"query":{  
"match\_all":{}  
},  
"filter":{  
"missing":{  
"field":"deletedAt",  
"existence":true,  
"null\_value":true  
}  
}  
}  
},  
"sort":[{  
"\_script":{  
"script":"doc['usernamesAssigned'].values.sort().join()",  
"type":"string",  
"lang":"js",  
"order":"asc"  
}  
}],  
"size":100  
}

This same query works fine on my development machine (mac os x). Is there a  
dependency Ubuntu doesn't have or something?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![troy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/troy/32/2547_2.png) [@troy](https://discuss.elastic.co/u/troy)\
**Post date:** [April 15, 2013, 4:15am UTC](https://discuss.elastic.co/t/query-using-lang-javascript-hangs-under-ubuntu-12-04/11579/2 "2013-04-15T04:15:53Z")

</div>

I figured it out. I needed log4j installed:

sudo apt-get install liblog4j1.2-java

On Sunday, April 14, 2013 8:21:17 PM UTC-7, [tr...@scriptedmotion.com](mailto:tr...@scriptedmotion.com) wrote:

> I installed lang-javascript and I see this in my log:
> 
> [2013-04-14 19:15:19,426][INFO][plugins] [Moondark]  
> loaded [lang-javascript], sites
> 
> When I post the following to the \_search api elasticsearch does not  
> respond and the http request times out:
> 
> {  
> "query":{  
> "filtered":{  
> "query":{  
> "match\_all":{}  
> },  
> "filter":{  
> "missing":{  
> "field":"deletedAt",  
> "existence":true,  
> "null\_value":true  
> }  
> }  
> }  
> },  
> "sort":[{  
> "\_script":{  
> "script":"doc['usernamesAssigned'].values.sort().join()",  
> "type":"string",  
> "lang":"js",  
> "order":"asc"  
> }  
> }],  
> "size":100  
> }
> 
> This same query works fine on my development machine (mac os x). Is there  
> a dependency Ubuntu doesn't have or something?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:41am UTC](https://discuss.elastic.co/t/query-using-lang-javascript-hangs-under-ubuntu-12-04/11579/3 "2017-07-06T02:41:12Z")

</div>


