admin管理员组文章数量:1208155
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
本文标签: aspnet web apiNET App w React Deployed to ElasticBeanstalk App never startsStack Overflow
版权声明:本文标题:asp.net web api - .NET App w React Deployed to ElasticBeanstalk. App never starts - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738688672a2106973.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论