天道酬勤,学无止境

amazon-elastic-beanstalk

How do I configure data files in a Autoscaled (multi-instance) Elastic Beanstalk (Tomcat) Application (AWS)?

I currently have one Elastic Beanstalk instance running a Java application that is deployed to Tomcat. I deploy the application using the Web interface but the application uses a data file (Lucene index) referenced in the web.xml that I copy to the underlying EC2 instance by ssh-ing to EC2 and getting the data file from my S3 bucket. So far so good. But if I changed my EB to a autoscaleable environent so that it automatically creates new instances as required then these EC2 instances will not have the data file, how do I deal with this. Can I preconfigure each EC2 instance with datafile before

2021-06-15 18:12:38    分类:问答    tomcat   amazon-web-services   amazon-elastic-beanstalk

What does Early termination of worker puma log mean and why is it happening?

For my Elastic Beanstalk instance, I am getting a 504 status code response whenever I visit it. When I tail the logs I see the following log on the puma app server: ==> /var/log/puma/puma.log <== [27240] Early termination of worker [27245] Early termination of worker [27249] Early termination of worker [27253] Early termination of worker [27257] Early termination of worker [27261] Early termination of worker [27265] Early termination of worker [27269] Early termination of worker [27273] Early termination of worker [27277] Early termination of worker What does Early termination of worker mean

2021-06-15 12:10:18    分类:问答    ruby-on-rails   amazon-elastic-beanstalk   puma

Spring-boot and aws elastic beanstalk: Following services are not running: application-web-1

I am trying to deploy spring-boot web application to aws elastic beanstalk. i have added .elasticbeanstalk/config.yml file in the root folder and also application.properties with server port 5000. But after I create new application with elastic beanstalk with Java i am getting this error: Following services are not running: application-web-1 Thanks in advance

2021-06-15 05:15:42    分类:问答    amazon-web-services   spring-boot   amazon-elastic-beanstalk

Elastic Beanstalk stripping Sec-WebSocket-Accept header

I'm trying to get a .NET Core application running on elastic beanstalk to receive websockets connections from javascript in the browser. When I test my client and server outside AWS on my local machine I am able to establish a websocket connection betwen the two. But when I deploy the server to elastic beanstalk I get the following error WebSocket connection to 'ws://52.62.253.144/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing The server replies with a 101 Switching Protocols, so I know the server is trying to establish the connection, but the Sec

2021-06-15 04:35:23    分类:问答    amazon-web-services   websocket   amazon-elastic-beanstalk

How to set folder permissions for a particular container on Elastic Beanstalk

I have troubles setting permissions for a web folder on Elastic Beanstalk. I run multiple containers using custom docker images in one instance: apache-php, mysql, memcached, etc.. For the container "apache-php" I map a folder with my yii2 application to /var/www/html/. When I manually make a bundle and do upload / deploy via Elastic Beanstalk console I sure have right permissions for the folder and everything works fine. Now, when I deploy the app using "eb deploy", it drops all permissions and I get a server error and "The directory is not writable by the Web process: /var/www/html/backend

2021-06-14 23:49:41    分类:问答    linux   amazon-web-services   amazon-ec2   amazon-elastic-beanstalk

Upgrade Ruby on Elastic Beanstalk

How does ruby version get set and updated on ELB? I've been using ruby 2.2.2 on our qa and staging env's for about 8 months now. I just setup our production env Monday and it wouldn't deploy as it said ruby was set to 2.2.3 and my gemfile said 2.2.2. I updated and redeployed and everything seemed to be fine. I came back to the qa/staging env's and can't get it to update to ruby 2.2.3. Kept saying ruby version is 2.2.2 and Gemfile is 2.2.3 I upgraded (through elb ui): 64bit Amazon Linux 2015.03 v1.3.1 running Ruby 2.2 (Passenger Standalone) to 64bit Amazon Linux 2015.09 v2.0.6 running Ruby 2.2

2021-06-14 18:44:23    分类:问答    ruby-on-rails   ruby   amazon-elastic-beanstalk

How to copy folder from S3 to elastic beanstalk instance on instance creation

I'm running a Django web-app on AWS Elastic Beanstalk that needs specific files available to it to run (in fact, an nltk corpus of stopwords). Since instances come and go, I copied the needed folder to the S3 bucket that was created by my elastic beanstalk and planned to add a copy command using awscli to my elastic beanstalk configuration file. But I can't get it to work. Instances launched by my beanstalk should have read access to the S3 bucket because this is the bucket created automatically by beanstalk. So beanstalk also created an IAM role aws-elasticbeanstalk-ec2-role which is an

2021-06-14 18:10:27    分类:问答    amazon-web-services   amazon-s3   amazon-ec2   amazon-elastic-beanstalk

Can't deploy to AWS Elastic Beanstalk after timeout

I am newish to AWS Elastic Beanstalk and this is the first time I have encountered this issue. I tried deploying a new version via zip upload of my app to an instance and the updated completed with errors: "Completed but with Command Line Timeouts", I increased the timeout in the config file and redeployed, after which I got this message. During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version. This repeats each time try to redeploy. I went into the EC2

2021-06-14 07:45:33    分类:问答    amazon-web-services   amazon-ec2   amazon-elastic-beanstalk

Right way to deploy Rails + Puma + Postgres app to Elastic beanstalk?

I have an Rails 5 API which I am trying to deploy(correctly) on Elastic Beanstalk. Here is my initial config/puma.rb file which I use: threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests, default is 3000. port ENV.fetch("PORT") { 3000 } # Specifies the `environment` that Puma will run in. environment ENV.fetch("RAILS_ENV") { "development" } # Allow puma to be restarted by `rails restart` command. plugin :tmp_restart I get the following socket error: 2015/11/24 06:44:12 [crit] 2689#0:

2021-06-14 02:26:06    分类:问答    ruby-on-rails   amazon-web-services   amazon-elastic-beanstalk   puma

How to make SBT to not-ignore .ebextensions folder?

I have a webapp that is built via SBT and is deployed into Amazon Elastic Beanstalk. In order to configure Beanstalk instance, one needs to put .ebextensions folder with config files into root of WAR file. However, putting this folder into src/main/webapp doesn't help, because SBT by default ignores all hidden folders, so resulting WAR doesn't contain the folder. Is there some way to configure SBT to include this folder into the build, besides it's hidden? Or how can I put this folder into the build some other way? I'm using jenkins to automate build and deploy so unpack - add folder - pack

2021-06-14 01:08:22    分类:问答    sbt   amazon-elastic-beanstalk