简体   繁体   English

无法在弹性 beantalk 中运行后台应用程序

[英]Failed to run a background application in elastic beanstalk

I have an ASP.Net core web application which I am publishing to AWS using Elastic beanstalk.我有一个 ASP.Net 核心 web 应用程序,我正在使用 Elastic beanstalk 将其发布到 AWS。

The requirement is, I have to run another C++ application (app.exe), on click of a button in Home page.要求是,我必须在主页上单击一个按钮时运行另一个 C++ 应用程序 (app.exe)。 The C++ application will do all the background processing. C++ 应用程序将执行所有后台处理。

So, I attached my app.exe and it's dependencies to web application, and copying them as part of the build.因此,我将我的 app.exe 及其依赖项附加到 web 应用程序,并将它们作为构建的一部分进行复制。

On clicking the elastic beanstalk weblink, I can see my Home page with the button to run the application.单击 elastic beantalk 网络链接后,我可以看到我的主页,其中包含用于运行该应用程序的按钮。 But when I click the button, my app.exe is not running.但是当我点击按钮时,我的 app.exe 没有运行。

Below is the error I can see in elastic beanstalk logs下面是我在弹性 beantalk 日志中看到的错误

Exception code: 0xc0000409
Fault offset: 0x000000000006e77e
Faulting process id: 0x1b98
Faulting application start time: 0x01d840589d9b287d
Faulting application path: C:\inetpub\AspNetCoreWebApps\app\test\app.exe
Faulting module path: C:\Windows\System32\ucrtbase.dll

To dig furthur, I enabled the RDP on elastic beanstalk instance and connected to it.If run the application (app.exe) from command prompt, it is running fine.为了进一步挖掘,我在弹性 beantalk 实例上启用了 RDP 并连接到它。如果从命令提示符运行应用程序 (app.exe),它运行良好。

As per another threads suggestion, also set Process.StartInfo.RedirectStandardOutput = true still the same.根据另一个线程的建议,还设置Process.StartInfo.RedirectStandardOutput = true仍然相同。

Any suggestion please.. Thanks in advance.请提出任何建议.. 在此先感谢。

I spent a lot of time to find the answer, thinking issue is related running an application from unsecured.network, so enabled HTTPS on port 443, also created SSL certificate using OpenSSL, and imported to AWS Certificate Manager which is added to Elastic beanstalk load balancer.我花了很多时间来寻找答案,认为问题与从 unsecured.network 运行应用程序有关,因此在端口 443 上启用了 HTTPS,还使用 OpenSSL 创建了 SSL 证书,并导入到添加到 Elastic beanstalk 负载的 AWS Certificate Manager平衡器。 But still ended with the same.但还是以同样的方式结束。

Finally, came to know that, my background application(app.exe) I am running doesn't have permissions to save the files downloading from S3 to the folder it is running from.最后,我知道,我正在运行的后台应用程序 (app.exe) 没有权限将从 S3 下载的文件保存到它正在运行的文件夹中。 Once I redirected the files location to a manually created folder as part of.ebextensions, it's solved.一旦我将文件位置重定向到手动创建的文件夹作为 .ebextensions 的一部分,它就解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Elastic Beanstalk 部署的应用程序上的 Elastic IP - Elastic IP on application deployed using Elastic Beanstalk 在 Elastic Beanstalk 环境中运行 Rails rake 任务 - Run Rails rake task in Elastic Beanstalk environment 在一个应用程序 Elastic Beanstalk 中测试和生产版本? - Test and Prod Version in One Application Elastic Beanstalk? npm 在 AWS Elastic Beanstalk 上运行生产失败 - npm run production failing on AWS Elastic Beanstalk Github 动作将 django 应用程序部署到弹性 beanstalk - Github actions deploy django application to elastic beanstalk Flask 应用程序未在 AWS elastic beanstalk 上部署 - Flask Application is not getting deployed at AWS elastic beanstalk 带有 HTTPS 的 Elastic Beanstalk 应用程序上的 502 Bad Gateway - 502 Bad Gateway on Elastic Beanstalk application with HTTPS 无法使用已安装的弹性文件系统部署 Elastic Beanstalk 应用程序 - Unable to deploy Elastic Beanstalk Application with mounted Elastic File System 如何安排 Python 脚本在每天的特定时间运行,并使其成为 AWS Elastic Beanstalk 应用程序 zip 文件的一部分? - How can I schedule a Python script to run at a particular time every day, and make it a part of AWS Elastic Beanstalk application zip file? 将 Laravel 部署到 Elastic Beanstalk:“无法打开 stream:权限被拒绝” - Deploying Laravel to Elastic Beanstalk: "failed to open stream: Permission denied"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM