I've created a simple Spring Boot application in IntelliJ and tested the connection with the AWS database, which gives me no error. After creating a mvn clean install, I test the jar in the command-prompt, which also gives me no error. Great, I can upload my JAR file to my AWS Environment. I go to Environment > Configuration > Edit Database, and select my database in the snapshot drop down. But my Environment wound connect to the database. I don't get why it would work. I've been trying to run my app on AWS for days now and I feel I'm close, but don't know how to solve this problem. Plz check out my log:
----------------------------------------
/var/log/web.stdout.log
----------------------------------------
Apr 20 06:15:19 ip-172-31-35-71 web: 2022-04-20 06:15:19.048:INFO::main: Logging initialized #367ms
Apr 20 06:15:19 ip-172-31-35-71 web: 2022-04-20 06:15:19.122:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
Apr 20 06:15:19 ip-172-31-35-71 web: 2022-04-20 06:15:19.201:INFO:oejs.ServerConnector:main: Started ServerConnector#2fcb66eb{HTTP/1.1}{0.0.0.0:5000}
Apr 20 08:34:45 ip-172-31-35-71 web: :: Spring Boot :: (v2.6.6)
Apr 20 08:34:45 ip-172-31-35-71 web: 2022-04-20 08:34:45.466 INFO 11107 --- [ main] c.e.S.SpringBootCrudExampleApplication : Starting SpringBootCrudExampleApplication v0.0.1-SNAPSHOT using Java 11.0.14.1 on ip-172-31-35-71.ec2.internal with PID 11107 (/var/app/current/application.jar started by webapp in /var/app/current)
Apr 20 08:34:45 ip-172-31-35-71 web: 2022-04-20 08:34:45.477 INFO 11107 --- [ main] c.e.S.SpringBootCrudExampleApplication : No active profile set, falling back to 1 default profile: "default"
Apr 20 08:34:47 ip-172-31-35-71 web: 2022-04-20 08:34:47.473 INFO 11107 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
Apr 20 08:34:47 ip-172-31-35-71 web: 2022-04-20 08:34:47.963 INFO 11107 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 472 ms. Found 1 JPA repository interfaces.
Apr 20 08:34:49 ip-172-31-35-71 web: 2022-04-20 08:34:49.554 INFO 11107 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 5000 (http)
Apr 20 08:34:49 ip-172-31-35-71 web: 2022-04-20 08:34:49.582 INFO 11107 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
Apr 20 08:34:49 ip-172-31-35-71 web: 2022-04-20 08:34:49.583 INFO 11107 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.60]
Apr 20 08:34:49 ip-172-31-35-71 web: 2022-04-20 08:34:49.769 INFO 11107 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
Apr 20 08:34:49 ip-172-31-35-71 web: 2022-04-20 08:34:49.769 INFO 11107 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4143 ms
Apr 20 08:34:50 ip-172-31-35-71 web: 2022-04-20 08:34:50.856 INFO 11107 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
Apr 20 08:34:50 ip-172-31-35-71 web: 2022-04-20 08:34:50.987 INFO 11107 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.7.Final
Apr 20 08:34:51 ip-172-31-35-71 web: 2022-04-20 08:34:51.362 INFO 11107 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
Apr 20 08:34:51 ip-172-31-35-71 web: 2022-04-20 08:34:51.585 INFO 11107 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
Apr 20 08:34:51 ip-172-31-35-71 web: 2022-04-20 08:34:51.957 INFO 11107 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
Apr 20 08:34:51 ip-172-31-35-71 web: 2022-04-20 08:34:51.979 INFO 11107 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
Apr 20 08:34:53 ip-172-31-35-71 web: 2022-04-20 08:34:53.137 INFO 11107 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
Apr 20 08:34:53 ip-172-31-35-71 web: 2022-04-20 08:34:53.148 INFO 11107 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
Apr 20 08:34:54 ip-172-31-35-71 web: 2022-04-20 08:34:54.000 WARN 11107 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
Apr 20 08:34:54 ip-172-31-35-71 web: 2022-04-20 08:34:54.946 INFO 11107 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 5000 (http) with context path ''
Apr 20 08:34:54 ip-172-31-35-71 web: 2022-04-20 08:34:54.965 INFO 11107 --- [ main] c.e.S.SpringBootCrudExampleApplication : Started SpringBootCrudExampleApplication in 11.253 seconds (JVM running for 12.875)
Apr 20 08:36:29 ip-172-31-35-71 web: 2022-04-20 08:36:29.654 INFO 11107 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
Apr 20 08:36:29 ip-172-31-35-71 web: 2022-04-20 08:36:29.658 INFO 11107 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
Apr 20 08:36:29 ip-172-31-35-71 web: 2022-04-20 08:36:29.690 INFO 11107 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
Events
INFO Environment health has transitioned from Warning to Ok.
WARN Environment health has transitioned from Warning to Ok.
INFO The environment was reverted to the previous configuration setting.
INFO Environment health has transitioned from Info to Warning. Configuration update failed 18 seconds ago and took 67 seconds.
The environment was reverted to the previous configuration setting.
Environment health has transitioned from Ok to Info. Configuration update in progress (running for 15 seconds).
ERROR Failed to deploy configuration.
ERROR Creating RDS database failed Reason: DB Instance class db.t2.micro does not support encryption at rest
ERROR Service:AmazonCloudFormation, Message:Stack named 'awseb-e-3a2mk3bca7-stack' aborted operation. Current state: 'UPDATE_ROLLBACK_IN_PROGRESS' Reason: The following resource(s) failed to create: [AWSEBRDSDatabase].
INFO Updating environment Invoice-env's configuration settings.
INFO Environment update is starting.
many developers.
This is my first question and I can't solve this.
I'm using AWS For to deploy out webapp and projects.
and now I just want to deploy so tiny project.
(like just basic django project)
I already test this in local(with "python manage.py runserver").
and build & run dockerfile.
But Deploying is failed with AWS continually.
I write Dockerfile and I use it.
But AWS says to me
"cat: /var/app/current/Dockerrun.aws.json: No such file or directory"
and I don't understand what it says.
This is my code in DockerFile
FROM {{mydockerId}}/myproject:base
COPY . /srv/FestivalMusicList
# static directory setting
RUN cp -f /srv/FestivalMusicList/.config/nginx.conf /etc/nginx/nginx.conf &&\
cp -f /srv/FestivalMusicList/.config/nginx-app.conf /etc/nginx/sites-available/ &&\
rm -f /etc/nginx/site-enabled/* &&\
ln -sf /etc/nginx/sites-available/nginx-app.conf /etc/nginx/sites-enabled/
RUN cp /srv/FestivalMusicList/.config/supervisord.conf /etc/supervisor/conf.d/
RUN mkdir /var/log/celery
EXPOSE 80
This is error
[2019-04-05T15:05:33.308Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list/Command 04_setdata_genre] : Starting activity...
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list/Command 04_setdata_genre] : Completed activity.
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_festival_music_list] : Completed activity.
[2019-04-05T15:05:33.310Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2019-04-05T15:05:33.328Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/EbExtensionPostBuild] : Completed activity.
[2019-04-05T15:05:33.328Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/InfraCleanEbExtension] : Starting activity...
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0/InfraCleanEbExtension] : Completed activity. Result:
Cleaned ebextensions subdirectories from /tmp.
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage0] : Completed activity. Result:
Application deployment - Command CMD-Startup stage 0 completed
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1] : Starting activity...
[2019-04-05T15:05:33.329Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1/AppDeployEnactHook] : Starting activity...
[2019-04-05T15:05:33.331Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1/AppDeployEnactHook/00run.sh] : Starting activity...
[2019-04-05T15:05:39.636Z] INFO [3747] - [Application deployment app-cdf1-190406_000132#1/StartupStage1/AppDeployEnactHook/00run.sh] : Activity execution failed, because: cat: /var/app/current/Dockerrun.aws.json: No such file or directory
cat: /var/app/current/Dockerrun.aws.json: No such file or directory
01a93e5ed8e11b0c76133e5e446764a8ec95ddd1db144be5d3fceca9fd6c0813
Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Apr 5 15:05:39 UTC 2019:. Check snapshot logs for details. (ElasticBeanstalk::ExternalInvocationError)
caused by: cat: /var/app/current/Dockerrun.aws.json: No such file or directory
cat: /var/app/current/Dockerrun.aws.json: No such file or directory
01a93e5ed8e11b0c76133e5e446764a8ec95ddd1db144be5d3fceca9fd6c0813
Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Apr 5 15:05:39 UTC 2019:. Check snapshot logs for details. (Executor::NonZeroExitStatus
Are you using Elastic Beanstalk? If so, you need the Dockerrun.aws.json at your root directory.
An example of its contents:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "janedoe/image",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "1234"
}
],
"Volumes": [
{
"HostDirectory": "/var/app/mydb",
"ContainerDirectory": "/etc/mysql"
}
],
"Logging": "/var/log/nginx",
"Entrypoint": "/app/bin/myapp",
"Command": "--argument"
}
For more information: Official Doc's
I'm learning how to use ebextensions to customize files on the EC2 instances created by Elastic Beanstalk.
So I downloaded the Tomcat java-tomcat-v3.zip sample application at this page and modified its .ebextensions/logging.config file.
Below is my logging.config:
files:
"/opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf":
content: |
/tmp/sample-app*
"/opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf":
content: |
/tmp/sample-app.log
"/usr/share/tomcat8/conf/Catalina/localhost/rewrite.config":
mode: "000644"
owner: root
group: tomcat
content: |
RewriteRule ^/API(.*) https://%{HTTP_HOST}$1 [NC,L]
"/tmp/test.txt":
mode: "000644"
owner: root
group: tomcat
content: |
hello there
The file /usr/share/tomcat8/conf/Catalina/localhost/rewrite.config is not created after I deploy the zip file to my Elastic Beanstalk environment.
All the other 3 files are correctly created.
What's wrong with my configuration?
There are some messages about rewrite.config file in /var/log/eb-activit.log:
[2019-01-04T03:26:32.983Z] INFO [6912] - [Application update java-tomcat-v3-9#13/AppDeployStage1/AppDeployEnactHook/02clean.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
+ EB_APP_DEPLOY_DIR=/var/lib/tomcat8/webapps/ROOT
++ /opt/elasticbeanstalk/bin/get-config container -k tomcat_version
+ TOMCAT_VERSION=8.5
+ '[' 8.5 == 8.5 ']'
+ TOMCAT_VERSION=8
+ TOMCAT_NAME=tomcat8
+ mkdir -p /var/lib/tomcat8/webapps/ROOT
++ readlink -f /var/lib/tomcat8/webapps/ROOT/..
+ EB_APP_DEPLOY_BASE_DIR=/var/lib/tomcat8/webapps
+ rm -rf /var/lib/tomcat8/webapps/ROOT
+ rm -rf /usr/share/tomcat8/conf/Catalina/localhost/rewrite.config
+ rm -rf /usr/share/tomcat8/work/Catalina/localhost
+ mkdir -p /var/lib/tomcat8/webapps/ROOT
[2019-01-04T03:26:32.983Z] INFO [6912] - [Application update java-tomcat-v3-9#13/AppDeployStage1/AppDeployEnactHook/02start_xray.sh] : Starting activity...
I don't understand why elastic beanstalk executed rm -rf /usr/share/tomcat8/conf/Catalina/localhost/rewrite.config command during deployment.
Is there any command that deletes /usr/share/tomcat8/conf/Catalina/localhost/rewrite.config after the file is created?
The following is the full content of /var/log/eb-activity.log:
[2019-01-04T05:20:41.410Z] INFO [11976] - [Application update java-tomcat-v3-11#15] : Starting activity...
[2019-01-04T05:20:41.411Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsBefore] : Starting activity...
[2019-01-04T05:20:41.411Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsBefore/ConfigCWLAgent] : Starting activity...
[2019-01-04T05:20:41.411Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsBefore/ConfigCWLAgent/10-config.sh] : Starting activity...
[2019-01-04T05:20:41.533Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsBefore/ConfigCWLAgent/10-config.sh] : Completed activity. Result:
Log streaming option setting is not specified, ignore cloudwatch logs setup.
Disabled log streaming.
[2019-01-04T05:20:41.533Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsBefore/ConfigCWLAgent] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logstreaming/hooks/config.
[2019-01-04T05:20:41.533Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsBefore] : Completed activity.
[2019-01-04T05:20:41.921Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0] : Starting activity...
[2019-01-04T05:20:41.921Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/DownloadSourceBundle] : Starting activity...
[2019-01-04T05:20:42.440Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/DownloadSourceBundle] : Completed activity. Result:
[2019-01-04T05:20:42.024Z] INFO [12019] : Application version will be saved to /opt/elasticbeanstalk/deploy/appsource.
[2019-01-04T05:20:42.024Z] INFO [12019] : Using manifest cache with deployment ID 15 and serial 15.
[2019-01-04T05:20:42.024Z] INFO [12019] : Attempting to download application source bundle to: '/opt/elasticbeanstalk/deploy/appsource/source_bundle'.
[2019-01-04T05:20:42.024Z] INFO [12019] : Using computed s3 key.
[2019-01-04T05:20:42.142Z] INFO [12019] : Downloading from bucket 'elasticbeanstalk-region-n-xxxxxxxxx' with key 'resources/environments/e-ipdsfn2umb/_runtime/_versions/BrianTest/java-tomcat-v3-11' and version '' to '/opt/elasticbeanstalk/deploy/appsource/source_bundle'.
[2019-01-04T05:20:42.226Z] INFO [12019] : Size: 6511344, ETag: "025d9af7b40ad70f45caed145adfce0f", Metadata: {"environmentid"=>"e-ipdsfn2umb", "requestid"=>"5d54090a-0fe0-11e9-9bda-6373967d51b5"}.
[2019-01-04T05:20:42.431Z] INFO [12019] : Downloaded size: 6511344.
[2019-01-04T05:20:42.431Z] INFO [12019] : Successfully downloaded to '/opt/elasticbeanstalk/deploy/appsource/source_bundle'.
[2019-01-04T05:20:42.441Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild] : Starting activity...
[2019-01-04T05:20:42.836Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Starting activity...
[2019-01-04T05:20:42.840Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_0_BrianTest] : Starting activity...
[2019-01-04T05:20:42.840Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_0_BrianTest] : Completed activity.
[2019-01-04T05:20:42.845Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_1_BrianTest] : Starting activity...
[2019-01-04T05:20:42.845Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_1_BrianTest] : Completed activity.
[2019-01-04T05:20:42.845Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Completed activity.
[2019-01-04T05:20:42.863Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPreBuild] : Completed activity.
[2019-01-04T05:20:42.863Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook] : Starting activity...
[2019-01-04T05:20:42.864Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/01_configure_xray.sh] : Starting activity...
[2019-01-04T05:20:43.030Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/01_configure_xray.sh] : Completed activity. Result:
D, [2019-01-04T05:20:42.968092 #12033] DEBUG -- : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
D, [2019-01-04T05:20:42.968243 #12033] DEBUG -- : Retrieving metadata for key: AWS::CloudFormation::Init||Infra-WriteApplication2||files..
Executing: /opt/elasticbeanstalk/bin/log-conf -n awsxray -l'/var/log/xray/xray.log' -t publishlogs
[2019-01-04T05:20:43.030Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/01clean.sh] : Starting activity...
[2019-01-04T05:20:43.127Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/01clean.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
+ EB_APP_STAGING_DIR=/tmp/deployment/application/ROOT
+ rm -rf /tmp/deployment/application/ROOT
+ mkdir -p /tmp/deployment/application/ROOT
[2019-01-04T05:20:43.128Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/02unzip.sh] : Starting activity...
[2019-01-04T05:20:43.384Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/02unzip.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
+ EB_APP_STAGING_DIR=/tmp/deployment/application/ROOT
++ /opt/elasticbeanstalk/bin/get-config container -k source_bundle
+ EB_SOURCE_BUNDLE=/opt/elasticbeanstalk/deploy/appsource/source_bundle
+ /usr/bin/unzip -o -d /tmp/deployment/application/ROOT /opt/elasticbeanstalk/deploy/appsource/source_bundle
Archive: /opt/elasticbeanstalk/deploy/appsource/source_bundle
creating: /tmp/deployment/application/ROOT/META-INF/
extracting: /tmp/deployment/application/ROOT/META-INF/MANIFEST.MF
creating: /tmp/deployment/application/ROOT/WEB-INF/
creating: /tmp/deployment/application/ROOT/WEB-INF/classes/
creating: /tmp/deployment/application/ROOT/WEB-INF/classes/org/
creating: /tmp/deployment/application/ROOT/WEB-INF/classes/org/example/
inflating: /tmp/deployment/application/ROOT/WEB-INF/classes/org/example/AWSXRayServletContext.class
inflating: /tmp/deployment/application/ROOT/WEB-INF/classes/org/example/AWSXRayServlet.class
inflating: /tmp/deployment/application/ROOT/WEB-INF/classes/org/example/ConditionalAWSXRayServletFilter.class
creating: /tmp/deployment/application/ROOT/WEB-INF/classes/META-INF/
extracting: /tmp/deployment/application/ROOT/WEB-INF/classes/META-INF/MANIFEST.MF
inflating: /tmp/deployment/application/ROOT/WEB-INF/classes/META-INF/NOTICE.txt
inflating: /tmp/deployment/application/ROOT/WEB-INF/classes/META-INF/LICENSE.txt
creating: /tmp/deployment/application/ROOT/WEB-INF/lib/
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/commons-logging-1.1.3.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/ion-java-1.0.1.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/jackson-databind-2.6.6.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/jackson-core-2.6.6.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/httpclient-4.5.2.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/aws-java-sdk-s3-1.11.67.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/commons-codec-1.9.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/commons-validator-1.5.1.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/jmespath-java-1.0.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/jackson-dataformat-cbor-2.6.6.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/commons-collections-3.2.2.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/joda-time-2.8.1.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/httpcore-4.4.4.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/jackson-annotations-2.6.0.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/aws-xray-recorder-sdk-aws-sdk-1.0.5-beta.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/commons-beanutils-1.9.2.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/aws-java-sdk-core-1.11.67.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/aws-xray-recorder-sdk-core-1.0.5-beta.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/aws-java-sdk-kms-1.11.67.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/lib/commons-digester-1.8.1.jar
inflating: /tmp/deployment/application/ROOT/WEB-INF/web.xml
inflating: /tmp/deployment/application/ROOT/cron.yaml
inflating: /tmp/deployment/application/ROOT/index.jsp
inflating: /tmp/deployment/application/ROOT/scheduled.jsp
creating: /tmp/deployment/application/ROOT/src/
inflating: /tmp/deployment/application/ROOT/src/AWSXRayServlet.java
inflating: /tmp/deployment/application/ROOT/src/ConditionalAWSXRayServletFilter.java
inflating: /tmp/deployment/application/ROOT/src/AWSXRayServletContext.java
creating: /tmp/deployment/application/ROOT/.ebextensions/
inflating: /tmp/deployment/application/ROOT/.ebextensions/xray.config
inflating: /tmp/deployment/application/ROOT/.ebextensions/logging.config
++ wc -l
++ find /tmp/deployment/application/ROOT -maxdepth 1 -type f
+ FILE_COUNT=3
++ wc -l
++ ls /tmp/deployment/application/ROOT --almost-all
+ ITEM_COUNT=7
+ [[ 3 == 0 ]]
[2019-01-04T05:20:43.384Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/03_configure_proxy.sh] : Starting activity...
[2019-01-04T05:20:44.069Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/03_configure_proxy.sh] : Completed activity. Result:
Executing: /bin/chown root:apache /var/run/httpd
Executing: /bin/chmod 755 /var/run/httpd
Executing: /bin/chown apache:apache /var/log/httpd
Executing: /bin/chmod 755 /var/log/httpd
Executing: /opt/elasticbeanstalk/bin/log-conf -n httpd -l'/var/log/httpd/*'
Executing: /usr/sbin/apachectl -t -f /var/elasticbeanstalk/staging/httpd/conf/httpd.conf
Syntax OK
[2019-01-04T05:20:44.069Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/03config_clean.sh] : Starting activity...
[2019-01-04T05:20:44.168Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/03config_clean.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k config_staging_dir
+ EB_CONFIG_STAGING_DIR=/tmp/deployment/config
+ rm -rf /tmp/deployment/config
+ mkdir -p /tmp/deployment/config
[2019-01-04T05:20:44.168Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/04config_generate.sh] : Starting activity...
[2019-01-04T05:20:44.483Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook/04config_generate.sh] : Completed activity. Result:
+ /opt/elasticbeanstalk/containerfiles/generate_config
[2019-01-04T05:20:44.483Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/AppDeployPreHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
[2019-01-04T05:20:44.483Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPostBuild] : Starting activity...
[2019-01-04T05:20:44.880Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity...
[2019-01-04T05:20:44.880Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2019-01-04T05:20:44.895Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/EbExtensionPostBuild] : Completed activity.
[2019-01-04T05:20:44.895Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/InfraCleanEbextension] : Starting activity...
[2019-01-04T05:20:44.896Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0/InfraCleanEbextension] : Completed activity. Result:
Cleaned ebextensions subdirectories from /tmp/deployment/application/ROOT.
[2019-01-04T05:20:44.896Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage0] : Completed activity. Result:
Application update - Command CMD-AppDeploy stage 0 completed
[2019-01-04T05:20:44.897Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1] : Starting activity...
[2019-01-04T05:20:44.897Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook] : Starting activity...
[2019-01-04T05:20:44.897Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/01stop.sh] : Starting activity...
[2019-01-04T05:20:46.432Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/01stop.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k tomcat_version
+ TOMCAT_VERSION=8.5
+ '[' 8.5 == 8.5 ']'
+ TOMCAT_VERSION=8
+ TOMCAT_NAME=tomcat8
+ /etc/init.d/tomcat8 status
tomcat8 (pid 8226) is running...[ OK ]
+ /usr/bin/monit unmonitor tomcat
+ /etc/init.d/tomcat8 stop
Stopping tomcat8: [ OK ]
[2019-01-04T05:20:46.432Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/01stop_xray.sh] : Starting activity...
[2019-01-04T05:20:48.548Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/01stop_xray.sh] : Completed activity. Result:
Executing: if ( initctl status xray | grep start ); then initctl stop xray; fi
xray start/running, process 8071
xray stop/waiting
[2019-01-04T05:20:48.549Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/02clean.sh] : Starting activity...
[2019-01-04T05:20:48.742Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/02clean.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
+ EB_APP_DEPLOY_DIR=/var/lib/tomcat8/webapps/ROOT
++ /opt/elasticbeanstalk/bin/get-config container -k tomcat_version
+ TOMCAT_VERSION=8.5
+ '[' 8.5 == 8.5 ']'
+ TOMCAT_VERSION=8
+ TOMCAT_NAME=tomcat8
+ mkdir -p /var/lib/tomcat8/webapps/ROOT
++ readlink -f /var/lib/tomcat8/webapps/ROOT/..
+ EB_APP_DEPLOY_BASE_DIR=/var/lib/tomcat8/webapps
+ rm -rf /var/lib/tomcat8/webapps/ROOT
+ rm -rf /usr/share/tomcat8/conf/Catalina/localhost/rewrite.config
+ rm -rf /usr/share/tomcat8/work/Catalina/localhost
+ mkdir -p /var/lib/tomcat8/webapps/ROOT
[2019-01-04T05:20:48.742Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/02start_xray.sh] : Starting activity...
[2019-01-04T05:20:48.855Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/02start_xray.sh] : Completed activity. Result:
Executing: initctl start xray
xray start/running, process 12243
[2019-01-04T05:20:48.855Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/03_stop_proxy.sh] : Starting activity...
[2019-01-04T05:20:49.447Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/03_stop_proxy.sh] : Completed activity. Result:
Executing: service nginx stop
Executing: service httpd stop
Stopping httpd: [ OK ]
[2019-01-04T05:20:49.447Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/03deploy.sh] : Starting activity...
[2019-01-04T05:20:49.644Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/03deploy.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
+ EB_APP_STAGING_DIR=/tmp/deployment/application/ROOT
++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
+ EB_APP_DEPLOY_DIR=/var/lib/tomcat8/webapps/ROOT
++ wc -l
++ find /tmp/deployment/application/ROOT -maxdepth 1 -type f -not -path '*/\.*'
+ FILE_COUNT=3
++ grep -Pi '\.war$'
++ find /tmp/deployment/application/ROOT -maxdepth 1 -type f
++ echo ''
+ WAR_FILES=
+ WAR_FILE_COUNT=0
+ [[ 0 > 0 ]]
++ readlink -f /var/lib/tomcat8/webapps/ROOT/../
+ EB_APP_DEPLOY_BASE=/var/lib/tomcat8/webapps
+ rm -rf /var/lib/tomcat8/webapps/ROOT
+ [[ 3 == 0 ]]
+ cp -R /tmp/deployment/application/ROOT /var/lib/tomcat8/webapps/ROOT
+ chown -R tomcat:tomcat /var/lib/tomcat8/webapps
[2019-01-04T05:20:49.644Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/04config_deploy.sh] : Starting activity...
[2019-01-04T05:20:49.921Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/04config_deploy.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k config_staging_dir
+ EB_CONFIG_STAGING_DIR=/tmp/deployment/config
++ /opt/elasticbeanstalk/bin/get-config container -k config_deploy_dir
+ EB_CONFIG_DEPLOY_DIR=/etc/sysconfig
++ /opt/elasticbeanstalk/bin/get-config container -k config_filename
+ EB_CONFIG_FILENAME=tomcat8
+ cp /tmp/deployment/config/tomcat8 /etc/sysconfig/tomcat8
[2019-01-04T05:20:49.922Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/05start.sh] : Starting activity...
[2019-01-04T05:20:50.082Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/05start.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k tomcat_version
+ TOMCAT_VERSION=8.5
+ '[' 8.5 == 8.5 ']'
+ TOMCAT_VERSION=8
+ TOMCAT_NAME=tomcat8
+ /etc/init.d/tomcat8 status
tomcat8 is stopped
[ OK ]
+ /etc/init.d/tomcat8 start
Starting tomcat8: [ OK ]
+ /usr/bin/monit monitor tomcat
[2019-01-04T05:20:50.082Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/09_start_proxy.sh] : Starting activity...
[2019-01-04T05:20:53.246Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook/09_start_proxy.sh] : Completed activity. Result:
Executing: service httpd stop
Stopping httpd: [FAILED]
Executing: service httpd start
Starting httpd: [ OK ]
Executing: /bin/chmod 755 /var/run/httpd
Executing: /opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy httpd
Executing: /opt/elasticbeanstalk/bin/healthd-configure --appstat-log-path /var/log/httpd/healthd/application.log --appstat-unit usec --appstat-timestamp-on 'arrival'
Executing: /opt/elasticbeanstalk/bin/healthd-restart
[2019-01-04T05:20:53.246Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployEnactHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2019-01-04T05:20:53.246Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployPostHook] : Starting activity...
[2019-01-04T05:20:53.246Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployPostHook/03monitor_pids.sh] : Starting activity...
[2019-01-04T05:20:53.929Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployPostHook/03monitor_pids.sh] : Completed activity.
[2019-01-04T05:20:53.930Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1/AppDeployPostHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
[2019-01-04T05:20:53.930Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AppDeployStage1] : Completed activity. Result:
Application version switch - Command CMD-AppDeploy stage 1 completed
[2019-01-04T05:20:53.930Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsAfter] : Starting activity...
[2019-01-04T05:20:53.930Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsAfter/ConfigLogRotation] : Starting activity...
[2019-01-04T05:20:53.930Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2019-01-04T05:20:54.287Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
Disabled forced hourly log rotation.
[2019-01-04T05:20:54.287Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2019-01-04T05:20:54.287Z] INFO [11976] - [Application update java-tomcat-v3-11#15/AddonsAfter] : Completed activity.
[2019-01-04T05:20:54.287Z] INFO [11976] - [Application update java-tomcat-v3-11#15] : Completed activity. Result:
Application update - Command CMD-AppDeploy succeeded
I've found that there's a command rm -rf /usr/share/$TOMCAT_NAME/conf/Catalina/localhost/* sitting inside /opt/elasticbeanstalk/hooks/appdeploy/enact/02clean.sh.
Probably this is the reason that I can't create a file under /usr/share/tomcat8/conf/Catalina/localhost/.
My ultimate goal is to use Tomcat rewrite valve. I think I have to look for another solution.
I created the /tmp/rewrite.config file with files.
Then, using postdeploy hook I created a script to copy it to the /etc/tomcat/Catalina/localhost/ folder
This is the path to the hook /src/main/platform/hooks/postdeploy/01_add_rewrite_config.sh
I had run the following commands on pig on the google n-grams dataset:
inp = LOAD 'link to file' AS (ngram:chararray, year:int, occurences:float, books:float);
filter_input = FILTER inp BY (occurences >= 400) AND (books >= 8);
groupinp = GROUP filter_input BY ngram;
sum_occ = FOREACH groupinp GENERATE FLATTEN(group) as ngram, SUM(filter_input.occurences) / SUM(filter_input.books) AS ntry;
roundto = FOREACH sum_occ GENERATE sum_occ.ngram, ROUND_TO( sum_occ.ntry , 2 );
However I get the following error:
DUMP roundto;
601062 [main] WARN org.apache.pig.newplan.BaseOperatorPlan - Encountered Warning IMPLICIT_CAST_TO_FLOAT 2 time(s).
18/04/06 01:46:03 WARN newplan.BaseOperatorPlan: Encountered Warning IMPLICIT_CAST_TO_FLOAT 2 time(s).
601067 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: GROUP_BY,FILTER
18/04/06 01:46:03 INFO pigstats.ScriptState: Pig features used in the script: GROUP_BY,FILTER
601111 [main] INFO org.apache.pig.data.SchemaTupleBackend - Key [pig.schematuple] was not set... will not generate code.
18/04/06 01:46:03 INFO data.SchemaTupleBackend: Key [pig.schematuple] was not set... will not generate code.
601111 [main] INFO org.apache.pig.newplan.logical.optimizer.LogicalPlanOptimizer - {RULES_ENABLED=[AddForEach, ColumnMapKeyPrune, ConstantCalculator, GroupByConstParallelSetter, LimitOptimizer, LoadTypeCastInserter, MergeFilter, MergeForEach, NestedLimitOptimizer, PartitionFilterOptimizer, PredicatePushdownOptimizer, PushDownForEachFlatten, PushUpFilter, SplitFilter, StreamTypeCastInserter]}
18/04/06 01:46:03 INFO optimizer.LogicalPlanOptimizer: {RULES_ENABLED=[AddForEach, ColumnMapKeyPrune, ConstantCalculator, GroupByConstParallelSetter, LimitOptimizer, LoadTypeCastInserter, MergeFilter, MergeForEach, NestedLimitOptimizer, PartitionFilterOptimizer, PredicatePushdownOptimizer, PushDownForEachFlatten, PushUpFilter, SplitFilter, StreamTypeCastInserter]}
601238 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezLauncher - Tez staging directory is /tmp/temp-336429202 and resources directory is /tmp/temp-336429202
18/04/06 01:46:03 INFO tez.TezLauncher: Tez staging directory is /tmp/temp-336429202 and resources directory is /tmp/temp-336429202
601239 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.plan.TezCompiler - File concatenation threshold: 100 optimistic? false
18/04/06 01:46:03 INFO plan.TezCompiler: File concatenation threshold: 100 optimistic? false
601241 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.CombinerOptimizerUtil - Choosing to move algebraic foreach to combiner
18/04/06 01:46:03 INFO util.CombinerOptimizerUtil: Choosing to move algebraic foreach to combiner
601265 [main] INFO org.apache.pig.builtin.PigStorage - Using PigTextInputFormat
18/04/06 01:46:03 INFO builtin.PigStorage: Using PigTextInputFormat
18/04/06 01:46:03 INFO input.FileInputFormat: Total input files to process : 1
601285 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1
18/04/06 01:46:03 INFO util.MapRedUtil: Total input paths to process : 1
601285 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 1
18/04/06 01:46:03 INFO util.MapRedUtil: Total input paths (combined) to process : 1
18/04/06 01:46:03 INFO hadoop.MRInputHelpers: NumSplits: 1, SerializedSize: 408
601322 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: joda-time-2.9.4.jar
18/04/06 01:46:03 INFO tez.TezJobCompiler: Local resource: joda-time-2.9.4.jar
601322 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: pig-0.17.0-core-h2.jar
18/04/06 01:46:03 INFO tez.TezJobCompiler: Local resource: pig-0.17.0-core-h2.jar
601322 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: antlr-runtime-3.4.jar
18/04/06 01:46:03 INFO tez.TezJobCompiler: Local resource: antlr-runtime-3.4.jar
601322 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: automaton-1.11-8.jar
18/04/06 01:46:03 INFO tez.TezJobCompiler: Local resource: automaton-1.11-8.jar
601402 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - For vertex - scope-141: parallelism=1, memory=1536, java opts=-Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx1229m -Dlog4j.configuratorClass=org.apache.tez.common.TezLog4jConfigurator -Dlog4j.configuration=tez-container-log4j.properties -Dyarn.app.container.log.dir=<LOG_DIR> -Dtez.root.logger=INFO,CLA
18/04/06 01:46:03 INFO tez.TezDagBuilder: For vertex - scope-141: parallelism=1, memory=1536, java opts=-Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx1229m -Dlog4j.configuratorClass=org.apache.tez.common.TezLog4jConfigurator -Dlog4j.configuration=tez-container-log4j.properties -Dyarn.app.container.log.dir=<LOG_DIR> -Dtez.root.logger=INFO,CLA
601402 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Processing aliases: filter_input,groupinp,inp,sum_occ
18/04/06 01:46:03 INFO tez.TezDagBuilder: Processing aliases: filter_input,groupinp,inp,sum_occ
601402 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Detailed locations: inp[1,6],inp[-1,-1],filter_input[2,15],sum_occ[4,10],groupinp[3,11]
18/04/06 01:46:03 INFO tez.TezDagBuilder: Detailed locations: inp[1,6],inp[-1,-1],filter_input[2,15],sum_occ[4,10],groupinp[3,11]
601402 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Pig features in the vertex:
18/04/06 01:46:03 INFO tez.TezDagBuilder: Pig features in the vertex:
601449 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Set auto parallelism for vertex scope-142
18/04/06 01:46:03 INFO tez.TezDagBuilder: Set auto parallelism for vertex scope-142
601450 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - For vertex - scope-142: parallelism=1, memory=3072, java opts=-Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx2458m -Dlog4j.configuratorClass=org.apache.tez.common.TezLog4jConfigurator -Dlog4j.configuration=tez-container-log4j.properties -Dyarn.app.container.log.dir=<LOG_DIR> -Dtez.root.logger=INFO,CLA
18/04/06 01:46:03 INFO tez.TezDagBuilder: For vertex - scope-142: parallelism=1, memory=3072, java opts=-Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN -Xmx2458m -Dlog4j.configuratorClass=org.apache.tez.common.TezLog4jConfigurator -Dlog4j.configuration=tez-container-log4j.properties -Dyarn.app.container.log.dir=<LOG_DIR> -Dtez.root.logger=INFO,CLA
601450 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Processing aliases: roundto,sum_occ
18/04/06 01:46:03 INFO tez.TezDagBuilder: Processing aliases: roundto,sum_occ
601450 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Detailed locations: sum_occ[4,10],roundto[6,10]
18/04/06 01:46:03 INFO tez.TezDagBuilder: Detailed locations: sum_occ[4,10],roundto[6,10]
601450 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Pig features in the vertex: GROUP_BY
18/04/06 01:46:03 INFO tez.TezDagBuilder: Pig features in the vertex: GROUP_BY
601489 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Total estimated parallelism is 2
18/04/06 01:46:04 INFO tez.TezJobCompiler: Total estimated parallelism is 2
601531 [PigTezLauncher-0] INFO org.apache.pig.tools.pigstats.tez.TezScriptState - Pig script settings are added to the job
18/04/06 01:46:04 INFO tez.TezScriptState: Pig script settings are added to the job
18/04/06 01:46:04 INFO client.TezClient: Tez Client Version: [ component=tez-api, version=0.8.4, revision=300391394352b074b85b529e870816a72c6f314a, SCM-URL=scm:git:https://git-wip-us.apache.org/repos/asf/tez.git, buildTime=2018-03-21T23:55:28Z ]
18/04/06 01:46:04 INFO client.RMProxy: Connecting to ResourceManager at ip-172-31-28-12.ec2.internal/172.31.28.12:8032
18/04/06 01:46:04 INFO client.TezClient: Using org.apache.tez.dag.history.ats.acls.ATSHistoryACLPolicyManager to manage Timeline ACLs
18/04/06 01:46:04 INFO impl.TimelineClientImpl: Timeline service address: http://ip-172-31-28-12.ec2.internal:8188/ws/v1/timeline/
18/04/06 01:46:04 INFO client.TezClient: Session mode. Starting session.
18/04/06 01:46:04 INFO client.TezClientUtils: Using tez.lib.uris value from configuration: hdfs:///apps/tez/tez.tar.gz
18/04/06 01:46:04 INFO client.TezClientUtils: Using tez.lib.uris.classpath value from configuration: null
18/04/06 01:46:04 INFO client.TezClient: Tez system stage directory hdfs://ip-172-31-28-12.ec2.internal:8020/tmp/temp-336429202/.tez/application_1522978297921_0003 doesn't exist and is created
18/04/06 01:46:04 INFO acls.ATSHistoryACLPolicyManager: Created Timeline Domain for History ACLs, domainId=Tez_ATS_application_1522978297921_0003
18/04/06 01:46:04 INFO impl.YarnClientImpl: Submitted application application_1522978297921_0003
18/04/06 01:46:04 INFO client.TezClient: The url to track the Tez Session: http://ip-172-31-28-12.ec2.internal:20888/proxy/application_1522978297921_0003/
607861 [PigTezLauncher-0] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJob - Submitting DAG PigLatin:DefaultJobName-0_scope-2
18/04/06 01:46:10 INFO tez.TezJob: Submitting DAG PigLatin:DefaultJobName-0_scope-2
18/04/06 01:46:10 INFO client.TezClient: Submitting dag to TezSession, sessionName=PigLatin:DefaultJobName, applicationId=application_1522978297921_0003, dagName=PigLatin:DefaultJobName-0_scope-2, callerContext={ context=PIG, callerType=PIG_SCRIPT_ID, callerId=PIG-default-d73e19dc-5287-4ee2-a85d-e931327011dc }
18/04/06 01:46:10 INFO client.TezClient: Submitted dag to TezSession, sessionName=PigLatin:DefaultJobName, applicationId=application_1522978297921_0003, dagName=PigLatin:DefaultJobName-0_scope-2
18/04/06 01:46:10 INFO client.RMProxy: Connecting to ResourceManager at ip-172-31-28-12.ec2.internal/172.31.28.12:8032
608409 [PigTezLauncher-0] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJob - Submitted DAG PigLatin:DefaultJobName-0_scope-2. Application id: application_1522978297921_0003
18/04/06 01:46:10 INFO tez.TezJob: Submitted DAG PigLatin:DefaultJobName-0_scope-2. Application id: application_1522978297921_0003
608528 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezLauncher - HadoopJobId: job_1522978297921_0003
18/04/06 01:46:11 INFO tez.TezLauncher: HadoopJobId: job_1522978297921_0003
609410 [Timer-1] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJob - DAG Status: status=RUNNING, progress=TotalTasks: 2 Succeeded: 0 Running: 0 Failed: 0 Killed: 0, diagnostics=, counters=null
18/04/06 01:46:11 INFO tez.TezJob: DAG Status: status=RUNNING, progress=TotalTasks: 2 Succeeded: 0 Running: 0 Failed: 0 Killed: 0, diagnostics=, counters=null
629410 [Timer-1] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJob - DAG Status: status=RUNNING, progress=TotalTasks: 2 Succeeded: 0 Running: 1 Failed: 0 Killed: 0, diagnostics=, counters=null
18/04/06 01:46:31 INFO tez.TezJob: DAG Status: status=RUNNING, progress=TotalTasks: 2 Succeeded: 0 Running: 1 Failed: 0 Killed: 0, diagnostics=, counters=null
646404 [pool-1-thread-1] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezSessionManager - Shutting down Tez session org.apache.tez.client.TezClient#3a371843
18/04/06 01:46:48 INFO tez.TezSessionManager: Shutting down Tez session org.apache.tez.client.TezClient#3a371843
2018-04-06 01:46:48 Shutting down Tez session , sessionName=PigLatin:DefaultJobName, applicationId=application_1522978297921_0003
18/04/06 01:46:48 INFO client.TezClient: Shutting down Tez Session, sessionName=PigLatin:DefaultJobName, applicationId=application_1522978297921_0003
How do I fix this error? Dump commands work for the previous lines other than roundto. And What exactly is the Tez client?
I can't replicate your output, because I get an error as soon as I try this line:
roundto = FOREACH sum_occ GENERATE sum_occ.ngram, ROUND_TO( sum_occ.ntry , 2 );
You don't need to use the dot operator to refer to these fields (e.g. sum_occ.ngram) because they are not nested in a tuple or bag. Try the above line without the dot operator:
roundto = FOREACH sum_occ GENERATE ngram, ROUND_TO( ntry , 2 );
To answer your second question, MapReduce and Tez are both frameworks that can be used to run Pig scripts. Tez can sometimes speed up the time it takes Pig scripts to run. You can explicitly use MapReduce or Tez by starting your Pig shell with pig -x mapreduce or pig -x tez. MapReduce is the default, so if you haven't specified Tez, your Hadoop cluster must be set up to run Pig in Tez.
I was trying run this example on the aws website for node.js http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/samples/nodejs-express-hiking-v1.zip
from here
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-getstarted.html
(I tired the tutorial that had the same error)
502 Bad Gateway
nginx/1.10.1
Is what is shown.
I also tried changing the port to 5000 but that did not help either.
Here are the logs:
I think the second one is the problem but I have no idea what to do about it.
/var/log/nodejs/nodejs.log
Server running at http://127.0.0.1:8081/
/var/log/nginx/error.log
2017/02/20 04:10:25 [warn] 2488#0: duplicate MIME type "text/html" in /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf:42
/var/log/eb-activity.log
Did not find to find status of init job. Assuming stopped.
Did not find to find status of init job. Assuming stopped.
[2017-02-20T04:10:21.090Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/20clean.sh] : Starting activity...
[2017-02-20T04:10:21.285Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/20clean.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_base_dir
+ EB_APP_BASE_DIR=/var/app
+ rm -rf /var/app
[2017-02-20T04:10:21.286Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/30app_deploy.sh] : Starting activity...
[2017-02-20T04:10:22.003Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/30app_deploy.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k app_base_dir
+ EB_APP_BASE_DIR=/var/app
++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
+ EB_APP_STAGING_DIR=/tmp/deployment/application
++ /opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir
+ EB_APP_DEPLOY_DIR=/var/app/current
++ /opt/elasticbeanstalk/bin/get-config container -k app_user
+ EB_APP_USER=nodejs
+ mkdir /var/app
+ mv /tmp/deployment/application /var/app/current
+ chown -R nodejs:nodejs /var/app/current
[2017-02-20T04:10:22.003Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/40config_deploy.sh] : Starting activity...
[2017-02-20T04:10:22.230Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/40config_deploy.sh] : Completed activity. Result:
++ /opt/elasticbeanstalk/bin/get-config container -k config_staging_dir
+ EB_CONFIG_STAGING_DIR=/tmp/deployment/config
++ ls /tmp/deployment/config
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#init#nginx.conf'
+ FILE_NAME=/etc/init/nginx.conf
+ /bin/cp /tmp/deployment/config/#etc#init#nginx.conf /etc/init/nginx.conf
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#init#nodejs.conf'
+ FILE_NAME=/etc/init/nodejs.conf
+ /bin/cp /tmp/deployment/config/#etc#init#nodejs.conf /etc/init/nodejs.conf
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf'
+ FILE_NAME=/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
+ /bin/cp /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
+ for i in '$(ls $EB_CONFIG_STAGING_DIR)'
++ sed -e 's/#/\//g'
++ echo '#etc#nginx#nginx.conf'
+ FILE_NAME=/etc/nginx/nginx.conf
+ /bin/cp /tmp/deployment/config/#etc#nginx#nginx.conf /etc/nginx/nginx.conf
[2017-02-20T04:10:22.230Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/50start.sh] : Starting activity...
[2017-02-20T04:10:25.232Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/50start.sh] : Completed activity. Result:
+ /opt/elasticbeanstalk/containerfiles/ebnode.py --action start-all
nodejs start/running, process 2473
nginx start/running, process 2488
[2017-02-20T04:10:25.232Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/60monitor_pids.sh] : Starting activity...
[2017-02-20T04:10:25.794Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/60monitor_pids.sh] : Completed activity. Result:
+ '[' -d /etc/healthd ']'
++ /opt/elasticbeanstalk/bin/get-config optionsettings --namespace aws:elasticbeanstalk:container:nodejs --option-name ProxyServer
+ PROXY_SERVER=nginx
+ case "$PROXY_SERVER" in
+ /opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy nginx
+ /opt/elasticbeanstalk/bin/healthd-track-pidfile --name application --location /var/run/nodejs.pid
[2017-02-20T04:10:25.794Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/70restart_healthd.sh] : Starting activity...
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook/70restart_healthd.sh] : Completed activity. Result:
+ '[' -d /etc/healthd ']'
++ /opt/elasticbeanstalk/bin/get-config optionsettings --namespace aws:elasticbeanstalk:container:nodejs --option-name ProxyServer
+ PROXY_SERVER=nginx
+ '[' -f /var/elasticbeanstalk/healthd/current_proxy_server ']'
+ CURRENT_PROXY_SERVER=nginx
+ '[' nginx '!=' nginx ']'
+ echo nginx
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployEnactHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployPostHook] : Starting activity...
[2017-02-20T04:10:25.988Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/AppDeployPostHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/PostInitHook] : Starting activity...
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1/PostInitHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/postinit.
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/StartupStage1] : Completed activity. Result:
Application deployment - Command CMD-Startup stage 1 completed
[2017-02-20T04:10:25.989Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter] : Starting activity...
[2017-02-20T04:10:25.990Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation] : Starting activity...
[2017-02-20T04:10:25.990Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2017-02-20T04:10:26.163Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
Disabled forced hourly log rotation.
[2017-02-20T04:10:26.164Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2017-02-20T04:10:26.164Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent] : Starting activity...
[2017-02-20T04:10:26.164Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent/10-config.sh] : Starting activity...
[2017-02-20T04:10:26.426Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent/10-config.sh] : Completed activity. Result:
Log streaming option setting is not specified, ignore cloudwatch logs setup.
Disabled log streaming.
[2017-02-20T04:10:26.427Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter/ConfigCWLAgent] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logstreaming/hooks/config.
[2017-02-20T04:10:26.427Z] INFO [2036] - [Application deployment Sample Application#1/AddonsAfter] : Completed activity.
[2017-02-20T04:10:26.427Z] INFO [2036] - [Application deployment Sample Application#1] : Completed activity. Result:
Application deployment - Command CMD-Startup succeeded
[2017-02-20T04:32:43.707Z] INFO [3166] - [CMD-TailLogs] : Starting activity...
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/TailLogs] : Starting activity...
[2017-02-20T04:32:43.708Z] INFO [3166] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
-------------------------------------
/var/log/nginx/access.log
-------------------------------------
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
[2017-02-20T04:09:21.232Z] INFO [1745] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:09:21.234Z] INFO [1745] : Updating Command definition of addon logpublish.
[2017-02-20T04:09:21.234Z] INFO [1745] : Updating Command definition of addon logstreaming.
[2017-02-20T04:09:21.234Z] DEBUG [1745] : Retrieving metadata for key: AWS::CloudFormation::Init||Infra-WriteApplication2||files..
[2017-02-20T04:09:21.237Z] DEBUG [1745] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||ManifestFileS3Key..
[2017-02-20T04:09:21.531Z] INFO [1745] : Finding latest manifest from bucket 'elasticbeanstalk-us-west-2-648812771825' with prefix 'resources/environments/e-evnmznnmnr/_runtime/versions/manifest_'.
[2017-02-20T04:09:21.827Z] INFO [1745] : Found manifest with key 'resources/environments/e-evnmznnmnr/_runtime/versions/manifest_1487563665867'.
[2017-02-20T04:09:21.839Z] INFO [1745] : Updated manifest cache: deployment ID 1 and serial 1.
[2017-02-20T04:09:21.840Z] DEBUG [1745] : Loaded definition of Command CMD-PreInit.
[2017-02-20T04:09:21.840Z] INFO [1745] : Executing Initialization
[2017-02-20T04:09:21.841Z] INFO [1745] : Executing command: CMD-PreInit...
[2017-02-20T04:09:21.841Z] INFO [1745] : Executing command CMD-PreInit activities...
[2017-02-20T04:09:21.841Z] DEBUG [1745] : Setting environment variables..
[2017-02-20T04:09:21.841Z] INFO [1745] : Running AddonsBefore for command CMD-PreInit...
[2017-02-20T04:09:21.841Z] DEBUG [1745] : Running stages of Command CMD-PreInit from stage 0 to stage 0...
[2017-02-20T04:09:21.841Z] INFO [1745] : Running stage 0 of command CMD-PreInit...
[2017-02-20T04:09:21.841Z] DEBUG [1745] : Loaded 3 actions for stage 0.
[2017-02-20T04:09:21.841Z] INFO [1745] : Running 1 of 3 actions: InfraWriteConfig...
[2017-02-20T04:09:21.846Z] INFO [1745] : Running 2 of 3 actions: DownloadSourceBundle...
[2017-02-20T04:09:22.518Z] INFO [1745] : Running 3 of 3 actions: PreInitHook...
[2017-02-20T04:09:28.779Z] INFO [1745] : Running AddonsAfter for command CMD-PreInit...
[2017-02-20T04:09:39.489Z] INFO [1745] : Command CMD-PreInit succeeded!
[2017-02-20T04:09:39.490Z] INFO [1745] : Command processor returning results:
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-02-20T04:09:57.958Z] DEBUG [2036] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:09:57.959Z] DEBUG [2036] : Checking if the command processor should execute...
[2017-02-20T04:09:57.961Z] DEBUG [2036] : Checking whether the command is applicable to instance (i-06a18c392aa73327c)..
[2017-02-20T04:09:57.961Z] INFO [2036] : Command is applicable to this instance (i-06a18c392aa73327c)..
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Checking if the received command stage is valid..
[2017-02-20T04:09:57.962Z] INFO [2036] : No stage_num in command. Valid stage..
[2017-02-20T04:09:57.962Z] INFO [2036] : Received command CMD-Startup: {"execution_data":"{\"leader_election\":\"true\"}","instance_ids":["i-06a18c392aa73327c"],"command_name":"CMD-Startup","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"1e9fb2c8-f722-11e6-a999-2d00f4179ab5","command_timeout":"600"}
[2017-02-20T04:09:57.962Z] INFO [2036] : Command processor should execute command.
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Storing current stage..
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Stage_num does not exist. Not saving null stage. Returning..
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:09:57.962Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-02-20T04:09:57.963Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-02-20T04:09:57.964Z] INFO [2036] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:09:57.966Z] INFO [2036] : Updating Command definition of addon logpublish.
[2017-02-20T04:09:57.966Z] INFO [2036] : Updating Command definition of addon logstreaming.
[2017-02-20T04:09:57.967Z] DEBUG [2036] : Refreshing metadata...
[2017-02-20T04:09:58.389Z] DEBUG [2036] : Refreshed environment metadata.
[2017-02-20T04:09:58.389Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-02-20T04:09:58.390Z] DEBUG [2036] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-02-20T04:09:58.392Z] INFO [2036] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:09:58.394Z] INFO [2036] : Updating Command definition of addon logpublish.
[2017-02-20T04:09:58.394Z] INFO [2036] : Updating Command definition of addon logstreaming.
[2017-02-20T04:09:58.394Z] DEBUG [2036] : Loaded definition of Command CMD-Startup.
[2017-02-20T04:09:58.395Z] INFO [2036] : Executing Application deployment
[2017-02-20T04:09:58.397Z] INFO [2036] : Executing command: CMD-Startup...
[2017-02-20T04:09:58.397Z] INFO [2036] : Executing command CMD-Startup activities...
[2017-02-20T04:09:58.397Z] DEBUG [2036] : Setting environment variables..
[2017-02-20T04:09:58.397Z] INFO [2036] : Running AddonsBefore for command CMD-Startup...
[2017-02-20T04:09:58.397Z] DEBUG [2036] : Running stages of Command CMD-Startup from stage 0 to stage 1...
[2017-02-20T04:09:58.397Z] INFO [2036] : Running stage 0 of command CMD-Startup...
[2017-02-20T04:09:58.397Z] INFO [2036] : Running leader election...
[2017-02-20T04:09:58.818Z] INFO [2036] : Instance is Leader.
[2017-02-20T04:09:58.818Z] DEBUG [2036] : Loaded 7 actions for stage 0.
[2017-02-20T04:09:58.818Z] INFO [2036] : Running 1 of 7 actions: HealthdLogRotation...
[2017-02-20T04:09:58.830Z] INFO [2036] : Running 2 of 7 actions: HealthdHTTPDLogging...
[2017-02-20T04:09:58.831Z] INFO [2036] : Running 3 of 7 actions: HealthdNginxLogging...
[2017-02-20T04:09:58.832Z] INFO [2036] : Running 4 of 7 actions: EbExtensionPreBuild...
[2017-02-20T04:09:59.345Z] INFO [2036] : Running 5 of 7 actions: AppDeployPreHook...
[2017-02-20T04:10:15.101Z] INFO [2036] : Running 6 of 7 actions: EbExtensionPostBuild...
[2017-02-20T04:10:15.598Z] INFO [2036] : Running 7 of 7 actions: InfraCleanEbExtension...
[2017-02-20T04:10:15.602Z] INFO [2036] : Running stage 1 of command CMD-Startup...
[2017-02-20T04:10:15.602Z] DEBUG [2036] : Loaded 3 actions for stage 1.
[2017-02-20T04:10:15.602Z] INFO [2036] : Running 1 of 3 actions: AppDeployEnactHook...
[2017-02-20T04:10:25.988Z] INFO [2036] : Running 2 of 3 actions: AppDeployPostHook...
[2017-02-20T04:10:25.989Z] INFO [2036] : Running 3 of 3 actions: PostInitHook...
[2017-02-20T04:10:25.989Z] INFO [2036] : Running AddonsAfter for command CMD-Startup...
[2017-02-20T04:10:26.427Z] INFO [2036] : Command CMD-Startup succeeded!
[2017-02-20T04:10:26.428Z] INFO [2036] : Command processor returning results:
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-02-20T04:32:43.697Z] DEBUG [3166] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:32:43.698Z] DEBUG [3166] : Checking if the command processor should execute...
[2017-02-20T04:32:43.701Z] DEBUG [3166] : Checking whether the command is applicable to instance (i-06a18c392aa73327c)..
[2017-02-20T04:32:43.701Z] INFO [3166] : Command is applicable to this instance (i-06a18c392aa73327c)..
[2017-02-20T04:32:43.701Z] DEBUG [3166] : Checking if the received command stage is valid..
[2017-02-20T04:32:43.702Z] INFO [3166] : No stage_num in command. Valid stage..
[2017-02-20T04:32:43.702Z] INFO [3166] : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"ASIAIYTXAC25BPPMVRGA\",\"signature\":\"jc+aHFw1y\\\/O+07rVpCPEOKb3iTs=\",\"security_token\":\"FQoDYXdzEIb\\\/\\\/\\\/\\\/\\\/\\\/\\\/\\\/\\\/\\\/wEaDF\\\/k05drb1Y6NjfahyLIA5LxJEqXbliFnvfjnLiC9aIBKhPQkJCScp3L2\\\/TE\\\/nSgOw1VTAIgBG0rMbJ5F2+RPz\\\/cFwEyKd\\\/KuCAxbdcyGUGX+foJiahX2ZxFeaJQaNwBP63+YAzhOELoy\\\/CkPHSwQf8JbFdeytNUyc73Ce6fvpXavwcgbbkL+IHyg26ldGyBG42Evb9AHBMrSmPpuK2a\\\/KuHK\\\/q5ccZQC+qm67kBTriQi2VLALGuvrGZy\\\/tydSU2VsqGflvAoPZ3j\\\/+PVXVnmDGuZHYgvr+5ZbAbo1wlvCbgf+IxmR6VrURU40XVUUewgAEWVCwg04mKMlKj343eceVfI9dtEHYyjXKjKv\\\/xT3RUl0ksiYRtPV8RuDgr2BDPEMsImFXkGSCUMIyBWTwjYXARNcFfQZLZuMvEU2yC4P6nkHbWKw23DOPtxng0rES6Yzsm5G5Fvgb4+HUEl+Mu7YUJWt\\\/IQCDejXN9wUTIlo1JdGplZGjfXMCrhJQnQBXD\\\/qKksyufnY\\\/jyDC4GNCkHQEGmgFWntBeZVYhZftCrQDBy0F8PA7V\\\/D9iJvm9eJ1N29ZcdVM62m6NT4k+Hv5iFlDaSoeCSs9bGbay6I1ObbjKKSxvdtkHriigp6nFBQ==\",\"policy\":\"eyJleHBpcmF0aW9uIjoiMjAxNy0wMi0yMFQwNTowMjo0Mi4yNloiLCJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLXRpbWVfc3RhbXAiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtcHVibGlzaF9tZWNoYW5pc20iLCIiXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInJlc291cmNlc1wvZW52aXJvbm1lbnRzXC9sb2dzXC8iXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtYmF0Y2hfaWQiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtZmlsZV9uYW1lIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1zZWN1cml0eS10b2tlbiIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0sWyJlcSIsIiRidWNrZXQiLCJlbGFzdGljYmVhbnN0YWxrLXVzLXdlc3QtMi02NDg4MTI3NzE4MjUiXSxbImVxIiwiJGFjbCIsInByaXZhdGUiXV19\"}","instance_ids":["i-06a18c392aa73327c"],"data":"9e0cfab0-f725-11e6-8f0e-9f392d16cbe4","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"9e0cfab0-f725-11e6-8f0e-9f392d16cbe4","command_timeout":"600"}
[2017-02-20T04:32:43.702Z] INFO [3166] : Command processor should execute command.
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Storing current stage..
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Stage_num does not exist. Not saving null stage. Returning..
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-02-20T04:32:43.702Z] DEBUG [3166] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-02-20T04:32:43.703Z] DEBUG [3166] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-02-20T04:32:43.704Z] INFO [3166] : Found enabled addons: ["logpublish", "logstreaming"].
[2017-02-20T04:32:43.706Z] INFO [3166] : Updating Command definition of addon logpublish.
[2017-02-20T04:32:43.706Z] INFO [3166] : Updating Command definition of addon logstreaming.
[2017-02-20T04:32:43.707Z] DEBUG [3166] : Loaded definition of Command CMD-TailLogs.
[2017-02-20T04:32:43.707Z] INFO [3166] : Executing CMD-TailLogs
[2017-02-20T04:32:43.707Z] INFO [3166] : Executing command: CMD-TailLogs...
[2017-02-20T04:32:43.708Z] INFO [3166] : Executing command CMD-TailLogs activities...
[2017-02-20T04:32:43.708Z] DEBUG [3166] : Setting environment variables..
[2017-02-20T04:32:43.708Z] INFO [3166] : Running AddonsBefore for command CMD-TailLogs...
[2017-02-20T04:32:43.708Z] DEBUG [3166] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2017-02-20T04:32:43.708Z] INFO [3166] : Running stage 0 of command CMD-TailLogs...
[2017-02-20T04:32:43.708Z] DEBUG [3166] : Loaded 1 actions for stage 0.
[2017-02-20T04:32:43.708Z] INFO [3166] : Running 1 of 1 actions: TailLogs...