Error 404 when deploying using Beanstalk

Asked

Viewed 25 times

1

When deploying the application, it is online, but when clicking on the link

environmente.mf6j6us2wp.sa-east-1.elasticbeanstalk.com

which was generated by Beanstalk, from error 404. But if you put at the end of the link /index.xhtml, open the application normally, as below:

environment.mf6j6us2wp.sa-east-1.elasticbeanstalk.com/index.xhtml

follow the log generated in the Beanstalk console:

/var/log/eb-commandprocessor.log
-------------------------------------
[2017-10-27T12:10:13.490Z] DEBUG [1782]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||ManifestFileS3Key..
[2017-10-27T12:10:13.859Z] INFO  [1782]  : Finding latest manifest from bucket 'elasticbeanstalk-sa-east-1-102555464856' with prefix 'resources/environments/e-wv9krgyjpr/_runtime/versions/manifest_'.
[2017-10-27T12:10:14.072Z] INFO  [1782]  : Found manifest with key 'resources/environments/e-wv9krgyjpr/_runtime/versions/manifest_1509106134330'.
[2017-10-27T12:10:14.094Z] INFO  [1782]  : Updated manifest cache: deployment ID 1 and serial 1.
[2017-10-27T12:10:14.094Z] DEBUG [1782]  : Loaded definition of Command CMD-PreInit.
[2017-10-27T12:10:14.095Z] INFO  [1782]  : Executing Initialization
[2017-10-27T12:10:14.095Z] INFO  [1782]  : Executing command: CMD-PreInit...
[2017-10-27T12:10:14.095Z] INFO  [1782]  : Executing command CMD-PreInit activities...
[2017-10-27T12:10:14.095Z] DEBUG [1782]  : Setting environment variables..
[2017-10-27T12:10:14.096Z] INFO  [1782]  : Running AddonsBefore for command CMD-PreInit...
[2017-10-27T12:10:20.388Z] DEBUG [1782]  : Running stages of Command CMD-PreInit from stage 0 to stage 0...
[2017-10-27T12:10:20.388Z] INFO  [1782]  : Running stage 0 of command CMD-PreInit...
[2017-10-27T12:10:20.388Z] DEBUG [1782]  : Loaded 2 actions for stage 0.
[2017-10-27T12:10:20.388Z] INFO  [1782]  : Running 1 of 2 actions: DownloadSourceBundle...
[2017-10-27T12:10:27.567Z] INFO  [1782]  : Running 2 of 2 actions: PreInitHook...
[2017-10-27T12:10:29.526Z] INFO  [1782]  : Running AddonsAfter for command CMD-PreInit...
[2017-10-27T12:10:29.527Z] INFO  [1782]  : Command CMD-PreInit succeeded!
[2017-10-27T12:10:29.527Z] INFO  [1782]  : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-10-27T12:10:50.477Z] DEBUG [2021]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-10-27T12:10:50.477Z] DEBUG [2021]  : Checking if the command processor should execute...
[2017-10-27T12:10:50.481Z] DEBUG [2021]  : Checking whether the command is applicable to instance (i-00a4deef63bbba0e4)..
[2017-10-27T12:10:50.481Z] INFO  [2021]  : Command is applicable to this instance (i-00a4deef63bbba0e4)..
[2017-10-27T12:10:50.481Z] DEBUG [2021]  : Checking if the received command stage is valid..
[2017-10-27T12:10:50.481Z] INFO  [2021]  : No stage_num in command. Valid stage..
[2017-10-27T12:10:50.482Z] INFO  [2021]  : Received command CMD-Startup: {"execution_data":"{\"leader_election\":\"true\"}","instance_ids":["i-00a4deef63bbba0e4"],"command_name":"CMD-Startup","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"2f36a1a0-98c6-4690-aecd-99c15fedd01e"}
[2017-10-27T12:10:50.482Z] INFO  [2021]  : Command processor should execute command.
[2017-10-27T12:10:50.482Z] DEBUG [2021]  : Storing current stage..
[2017-10-27T12:10:50.482Z] DEBUG [2021]  : Stage_num does not exist. Not saving null stage. Returning..
[2017-10-27T12:10:50.482Z] DEBUG [2021]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-10-27T12:10:50.482Z] DEBUG [2021]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-10-27T12:10:50.483Z] DEBUG [2021]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-10-27T12:10:50.484Z] INFO  [2021]  : Found enabled addons: ["logstreaming", "logpublish"].
[2017-10-27T12:10:50.486Z] INFO  [2021]  : Updating Command definition of addon logstreaming.
[2017-10-27T12:10:50.486Z] INFO  [2021]  : Updating Command definition of addon logpublish.
[2017-10-27T12:10:50.487Z] DEBUG [2021]  : Refreshing metadata...
[2017-10-27T12:10:50.964Z] DEBUG [2021]  : Refreshed environment metadata.
[2017-10-27T12:10:50.965Z] INFO  [2021]  : Recreated directory /opt/elasticbeanstalk/deploy/configuration/.
[2017-10-27T12:10:50.965Z] DEBUG [2021]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_AppSourceUrlFileContent||url..
[2017-10-27T12:10:50.967Z] INFO  [2021]  : Created appsource url file at /opt/elasticbeanstalk/deploy/configuration/appsourceurl.
[2017-10-27T12:10:50.967Z] DEBUG [2021]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent..
[2017-10-27T12:10:50.969Z] INFO  [2021]  : Created container config file at /opt/elasticbeanstalk/deploy/configuration/containerconfiguration.
[2017-10-27T12:10:50.969Z] DEBUG [2021]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-10-27T12:10:50.971Z] DEBUG [2021]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-10-27T12:10:50.973Z] INFO  [2021]  : Found enabled addons: ["logstreaming", "logpublish"].
[2017-10-27T12:10:50.975Z] INFO  [2021]  : Updating Command definition of addon logstreaming.
[2017-10-27T12:10:50.975Z] INFO  [2021]  : Updating Command definition of addon logpublish.
[2017-10-27T12:10:50.975Z] DEBUG [2021]  : Loaded definition of Command CMD-Startup.
[2017-10-27T12:10:50.977Z] INFO  [2021]  : Executing Application deployment
[2017-10-27T12:10:50.978Z] INFO  [2021]  : Executing command: CMD-Startup...
[2017-10-27T12:10:50.978Z] INFO  [2021]  : Executing command CMD-Startup activities...
[2017-10-27T12:10:50.978Z] DEBUG [2021]  : Setting environment variables..
[2017-10-27T12:10:50.978Z] INFO  [2021]  : Running AddonsBefore for command CMD-Startup...
[2017-10-27T12:10:51.270Z] DEBUG [2021]  : Running stages of Command CMD-Startup from stage 0 to stage 1...
[2017-10-27T12:10:51.270Z] INFO  [2021]  : Running stage 0 of command CMD-Startup...
[2017-10-27T12:10:51.270Z] INFO  [2021]  : Running leader election...
[2017-10-27T12:10:51.756Z] INFO  [2021]  : Instance is Leader.
[2017-10-27T12:10:51.757Z] DEBUG [2021]  : Loaded 7 actions for stage 0.
[2017-10-27T12:10:51.757Z] INFO  [2021]  : Running 1 of 7 actions: HealthdLogRotation...
[2017-10-27T12:10:51.776Z] INFO  [2021]  : Running 2 of 7 actions: HealthdHTTPDLogging...
[2017-10-27T12:10:51.778Z] INFO  [2021]  : Running 3 of 7 actions: HealthdNginxLogging...
[2017-10-27T12:10:51.779Z] INFO  [2021]  : Running 4 of 7 actions: EbExtensionPreBuild...
[2017-10-27T12:10:52.283Z] INFO  [2021]  : Running 5 of 7 actions: AppDeployPreHook...
[2017-10-27T12:11:01.574Z] INFO  [2021]  : Running 6 of 7 actions: EbExtensionPostBuild...
[2017-10-27T12:11:02.127Z] INFO  [2021]  : Running 7 of 7 actions: InfraCleanEbExtension...
[2017-10-27T12:11:02.134Z] INFO  [2021]  : Running stage 1 of command CMD-Startup...
[2017-10-27T12:11:02.134Z] DEBUG [2021]  : Loaded 3 actions for stage 1.
[2017-10-27T12:11:02.134Z] INFO  [2021]  : Running 1 of 3 actions: AppDeployEnactHook...
[2017-10-27T12:11:17.950Z] INFO  [2021]  : Running 2 of 3 actions: AppDeployPostHook...
[2017-10-27T12:11:18.530Z] INFO  [2021]  : Running 3 of 3 actions: PostInitHook...
[2017-10-27T12:11:18.737Z] INFO  [2021]  : Running AddonsAfter for command CMD-Startup...
[2017-10-27T12:11:19.523Z] INFO  [2021]  : Command CMD-Startup succeeded!
[2017-10-27T12:11:19.524Z] INFO  [2021]  : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2017-10-27T12:28:39.318Z] DEBUG [3258]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-10-27T12:28:39.321Z] DEBUG [3258]  : Checking if the command processor should execute...
[2017-10-27T12:28:39.324Z] DEBUG [3258]  : Checking whether the command is applicable to instance (i-00a4deef63bbba0e4)..
[2017-10-27T12:28:39.324Z] INFO  [3258]  : Command is applicable to this instance (i-00a4deef63bbba0e4)..
[2017-10-27T12:28:39.324Z] DEBUG [3258]  : Checking if the received command stage is valid..
[2017-10-27T12:28:39.324Z] INFO  [3258]  : No stage_num in command. Valid stage..
[2017-10-27T12:28:39.324Z] INFO  [3258]  : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"xxxxxxxxxxx\",\"signature\":\"gIxEblI7GwIUbJ2pWo0HRiI5sH8=\",\"security_token\":\"FQoDYXdzEHYaDCh96MlWE3wjzF\\\/X3CKpA+TFjob2x4OkncuXPxpYH7HIC3GH532FSdCqOJPYzCTjEifqu3O\\\/g7ycm60ahUWJxkHPMDfxiZOaFT3d9TO\\\/C4NVZxPvwM\\\/bq88Pj9sXALTdfDypA+Un3tMv7ZHcFcpMuOBjsGu1j\\\/txRbVSnE44mpoB7aB2vJ\\\/Bs6k5auDCdsUFUNHBaiAxxPZJ1L7Jz11ekNrhEEbBZlTOOjuVU0x7VJHVv5eGYzbvq8S3Xq\\\/A1EYRJAhCjxAtCgM7fVAqxFmXIKyCk8ELaOP0CB2MdkLFKxV5pIktQN4bKx0FZffBO+s5ZwSD1yCARYmRqdC7gujxRqECWeiANAOj7Moxy36uWq3fr\\\/26D3tYGHnqes2ElmQ\\\/4vfi\\\/S1okQlkqii8+KLyc2a2uY1SJRm9qm5mwf\\\/xxjPJuiBXVnOynORF2ew7xS1jL3FxfSO6Hb5zYJsDuf4AUYPOlr+O+gfp1G8f+rhIot2k\\\/niO4whERh7szPnDgV5zJZq7jZnCxeM5vPZSn2jrtlStUhBhKPTMzM8F|MTg3LjU5LjE3LjE3NQ==\",\"policy\":\"eyJleHBpcmF0aW9uIjoiMjAxNy0xMC0yN1QxMjo1ODozNy44OFoiLCJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLXRpbWVfc3RhbXAiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtcHVibGlzaF9tZWNoYW5pc20iLCIiXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInJlc291cmNlc1wvZW52aXJvbm1lbnRzXC9sb2dzXC8iXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtYmF0Y2hfaWQiLCIiXSxbInN0YXJ0cy13aXRoIiwiJHgtYW16LW1ldGEtZmlsZV9uYW1lIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1zZWN1cml0eS10b2tlbiIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0sWyJlcSIsIiRidWNrZXQiLCJlbGFzdGljYmVhbnN0YWxrLXNhLWVhc3QtMS0xMDI1NTU0NjQ4NTYiXSxbImVxIiwiJGFjbCIsInByaXZhdGUiXV19\"}","instance_ids":["i-00a4deef63bbba0e4"],"data":"10ac3fe1-20d8-44b3-8262-5f16a1ac8284","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"10ac3fe1-20d8-44b3-8262-5f16a1ac8284"}
[2017-10-27T12:28:39.325Z] INFO  [3258]  : Command processor should execute command.
[2017-10-27T12:28:39.325Z] DEBUG [3258]  : Storing current stage..
[2017-10-27T12:28:39.325Z] DEBUG [3258]  : Stage_num does not exist. Not saving null stage. Returning..
[2017-10-27T12:28:39.325Z] DEBUG [3258]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2017-10-27T12:28:39.325Z] DEBUG [3258]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2017-10-27T12:28:39.334Z] DEBUG [3258]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2017-10-27T12:28:39.335Z] INFO  [3258]  : Found enabled addons: ["logstreaming", "logpublish"].
[2017-10-27T12:28:39.338Z] INFO  [3258]  : Updating Command definition of addon logstreaming.
[2017-10-27T12:28:39.338Z] INFO  [3258]  : Updating Command definition of addon logpublish.
[2017-10-27T12:28:39.339Z] DEBUG [3258]  : Loaded definition of Command CMD-TailLogs.
[2017-10-27T12:28:39.340Z] INFO  [3258]  : Executing CMD-TailLogs
[2017-10-27T12:28:39.342Z] INFO  [3258]  : Executing command: CMD-TailLogs...
[2017-10-27T12:28:39.342Z] INFO  [3258]  : Executing command CMD-TailLogs activities...
[2017-10-27T12:28:39.342Z] DEBUG [3258]  : Setting environment variables..
[2017-10-27T12:28:39.342Z] INFO  [3258]  : Running AddonsBefore for command CMD-TailLogs...
[2017-10-27T12:28:39.342Z] DEBUG [3258]  : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2017-10-27T12:28:39.342Z] INFO  [3258]  : Running stage 0 of command CMD-TailLogs...
[2017-10-27T12:28:39.342Z] DEBUG [3258]  : Loaded 1 actions for stage 0.
[2017-10-27T12:28:39.342Z] INFO  [3258]  : Running 1 of 1 actions: TailLogs...

Thank you very much if someone can give me a suggestion to solve the problem.

  • Only this error is shown in the logs? Post the full stacktrace if you have

  • Select the log and click control+ k to format

  • Hello Marquezani, thanks for responding, I changed the post and inserted stacktrace, even because the previous one was wrong, I was picking up the log of the booting of Tomcat.

1 answer

0

Problem solved, this configuration was missing on web.xml:

<welcome-file-list>
  <welcome-file>login.xhtml</welcome-file>
 </welcome-file-list>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.