# No living connection error

**URL:** <https://discuss.elastic.co/t/no-living-connection-error/25728>\
**Category:** Elasticsearch\
**Created:** [July 16, 2015, 2:44pm UTC](https://discuss.elastic.co/t/no-living-connection-error/25728 "2015-07-16T14:44:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbbush](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jbbush](https://discuss.elastic.co/u/jbbush)\
**Post date:** [July 16, 2015, 2:44pm UTC](https://discuss.elastic.co/t/no-living-connection-error/25728/1 "2015-07-16T14:44:37Z")

</div>

I'm trying to write a js client and having issue connecting to my index. I can query the index from curl so I know that is up. When I run the following code I get the no living connection error.

 var client = jQuery.es.Client({ host: '24.51.59.167:9200', log: 'trace' }); client.ping( { requestTimeout: 30000, // undocumented params are appended to the query string hello: "elasticsearch" }, function (error) { if (error) { alert('elasticsearch cluster is down!' + error); } else { alert('All is well'); } });

---

<div class="post-metadata">

**Author:** ![jbbush](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jbbush](https://discuss.elastic.co/u/jbbush)\
**Post date:** [July 16, 2015, 2:49pm UTC](https://discuss.elastic.co/t/no-living-connection-error/25728/2 "2015-07-16T14:49:31Z")

</div>

Here's my code

\< script src="scripts/jquerymin.js"\>  
\< script src="scripts/elasticsearch.jquery.min.js"\>  
\< script src="scripts/elasticsearch.jquery.js"\>

\< script type = "text/javascript"\>  
var client = jQuery.es.Client({  
host: '24.51.59.167:9200',  
log: 'trace'  
});

client.ping(  
{  
requestTimeout: 30000,  
// undocumented params are appended to the query string  
hello: "elasticsearch"  
}, function (error) {  
if (error) {  
alert('elasticsearch cluster is down!' + error);  
} else {  
alert('All is well');  
}  
});  
\< /script\>

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [July 18, 2015, 8:59am UTC](https://discuss.elastic.co/t/no-living-connection-error/25728/3 "2015-07-18T08:59:30Z")

</div>

just out of guessing, the curl execution and the javascript execution on the same box? if not, it might be firewall issue. check also the cross domain in firebug if you have one. also exposing es over the public internet is not recommended though, you might not want to expose es in the javascript.

hth

---

<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, 12:00am UTC](https://discuss.elastic.co/t/no-living-connection-error/25728/4 "2017-07-06T00:00:36Z")

</div>


