无法使用C ++ SDK创建Aws t2微实例

时间:2017-06-21 11:31:20

标签: c++ amazon-web-services amazon-ec2 aws-sdk

我是AWS新手。我编译了AWS sdk及以下程序来创建实例。我能够通过aws CLI使用 aws ec2 run-instances --image-id ami-xxxxxx --count 1 --instance-type t2.micro --security-group-ids sg-abcdefg创建实例 - key-name Keypair ,但我无法使用以下程序创建实例:

    void StartInstance(const Aws::String& instanceName, const Aws::String& ami_id)
    {
        Aws::EC2::EC2Client ec2;

        Aws::EC2::Model::RunInstancesRequest run_request;
        run_request.SetImageId(ami_id);
        run_request.SetInstanceType(Aws::EC2::Model::InstanceType::t2_micro);
        run_request.SetMinCount(1);
        run_request.SetMaxCount(1);

        auto run_outcome = ec2.RunInstances(run_request);
        if (!run_outcome.IsSuccess()) {
            std::cout << "Failed to start ec2 instance " << instanceName <<
                " based on ami " << ami_id << ":" <<
                run_outcome.GetError().GetMessage() << std::endl;
            return;
        }

        const auto& instances = run_outcome.GetResult().GetInstances();
        if (instances.size() == 0) {
            std::cout << "Failed to start ec2 instance " << instanceName <<
                " based on ami " << ami_id << ":" <<
                run_outcome.GetError().GetMessage() << std::endl;
            return;
        }

        auto instance_id = instances[0].GetInstanceId();
        Aws::EC2::Model::Tag name_tag;
        name_tag.SetKey("Name");
        name_tag.SetValue(instanceName);

        Aws::EC2::Model::CreateTagsRequest create_request;
        create_request.AddResources(instance_id);
        create_request.AddTags(name_tag);

        auto create_outcome = ec2.CreateTags(create_request);
        if (!create_outcome.IsSuccess()) {
            std::cout << "Failed to tag ec2 instance " << instance_id <<
                " with name " << instanceName << ":" <<
                create_outcome.GetError().GetMessage() << std::endl;
            return;
        }

    std::cout << "Successfully started ec2 instance " << instanceName <<
        " based on ami " << ami_id << std::endl;
}

/**
 * Creates an ec2 instance based on command line input
 */
int main(int argc, char** argv)
{
    if (argc != 3) {
        std::cout << "Usage: ec2_create_instance <instance_name> <ami_image_id>"
            << std::endl;
        return 1;
    }

    Aws::String instanceName = argv[1];
    Aws::String ami_id = argv[2];
    Aws::SDKOptions options;
    Aws::InitAPI(options);
    StartInstance(instanceName, ami_id);
    Aws::ShutdownAPI(options);
    return 0;
}

**。/ create_instance t2_instance1 ami-xxxxxxx ** 我得到的错误是 **无法根据ami ami-xxxxxx启动ec2实例t2_instance:无法连接到端点**

strace log:

`restart_syscall(<... resuming interrupted futex ...>) = -1 ETIMEDOUT (Connection timed out)
futex(0xd88d50, FUTEX_WAKE_PRIVATE, 1)  = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 1)    = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 198)  = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 1)    = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 799)  = 1 ([{fd=4, revents=POLLOUT}])
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 1 ([{fd=4, revents=POLLOUT|POLLWRNORM}])
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getpeername(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(53934), sin_addr=inet_addr("192.168.22.37")}, [16]) = 0
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
open("/usr/lib/x86_64-linux-gnu/nss/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
readlink("/usr/lib/x86_64-linux-gnu/libnss3.so", 0xe1dc70, 1023) = -1 EINVAL (Invalid argument)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
getpeername(7, 0x7ffc9c1b89a0, 0x7ffc9c1b8974) = -1 ENOTCONN (Transport endpoint is not connected)
stat("/etc/ssl/certs/ca-certificates.crt", {st_mode=S_IFREG|0644, st_size=274340, ...}) = 0
close(7)                                = 0
close(4)                                = 0
futex(0xd88d7c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 15, {1498547921, 241359171}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
futex(0xd88d50, FUTEX_WAKE_PRIVATE, 1)  = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 1)    = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 198)  = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 1)    = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 800)  = 1 ([{fd=4, revents=POLLOUT}])
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 1 ([{fd=4, revents=POLLOUT|POLLWRNORM}])
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getpeername(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(53936), sin_addr=inet_addr("192.168.22.37")}, [16]) = 0
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
open("/usr/lib/x86_64-linux-gnu/nss/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
readlink("/usr/lib/x86_64-linux-gnu/libnss3.so", 0xe1e090, 1023) = -1 EINVAL (Invalid argument)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
getpeername(7, 0x7ffc9c1b89a0, 0x7ffc9c1b8974) = -1 ENOTCONN (Transport endpoint is not connected)
stat("/etc/ssl/certs/ca-certificates.crt", {st_mode=S_IFREG|0644, st_size=274340, ...}) = 0
close(7)                                = 0
close(4)                                = 0
futex(0xd88d7c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 17, {1498547927, 890392565}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
futex(0xd88d50, FUTEX_WAKE_PRIVATE, 1)  = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 1)    = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 199)  = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 799)  = 1 ([{fd=4, revents=POLLOUT}])
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 1 ([{fd=4, revents=POLLOUT|POLLWRNORM}])
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getpeername(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(53938), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
open("/usr/lib/x86_64-linux-gnu/nss/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
readlink("/usr/lib/x86_64-linux-gnu/libnss3.so", 0xe1e350, 1023) = -1 EINVAL (Invalid argument)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
getpeername(7, 0x7ffc9c1b89a0, 0x7ffc9c1b8974) = -1 ENOTCONN (Transport endpoint is not connected)
stat("/etc/ssl/certs/ca-certificates.crt", {st_mode=S_IFREG|0644, st_size=274340, ...}) = 0
close(7)                                = 0
close(4)                                = 0
futex(0xd88d7c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 19, {1498547940, 897383152}, ffffffff) = -1 ETIMEDOUT (Connection timed out)
futex(0xd88d50, FUTEX_WAKE_PRIVATE, 1)  = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 1)    = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 199)  = 0 (Timeout)
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 799)  = 1 ([{fd=4, revents=POLLOUT}])
poll([{fd=4, events=POLLOUT|POLLWRNORM}], 1, 0) = 1 ([{fd=4, revents=POLLOUT|POLLWRNORM}])
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getpeername(4, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(53940), sin_addr=inet_addr("192.168.22.37")}, [16]) = 0
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
open("/usr/lib/x86_64-linux-gnu/nss/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
readlink("/usr/lib/x86_64-linux-gnu/libnss3.so", 0xe1ea20, 1023) = -1 EINVAL (Invalid argument)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-ec2/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/gaian/aws-sdk-cpp/build/aws-cpp-sdk-core/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=52699, ...}) = 0
mmap(NULL, 52699, PROT_READ, MAP_PRIVATE, 7, 0) = 0x7fe6219cd000
close(7)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnsspem.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
munmap(0x7fe6219cd000, 52699)           = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
getpeername(7, 0x7ffc9c1b89a0, 0x7ffc9c1b8974) = -1 ENOTCONN (Transport endpoint is not connected)
stat("/etc/ssl/certs/ca-certificates.crt", {st_mode=S_IFREG|0644, st_size=274340, ...}) = 0
close(7)                                = 0
close(4)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
write(1, "Failed to start ec2 instance t2_"..., 97Failed to start ec2 instance t2_instance based on ami ami-848405e7:Unable to connect to endpoint
) = 97
fstat(5, {st_mode=S_IFREG|0644, st_size=9216, ...}) = 0
stat("/etc/pki/nssdb/cert9.db", {st_mode=S_IFREG|0644, st_size=9216, ...}) = 0
close(5)                                = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=11264, ...}) = 0
stat("/etc/pki/nssdb/key4.db", {st_mode=S_IFREG|0644, st_size=11264, ...}) = 0
close(6)                                = 0
brk(0xe42000)                           = 0xe42000
brk(0xe3f000)                           = 0xe3f000
munmap(0x7fe613b37000, 2647864)         = 0
munmap(0x7fe613dbe000, 2366064)         = 0
brk(0xe3e000)                           = 0xe3e000
brk(0xe3d000)                           = 0xe3d000
close(3)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
`

0 个答案:

没有答案