I feel like I've tried everything. I have a .NET Web API that I deployed but don't seem to be able to tell if the app even started. The app is essentially a starter app that serves react AND API routes. I have a Github action that deploys my code as follows:
Build react app and move files to
wwwroot
Build and publish .NET app
Upload zip file
Download file, then runs these commands
aws s3 cp deploy-files/${{github.run_id}}.zip s3://elasticbeanstalk-us-east-1-${{ secrets.AWS_ACCOUNT_ID }}/Dashdoc-Web/Dashdoc-Web-Dev/artifact/Dashdoc.API/ aws elasticbeanstalk create-application-version --application-name ${{ secrets.ELASTIC_BEANSTALK_NAME }} --version-label ${{github.run_id}} --description ${{github.run_id}} --source-bundle S3Bucket="elasticbeanstalk-us-east-1-${{ secrets.AWS_ACCOUNT_ID }}",S3Key="Dashdoc-Web/Dashdoc-Web-Dev/artifact/Dashdoc.API/${{github.run_id}}.zip" aws elasticbeanstalk update-environment --application-name ${{ secrets.ELASTIC_BEANSTALK_NAME }} --environment-name ${{ secrets.ELASTIC_BEANSTALK_ENV_NAME }} --version-label ${{github.run_id}} aws elasticbeanstalk wait environment-updated --application-name ${{ secrets.ELASTIC_BEANSTALK_NAME }} --environment-name ${{ secrets.ELASTIC_BEANSTALK_ENV_NAME }}
The new version can be seen in EB and environment health shows as OK. However, I get a 502 when going to the site and none of the EB logs show anything related to my app (errors, startup logs, etc).
App loads fine locally and serves the react cod as well. I even added these as env variables to EB, but Still see no logs or indication that my app even started.
Logging__LogLevel__Default = Information
Logging__LogLevel__Microsoft = Information
Logging__LogLevel__Microsoft.AspNetCore = Warning
Logging__LogLevel__System = Information
I feel like I've tried everything. I have a .NET Web API that I deployed but don't seem to be able to tell if the app even started. The app is essentially a starter app that serves react AND API routes. I have a Github action that deploys my code as follows:
Build react app and move files to
wwwroot
Build and publish .NET app
Upload zip file
Download file, then runs these commands
aws s3 cp deploy-files/${{github.run_id}}.zip s3://elasticbeanstalk-us-east-1-${{ secrets.AWS_ACCOUNT_ID }}/Dashdoc-Web/Dashdoc-Web-Dev/artifact/Dashdoc.API/ aws elasticbeanstalk create-application-version --application-name ${{ secrets.ELASTIC_BEANSTALK_NAME }} --version-label ${{github.run_id}} --description ${{github.run_id}} --source-bundle S3Bucket="elasticbeanstalk-us-east-1-${{ secrets.AWS_ACCOUNT_ID }}",S3Key="Dashdoc-Web/Dashdoc-Web-Dev/artifact/Dashdoc.API/${{github.run_id}}.zip" aws elasticbeanstalk update-environment --application-name ${{ secrets.ELASTIC_BEANSTALK_NAME }} --environment-name ${{ secrets.ELASTIC_BEANSTALK_ENV_NAME }} --version-label ${{github.run_id}} aws elasticbeanstalk wait environment-updated --application-name ${{ secrets.ELASTIC_BEANSTALK_NAME }} --environment-name ${{ secrets.ELASTIC_BEANSTALK_ENV_NAME }}
The new version can be seen in EB and environment health shows as OK. However, I get a 502 when going to the site and none of the EB logs show anything related to my app (errors, startup logs, etc).
App loads fine locally and serves the react cod as well. I even added these as env variables to EB, but Still see no logs or indication that my app even started.
Logging__LogLevel__Default = Information
Logging__LogLevel__Microsoft = Information
Logging__LogLevel__Microsoft.AspNetCore = Warning
Logging__LogLevel__System = Information
Share
Improve this question
asked Jan 20 at 15:08
El_bosteadorEl_bosteador
932 silver badges6 bronze badges
1 Answer
Reset to default 0Check the log as below command:
aws elasticbeanstalk request-environment-info --environment-name ${{ secrets.ELASTIC_BEANSTALK_ENV_NAME }} --info-type tail
aws elasticbeanstalk retrieve-environment-info --environment-name ${{ secrets.ELASTIC_BEANSTALK_ENV_NAME }} --info-type tail
Check the app log:
builder.Logging.AddConsole(); Add in start up project(Startup.cs/Program.cs)
appsettings.json:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.AspNetCore": "Warning",
"System": "Information"
}
}
}
Check the Beanstalk port and app port. it should
builder.WebHost.UseUrls("http://*:8080");
Elastic Beanstalk environment configuration should match with .net version