小编Dan*_*nik的帖子

aws-vpc 容器无法访问互联网

我在 AWS ECS 集群中创建了 ECS 服务。我的容器使用 awsvpc 网络模式。该服务没有负载均衡器。

但它不能触及任何公共互联网资源。

当我转到 ECS 实例并通过 ssh 进入 docker 容器时,我无法获取任何公共资源。

root@ip-10-3-1-23:/app# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  *^C
Run Code Online (Sandbox Code Playgroud)
root@ip-10-3-1-23:/app# wget google.com
--2019-08-31 22:34:38--  http://google.com/
Resolving google.com (google.com)... 172.217.9.206, 2607:f8b0:4004:807::200e
Connecting to google.com (google.com)|172.217.9.206|:80... ^C
root@ip-10-3-1-23:/app# 
Run Code Online (Sandbox Code Playgroud)

EC2 实例安全组:

入站:

Type            Protocol        Port Range      Source                      Description
All TCP         TCP …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-ecs amazon-vpc

9
推荐指数
1
解决办法
2933
查看次数

Visual studio代码-lldb调试rust,更改项目目录

嗨我有以下状态:

Cargo Rust 项目:/Users/daniel1302/www/aws-alarm/ 工作区目录:`/Users/daniel1302/www

我有以下调试配置:

{
            "type": "lldb",
            "request": "launch",
            "name": "rust/aws-alarm",
            "cwd": "/Users/daniel1302/www/aws-alarm/",
            "cargo": {
                "args": [
                    "build",
                    "--lib"
                ],
            },
            "program": "${cargo:program}",
            "args": [],
            "env": {
                "AWS_PROFILE": "sf_MFA",
                "AWS_REGION": "us-east-1"
            },
        }
Run Code Online (Sandbox Code Playgroud)

当我开始项目调试时,我可以看到:

Running `cargo build --lib --message-format=json`...
error: could not find `Cargo.toml` in `/Users/daniel1302/www/releases` or any parent directory
Run Code Online (Sandbox Code Playgroud)

问题是,cwd 指令不会更改项目目录。

你知道如何更改货物项目目录吗?

debugging rust visual-studio-code

7
推荐指数
1
解决办法
904
查看次数