Inspec-无法打开与:80的TCP连接(连接被拒绝)

时间:2018-12-06 15:48:00

标签: ruby azure cloud chef inspec

我正在使用Azure云外壳执行Inspec配置文件。当我执行配置文件时,我无法打开TCP连接错误。下面是它的样子

xx@Azure:~$ inspec check rg_profile
Location:    rg_profile
Profile:     azure_resources
Controls:    1
Timestamp:   2018-12-06T15:41:33+00:00
Valid:       true

No errors or warnings
xx@Azure:~$ inspec exec rg_profile -t azure://

    Profile: Checking compliance of cloud pool resources (azure_resources)
Version: 0.1.0
Target:  azure://xxxx-xxx

  ×  azurerm_virtual_machine: Check vm 'vmxxxx'
     ×  Control Source Code Error rg_profile/controls/check_vmxxxx.rb:1
     Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80)


Profile: Azure Resource Pack (inspec-azure)
Version: 1.2.0
Target:  azure://xxxx-xxx

     No tests executed.

Profile Summary: 0 successful controls, 1 control failure, 0 controls skipped
Test Summary: 0 successful, 1 failure, 0 skipped

我已经通过Powershell使用Azure服务原则验证了连接性,并且工作正常。

如果有人能告诉我我所缺少的内容,我将非常感谢。谢谢。

0 个答案:

没有答案