Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 构建';亚马逊ebs&x27;6分46秒后出错:等待SSH超时_Amazon Web Services_Ssh_Packer - Fatal编程技术网

Amazon web services 构建';亚马逊ebs&x27;6分46秒后出错:等待SSH超时

Amazon web services 构建';亚马逊ebs&x27;6分46秒后出错:等待SSH超时,amazon-web-services,ssh,packer,Amazon Web Services,Ssh,Packer,我试图用下面的代码创建一个带有packer的AMI,但是遇到了这个错误 “生成'amazon ebs'在6分46秒后出错:等待SSH超时。” 我怎样才能解决这个问题 该代码是用于部署打包机的Jason模板 { "builders": [{ "type": "amazon-ebs", "access_key": "{{user `aws_access_key`}}&qu

我试图用下面的代码创建一个带有packer的AMI,但是遇到了这个错误

“生成'amazon ebs'在6分46秒后出错:等待SSH超时。”

我怎样才能解决这个问题

该代码是用于部署打包机的Jason模板

{
    "builders": [{
        "type": "amazon-ebs",
        "access_key": "{{user `aws_access_key`}}",
        "secret_key": "{{user `aws_secret_key`}}",
        "region": "us-west-2",
        "source_ami_filter": {
            "filters": {
                "virtualization-type": "hvm",
                "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
                "root-device-type": "ebs"
            },
            "owners": ["099720109477"],
            "most_recent": true
        },
        "instance_type": "t2.micro",
        "ssh_username": "ubuntu",
        "ami_name": "example-ami-packer",
        "force_deregister": true,
         "vpc_id": "vpc-0dc474611b4e84daa",
         "subnet_id": "subnet-0604c203853e7fe1f"
    }],
    "_comment": "Running Ansible roles on the image",
    "provisioners": [
      {
        "type": "shell",
        "script": "scripts/ansible.sh"
      },
      {
        "type": "ansible-local",
        "playbook_file": "../ansible/site.yml",
        "role_paths": [
          "../ansible/roles/git",
          "../ansible/roles/mysql",
          "../ansible/roles/nginx",
          "../ansible/roles/growlerfriday"
        ],
        "group_vars": "../ansible/group_vars"
      },
      {
        "type": "shell",
        "script": "scripts/cleanup.sh"
      }
    ],
    "post-processors": [
      [
        {
          "output": "manifest.json",
          "strip_path": true,
          "type": "manifest"
        }
      ]
    ]
}