Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.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 部署到AWS的盐云错误_Amazon Web Services_Salt Cloud - Fatal编程技术网

Amazon web services 部署到AWS的盐云错误

Amazon web services 部署到AWS的盐云错误,amazon-web-services,salt-cloud,Amazon Web Services,Salt Cloud,当我尝试使用salt cloud部署到amazon EC2时,出现以下错误: [root@salt salt]# salt-cloud -p ec2_private_win_r3.xlarge server00009 [ERROR ] AWS Response Status Code and Error: [401 401 Client Error: Unauthorized] {'Errors': {'Error': {'Message': 'AWS was not able to val

当我尝试使用salt cloud部署到amazon EC2时,出现以下错误:

[root@salt salt]# salt-cloud -p ec2_private_win_r3.xlarge server00009
[ERROR   ] AWS Response Status Code and Error: [401 401 Client Error: Unauthorized] {'Errors': {'Error': {'Message': 'AWS was not able to validate the provided access credentials', 'Code': 'AuthFailure'}}, 'RequestID': '33b43015-518e-4865-88e7-b6432e61b0db'}
[ERROR   ] AWS Response Status Code and Error: [401 401 Client Error: Unauthorized] {'Errors': {'Error': {'Message': 'AWS was not able to validate the provided access credentials', 'Code': 'AuthFailure'}}, 'RequestID': '4b88b080-ad32-4388-a133-4322b1c08c04'}
[ERROR   ] There was a profile error: 'NoneType' object has no attribute 'copy'
我已经验证了我正在使用的AWS密钥,并且我能够使用AWS命令行列出甚至启动新实例,其中包含我在云提供程序文件中使用的密钥:

##  Gov Cloud Non Prod environment
company-govcloud-nonprod-us-east-1:
  # Set up the location of the salt master

  minion:
  master: 10.0.2.15

  # Set up grains information, which will be common for all nodes
  # using this driver
  grains:
  node_type: broker

  # Valid options are:
  #     private_ips - The salt-cloud command is run inside the EC2
  #     public_ips - The salt-cloud command is run outside of EC2
  #
  ssh_interface: private_ips

  # Optionally configure the Windows credential validation number of
  # t-tdetries and delay between retries.  This defaults to 10 retries
  # with a one second delay betdwee retries
  win_deploy_auth_retries: 10
  win_deploy_auth_retry_delay: 1

  # Set the EC2 access credentials (see below)

  id: 'AKIAIATLQ4FTDDA6BV7A'
  key: 'asdfasdsfadsadasasdafadsadfafasdasda’

  # Make sure this key is owned by root with permissions 0400.
  #
  private_key: /etc/salt/company-timd
  keyname: company-timd
  #securitygroup: core-sg-default

  # Optionally configure default region
  # Use salt-cloud --list-locations <driver> to obtain valid regions
  #
  location: us-east-1
  availability_zone: us-east-1c

  # Configure which user to use to run the deploy script. This setting is
  # dependent upon the AMI that is used to deploy. It is usually safer to
  # configure this individually in a profile, than globally. Typical users
  # are:
  # Amazon Linux -> ec2-user
  # RHEL         -> ec2-user
  # CentOS       -> ec2-user
  # Ubuntu       -> ubuntu
  #
  ssh_username: root

  # Optionally add an IAM profile
  #iam_profile: 'arn:aws:iam::xxxxxxxxxxxx:role/rl-company-admin'

  driver: ec2
我尝试在云提供商定义中注释IAM配置文件。我已检查,并且我使用的AWS凭据在IAM中具有管理员访问权限

这是我的版本报告

[root@salt ~]# salt-cloud --versions-report
Salt Version:
            Salt: 2016.11.5

Dependency Versions:
 Apache Libcloud: 0.20.1
            cffi: 1.6.0
        cherrypy: 3.2.2
        dateutil: 2.6.0
       docker-py: Not Installed
           gitdb: Not Installed
       gitpython: Not Installed
           ioflo: Not Installed
          Jinja2: 2.7.2
         libgit2: Not Installed
         libnacl: Not Installed
        M2Crypto: Not Installed
            Mako: Not Installed
    msgpack-pure: Not Installed
  msgpack-python: 0.4.8
    mysql-python: Not Installed
       pycparser: 2.14
        pycrypto: 2.6.1
    pycryptodome: 3.4.3
          pygit2: Not Installed
          Python: 2.7.5 (default, Nov  6 2016, 00:28:07)
    python-gnupg: Not Installed
          PyYAML: 3.11
           PyZMQ: 15.3.0
            RAET: Not Installed
           smmap: Not Installed
         timelib: Not Installed
         Tornado: 4.2.1
             ZMQ: 4.1.4

System Versions:
            dist: centos 7.2.1511 Core
         machine: x86_64
         release: 3.10.0-327.el7.x86_64
          system: Linux
         version: CentOS Linux 7.2.1511 Core

如何解决此问题?

您是否正在尝试使用ssh\u用户名启动windows EC2实例?这可能会破坏它

您使用的是什么版本的盐云?通过调试日志运行
salt cloud
,可能会明确哪一步失败,并为您提供更多线索。您好,我使用的是salt cloud 2016.11.5(碳)。下面是错误的一些调试输出:ThanksHave您是否检查了时间是否同步?有时需要AWS认证。(运行:$sudo ntpdate pool.ntp.org)。您还可以用Python编写一个简短的boto脚本,检查您是否能够正常进行身份验证。我试着在provider配置中注释掉所有ssh内容。但是没有变化,我得到了同样的错误:
[root@salt ~]# salt-cloud --versions-report
Salt Version:
            Salt: 2016.11.5

Dependency Versions:
 Apache Libcloud: 0.20.1
            cffi: 1.6.0
        cherrypy: 3.2.2
        dateutil: 2.6.0
       docker-py: Not Installed
           gitdb: Not Installed
       gitpython: Not Installed
           ioflo: Not Installed
          Jinja2: 2.7.2
         libgit2: Not Installed
         libnacl: Not Installed
        M2Crypto: Not Installed
            Mako: Not Installed
    msgpack-pure: Not Installed
  msgpack-python: 0.4.8
    mysql-python: Not Installed
       pycparser: 2.14
        pycrypto: 2.6.1
    pycryptodome: 3.4.3
          pygit2: Not Installed
          Python: 2.7.5 (default, Nov  6 2016, 00:28:07)
    python-gnupg: Not Installed
          PyYAML: 3.11
           PyZMQ: 15.3.0
            RAET: Not Installed
           smmap: Not Installed
         timelib: Not Installed
         Tornado: 4.2.1
             ZMQ: 4.1.4

System Versions:
            dist: centos 7.2.1511 Core
         machine: x86_64
         release: 3.10.0-327.el7.x86_64
          system: Linux
         version: CentOS Linux 7.2.1511 Core