# Issues Deploying to Beanstalk

**URL:** <https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076>\
**Category:** Elasticsearch\
**Created:** [March 10, 2011, 4:44pm UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076 "2011-03-10T16:44:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Cook\_2](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@James\_Cook\_2](https://discuss.elastic.co/u/James_Cook_2)\
**Post date:** [March 10, 2011, 4:44pm UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076/1 "2011-03-10T16:44:02Z")

</div>

I have a web application with an embedded Elasticsearch (0.15.0) server. I  
create a war file and successfully deploy the application to both Tomcat  
6.0.29 and Jetty 7 locally. I can also deploy the same web application to  
Amazon EC2 using AMI's from [Scalr.net](http://Scalr.net) and Tomcat.

However, when I deploy the same WAR file to Amazon's Beanstalk (using  
Tomcat), the app freezes as ES is starting up.

Here is a gist [https://gist.github.com/864207](https://gist.github.com/864207) showing a thread dump which  
is stalled.

And here is the server information which might be pertinent:

> uname -a && cat /etc/\*release  
> Linux ip-10-124-245-247 2.6.34.7-56.40.amzn1.x86\_64 #1 SMP Fri Oct 22  
> 18:48:49 UTC 2010 x86\_64 x86\_64 x86\_64 GNU/Linux  
> Amazon Linux AMI release 2010.11.1 (beta)

> cat /proc/sys/fs/file-max  
> 764412

Any thoughts?  
-- jim

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 11, 2011, 1:07pm UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076/2 "2011-03-11T13:07:49Z")

</div>

Its stuck in the code segment in Node startup where it tries to obtain a native file system lock for its own data directory location (you can start more than one node on a machine, so they need their own data workspace).

Have you configured the data location for this instance? Maybe it tries to write it to the default one, which if embedded in tomcat will probably be within tomcat somewhere, and maybe its not allowed? Same applies to work dir by the day.  
On Thursday, March 10, 2011 at 6:44 PM, James Cook wrote:

> I have a web application with an embedded Elasticsearch (0.15.0) server. I create a war file and successfully deploy the application to both Tomcat 6.0.29 and Jetty 7 locally. I can also deploy the same web application to Amazon EC2 using AMI's from [Scalr.net](http://Scalr.net) and Tomcat.
> 
> However, when I deploy the same WAR file to Amazon's Beanstalk (using Tomcat), the app freezes as ES is starting up.
> 
> Here is a gist showing a thread dump which is stalled.
> 
> And here is the server information which might be pertinent:
> 
> > uname -a && cat /etc/\*release  
> > Linux ip-10-124-245-247 2.6.34.7-56.40.amzn1.x86\_64 #1 SMP Fri Oct 22 18:48:49 UTC 2010 x86\_64 x86\_64 x86\_64 GNU/Linux  
> > Amazon Linux AMI release 2010.11.1 (beta)
> 
> > cat /proc/sys/fs/file-max  
> > 764412
> 
> Any thoughts?  
> -- jim

---

<div class="post-metadata">

**Author:** ![James\_Cook\_2](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@James\_Cook\_2](https://discuss.elastic.co/u/James_Cook_2)\
**Post date:** [March 11, 2011, 9:16pm UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076/3 "2011-03-11T21:16:18Z")

</div>

Thanks Shay. That got me a bit farther.

I have also discovered that the Amazon AMI for beanstalk uses the following  
JDK:

java version "1.6.0\_20"  
OpenJDK Runtime Environment (IcedTea6 1.9.1)  
(amazon-44.1.9.1.18.amzn1-x86\_64)  
OpenJDK 64-Bit Server VM (build 19.0-b06, mixed mode)

Are there any known issues with OpenJDK?

-- jim

On Fri, Mar 11, 2011 at 8:07 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Its stuck in the code segment in Node startup where it tries to obtain a  
> native file system lock for its own data directory location (you can start  
> more than one node on a machine, so they need their own data workspace).
> 
> Have you configured the data location for this instance? Maybe it tries to  
> write it to the default one, which if embedded in tomcat will probably be  
> within tomcat somewhere, and maybe its not allowed? Same applies to work  
> dir by the day.
> 
> On Thursday, March 10, 2011 at 6:44 PM, James Cook wrote:
> 
> I have a web application with an embedded Elasticsearch (0.15.0) server. I  
> create a war file and successfully deploy the application to both Tomcat  
> 6.0.29 and Jetty 7 locally. I can also deploy the same web application to  
> Amazon EC2 using AMI's from [Scalr.net](http://Scalr.net) and Tomcat.
> 
> However, when I deploy the same WAR file to Amazon's Beanstalk (using  
> Tomcat), the app freezes as ES is starting up.
> 
> Here is a gist [https://gist.github.com/864207](https://gist.github.com/864207) showing a thread dump  
> which is stalled.
> 
> And here is the server information which might be pertinent:
> 
> > uname -a && cat /etc/\*release  
> > Linux ip-10-124-245-247 2.6.34.7-56.40.amzn1.x86\_64 #1 SMP Fri Oct 22  
> > 18:48:49 UTC 2010 x86\_64 x86\_64 x86\_64 GNU/Linux  
> > Amazon Linux AMI release 2010.11.1 (beta)
> 
> > cat /proc/sys/fs/file-max  
> > 764412
> 
> Any thoughts?  
> -- jim

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 12, 2011, 7:06am UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076/4 "2011-03-12T07:06:28Z")

</div>

Not that I am aware of. Where is it stuck now?  
On Friday, March 11, 2011 at 11:16 PM, James Cook wrote:

> Thanks Shay. That got me a bit farther.
> 
> I have also discovered that the Amazon AMI for beanstalk uses the following JDK:
> 
> java version "1.6.0\_20"  
> OpenJDK Runtime Environment (IcedTea6 1.9.1) (amazon-44.1.9.1.18.amzn1-x86\_64)  
> OpenJDK 64-Bit Server VM (build 19.0-b06, mixed mode)
> 
> Are there any known issues with OpenJDK?
> 
> -- jim  
> On Fri, Mar 11, 2011 at 8:07 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:
> 
> > Its stuck in the code segment in Node startup where it tries to obtain a native file system lock for its own data directory location (you can start more than one node on a machine, so they need their own data workspace).
> > 
> > Have you configured the data location for this instance? Maybe it tries to write it to the default one, which if embedded in tomcat will probably be within tomcat somewhere, and maybe its not allowed? Same applies to work dir by the day.  
> > On Thursday, March 10, 2011 at 6:44 PM, James Cook wrote:
> > 
> > > I have a web application with an embedded Elasticsearch (0.15.0) server. I create a war file and successfully deploy the application to both Tomcat 6.0.29 and Jetty 7 locally. I can also deploy the same web application to Amazon EC2 using AMI's from [Scalr.net](http://Scalr.net) and Tomcat.
> > > 
> > > However, when I deploy the same WAR file to Amazon's Beanstalk (using Tomcat), the app freezes as ES is starting up.
> > > 
> > > Here is a gist showing a thread dump which is stalled.
> > > 
> > > And here is the server information which might be pertinent:
> > > 
> > > > uname -a && cat /etc/\*release  
> > > > Linux ip-10-124-245-247 2.6.34.7-56.40.amzn1.x86\_64 #1 SMP Fri Oct 22 18:48:49 UTC 2010 x86\_64 x86\_64 x86\_64 GNU/Linux  
> > > > Amazon Linux AMI release 2010.11.1 (beta)
> > > 
> > > > cat /proc/sys/fs/file-max  
> > > > 764412
> > > 
> > > Any thoughts?  
> > > -- jim

---

<div class="post-metadata">

**Author:** ![James\_Cook](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@James\_Cook](https://discuss.elastic.co/u/James_Cook)\
**Post date:** [March 22, 2011, 9:48pm UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076/5 "2011-03-22T21:48:55Z")

</div>

Sorry for the late reply. We have it deployed successfully now, but we  
haven't tried to use the EC2 discovery mechanism yet. Just need a single  
server at the moment.

-- jim

On Sat, Mar 12, 2011 at 2:06 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Not that I am aware of. Where is it stuck now?
> 
> On Friday, March 11, 2011 at 11:16 PM, James Cook wrote:
> 
> Thanks Shay. That got me a bit farther.
> 
> I have also discovered that the Amazon AMI for beanstalk uses the following  
> JDK:
> 
> java version "1.6.0\_20"  
> OpenJDK Runtime Environment (IcedTea6 1.9.1)  
> (amazon-44.1.9.1.18.amzn1-x86\_64)  
> OpenJDK 64-Bit Server VM (build 19.0-b06, mixed mode)
> 
> Are there any known issues with OpenJDK?
> 
> -- jim
> 
> On Fri, Mar 11, 2011 at 8:07 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:
> 
> > Its stuck in the code segment in Node startup where it tries to obtain a  
> > native file system lock for its own data directory location (you can start  
> > more than one node on a machine, so they need their own data workspace).
> > 
> > Have you configured the data location for this instance? Maybe it tries to  
> > write it to the default one, which if embedded in tomcat will probably be  
> > within tomcat somewhere, and maybe its not allowed? Same applies to work  
> > dir by the day.
> > 
> > On Thursday, March 10, 2011 at 6:44 PM, James Cook wrote:
> > 
> > I have a web application with an embedded Elasticsearch (0.15.0) server. I  
> > create a war file and successfully deploy the application to both Tomcat  
> > 6.0.29 and Jetty 7 locally. I can also deploy the same web application to  
> > Amazon EC2 using AMI's from [Scalr.net](http://Scalr.net) and Tomcat.
> > 
> > However, when I deploy the same WAR file to Amazon's Beanstalk (using  
> > Tomcat), the app freezes as ES is starting up.
> > 
> > Here is a gist [https://gist.github.com/864207](https://gist.github.com/864207) showing a thread dump  
> > which is stalled.
> > 
> > And here is the server information which might be pertinent:
> > 
> > > uname -a && cat /etc/\*release  
> > > Linux ip-10-124-245-247 2.6.34.7-56.40.amzn1.x86\_64 #1 SMP Fri Oct 22  
> > > 18:48:49 UTC 2010 x86\_64 x86\_64 x86\_64 GNU/Linux  
> > > Amazon Linux AMI release 2010.11.1 (beta)
> > 
> > > cat /proc/sys/fs/file-max  
> > > 764412
> > 
> > Any thoughts?  
> > -- jim

---

<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, 4:09am UTC](https://discuss.elastic.co/t/issues-deploying-to-beanstalk/4076/6 "2017-07-06T04:09:26Z")

</div>


