我得到了一个在 Linux Docker 容器中运行的 .NET Core 项目来进行构建,在 docker 配置方面似乎一切正常,但是当我运行以下命令时:dotnet publish -c Release -o out,我收到下面的 SSL 身份验证错误。
The SSL connection could not be established, see inner exception. Authentication failed because the remote party has closed the transport stream.
我做了我的研究,显然我失踪了:
ASPNET 的环境变量 Kestrel(根据https://github.com/aspnet/AspNetCore.Docs/issues/6199),我将其添加到我docker-compose的 .
开发人员 .pfx 证书,因此我docker-compose使用 Kestrel 路径更新了证书文件,如下所示。
version: '3'
services:
netcore:
container_name: test_alerting_comp
tty: true
stdin_open: true
image: alerting_netcore
environment:
- http_proxy=http://someproxy:8080
- https_proxy=http://someproxy:8080
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+;http://+
- ASPNETCORE_HTTPS_PORT=443
- ASPNETCORE_Kestrel__Certificates__Default__Password="ABC" …Run Code Online (Sandbox Code Playgroud) 我想每天停止我的 ECS Fargate 测试环境,对我来说最好的选择就是修改 ECS 服务,将期望计数设置为零,如下所示aws ecs update-service --cluster COOL --service blablabla --desired-count 0,这样任何运行的任务都会在几分钟内耗尽,如果我有的话,它就可以正常工作不是自动缩放。
当 ECS 服务具有 Auto Scaling 时,问题就会开始,如下图所示,min 1如果desired 1我max 3使用上面的 AWS CLI 命令,服务会在一分钟左右后重置为 1,并且不会执行任何任务由于 Auto Scaling 具有desired 1.
如果我手动编辑 ECS 服务并设置desired 0服务和 Auto Scaling(当然min 0也包括 Auto Scaling),我可以停止任何正在运行的任务。
我尝试使用下面的命令进行自动缩放,希望我可以更改desired但它不可用。
aws application-autoscaling register-scalable-target \
--service-namespace ecs \
--scalable-dimension ecs:service:DesiredCount \
--resource-id service/COOL/blablabla \
--min-capacity 1 \
--max-capacity 3
Run Code Online (Sandbox Code Playgroud)
我一直在想,也许有一种方法可以做到这一点,就是通过 AWS CLI 删除 Auto …
我想在 Linux 的 Tomcat 上配置一个简单的运行状况检查,例如:http://localhost:8080/health
我一直在检查Tomcat文档,我发现这个内置服务器状态站点 /manager/status/all,它确实有很多信息,但要求我登录那里,所以如果我执行“curl”则没有用,因为它不会检索任何 HTTP 响应。
我希望使用这样的内容:http://localhost:8080/health,它返回一个 HTTP 响应,即 200,这样我就可以将此 url 添加到我的监控工具中,以显示当前状态。
我运行这个命令:aws iam list-users,我得到一个用户列表,但没有列出权限(意味着如果有人是 root,或者 s3fullaccess 等等)。
我运行另一个命令:aws iam list-user-policies --user-name xxxxx,我得到以下结果为空:
{
"PolicyNames": []
}
Run Code Online (Sandbox Code Playgroud)
我需要哪个命令或什么命令组合来显示所有用户及其各自的权限?,谢谢。
我将我的nginx实例移至Docker容器,我想监视该容器(或其中的服务),并能够启动新容器,以防服务器重启或其他任何问题。
到目前为止,我监视容器中的nginx服务所做的工作就是在consul中添加了运行状况检查,这很好(我对consul的服务发现有所了解,不确定是那样),但是如果容器停止时,我需要一些帮助我启动新容器的方法。
我没有docker-swarm,kubernetes或其他类似的Orchestrator解决方案,但我正在考虑使用一些脚本来使用command docker run -d -p 80:80 -p 1090:1090 -v /etc/nginx/conf.d:/etc/nginx/conf.d nginx。
任何想法和建议都欢迎,谢谢。
containers ×2
docker ×2
.net-core ×1
amazon-ecs ×1
aws-cli ×1
aws-fargate ×1
linux ×1
monitoring ×1
nginx ×1
nuget ×1
status ×1
tomcat ×1