Azure linux waagent 在配置后未运行

标签 azure azure-virtual-machine azure-resource-manager

我正在使用 AZURE Arm 从 VM 库配置 UBUNTU 镜像。

在我的模板中,我部署了镜像和 Docker 扩展。该模板直到最近都运行良好。现在,部署计算机后,任何扩展都无法安装。

VM 'hsvnd1wl' has not reported status for VM agent or extensions. Please verify the VM has a running VM agent, and can establish outbound connections to Azure storage.

我检查了机器,发现 WAAGENT 没有在机器上运行(但是它已安装)。该门户还指示我安装代理。

当我使用启动代理时

#sudo service walinuxagent start

门户报告一切正常。重新部署后,扩展配置成功。

任何有关如何调试此问题或可能出现错误的想法将不胜感激。

重要参数值:

Ubuntu SKU: 14.04.2-LTS
ApiVersion: 2015-05-01-preview

请参阅下面的模板资源:

"resources": [
    {
      "name": "[variables('AppVmEthernetName')]",
      "type": "Microsoft.Network/networkInterfaces",
      "location": "[resourceGroup().location]",
      "apiVersion": "[variables('ApiVersion')]",
      "properties": {
        "ipConfigurations": [
          {
            "name": "ipconfig1",
            "properties": {
              "privateIPAllocationMethod": "Dynamic",
              "subnet": {
                "id": "[variables('VmEthernetSubnetRef')]"
              }
            }
          }
        ]
      }
    },
    {
      "type": "Microsoft.Compute/virtualMachines",
      "apiVersion": "[variables('ApiVersion')]",
      "name": "[variables('AppVmName')]",
      "location": "[resourceGroup().location]",
      "dependsOn": [
        "[concat('Microsoft.Network/networkInterfaces', '/', variables('AppVmEthernetName'))]"
      ],
      "properties": {
        "hardwareProfile": {
          "vmSize": "[parameters('AppVmSize')]"
        },
        "osProfile": {
          "computerName": "[variables('AppVmHostName')]",
          "adminUsername": "[parameters('VmAdminUsername')]",
          "adminPassword": "[parameters('VmAdminPassword')]"
        },
        "storageProfile": {
          "imageReference": {
            "publisher": "[variables('AppVmImagePublisher')]",
            "offer": "[variables('AppVmImageOffer')]",
            "sku": "[parameters('AppVmUbuntuVersion')]",
            "version": "latest"
          },
          "osDisk": {
            "name": "osdisk",
            "vhd": {
              "uri": "[concat('https://', parameters('StorageAccountName'),'.blob.core.windows.net/vhds', '/',variables('AppVmDiskName'),'.vhd')]"
            },
            "caching": "ReadWrite",
            "createOption": "FromImage"
          }
        },
        "networkProfile": {
          "networkInterfaces": [
            {
              "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('AppVmEthernetName'))]"
            }
          ]
        }
      }
    },
    {
      "type": "Microsoft.Compute/virtualMachines/extensions",
      "name": "[concat(variables('AppVmName'),'/', 'DockerExtension')]",
      "apiVersion": "[variables('ApiVersion')]",
      "location": "[resourceGroup().location]",
      "dependsOn": [
        "[concat('Microsoft.Compute/virtualMachines/', variables('AppVmName'))]"
      ],
      "properties": {
        "publisher": "Microsoft.Azure.Extensions",
        "type": "DockerExtension",
        "typeHandlerVersion": "1.0",
        "autoUpgradeMinorVersion": true,
        "settings": { 
          "compose": {
            "weblogic": {
              "image": "caioquirino/weblogic:12c",
              "ports": [ "7001:7001", "7002:7002"],
              "environment": {
                "DOMAIN_NAME": "default"
              },
              "volumes": [
                "/oracle/weblogic/domains:/weblogic/domains"
              ]
            }
          }
        }
      }
    }

更新 1:

日志输出如下。当我在配置失败后登录到计算机时,会配置 docker,其中包括镜像。我可以 WGET 存储上的资源,并且 DNS 名称解析正常。

我认为没有任何原因导致此错误发生。

15:02:30 ERROR:Socket IOError [Errno -2] Name or service not known, args:(-2, 'Name or service not known')
15:02:30 ERROR:Retry=2
15:02:30 ERROR:HTTP Req: HEAD https://somestorage.blob.core.windows.net/vhds/wldisk.495ed12f-5b2b-496d-8e35-04d792f3edf3.status?sv=2014-02-14&sr=b&sig=signature_here&sp=rw
15:02:30 ERROR:HTTP Req: Data=None
15:02:30 ERROR:HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-12-11T15:00:09Z'}
15:02:30 ERROR:HTTP Err: response is empty.
15:03:20 ERROR:Socket IOError [Errno -2] Name or service not known, args:(-2, 'Name or service not known')
15:03:20 ERROR:Can't get status blob type.
15:03:20 ERROR:Unknown blob type: None
15:04:25 ERROR:Socket IOError [Errno -2] Name or service not known, args:(-2, 'Name or service not known')
15:04:25 ERROR:Retry=0
15:04:25 ERROR:HTTP Req: HEAD https://somestorage.blob.core.windows.net/vhds/wldisk.495ed12f-5b2b-496d-8e35-04d792f3edf3.status?sv=2014-02-14&sr=b&sig=signature_here&sp=rw
15:04:25 ERROR:HTTP Req: Data=None
15:04:25 ERROR:HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-12-11T15:03:45Z'}
15:04:25 ERROR:HTTP Err: response is empty.
15:04:50 ERROR:Traceback (most recent call last):
15:04:50 ERROR:  File "/usr/sbin/waagent", line 5938, in main
15:04:50 ERROR:    WaAgent.Run()
15:04:50 ERROR:  File "/usr/sbin/waagent", line 5540, in Run
15:04:50 ERROR:    goalState.ExtensionsConfig.ReportHandlerStatus()
15:04:50 ERROR:  File "/usr/sbin/waagent", line 3831, in ReportHandlerStatus
15:04:50 ERROR:    UploadStatusBlob(uri, status.encode("utf-8"))
15:04:50 ERROR:  File "/usr/sbin/waagent", line 2890, in UploadStatusBlob
15:04:50 ERROR:    blobType = GetBlobType(url)
15:04:50 ERROR:  File "/usr/sbin/waagent", line 2819, in GetBlobType
15:04:50 ERROR:    }, chkProxy=True);
15:04:50 ERROR:  File "/usr/sbin/waagent", line 2758, in HttpHead
15:04:50 ERROR:    return self.HttpRequest("HEAD", url, None, headers, maxRetry, chkProxy)
15:04:50 ERROR:  File "/usr/sbin/waagent", line 2750, in HttpRequest
15:04:50 ERROR:    headers, proxyHost, proxyPort)
15:04:50 ERROR:  File "/usr/sbin/waagent", line 2678, in _HttpRequest
15:04:50 ERROR:    conn.request(method, path, data)
15:04:50 ERROR:  File "/usr/lib/python2.7/httplib.py", line 979, in request
15:04:50 ERROR:    self._send_request(method, url, body, headers)
15:04:50 ERROR:  File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
15:04:50 ERROR:    self.endheaders(body)
15:04:50 ERROR:  File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
15:04:50 ERROR:    self._send_output(message_body)
15:04:50 ERROR:  File "/usr/lib/python2.7/httplib.py", line 839, in _send_output
15:04:50 ERROR:    self.send(message_body)
15:04:50 ERROR:  File "/usr/lib/python2.7/httplib.py", line 811, in send
15:04:50 ERROR:    self.sock.sendall(data)
15:04:50 ERROR:  File "/usr/lib/python2.7/ssl.py", line 326, in sendall
15:04:50 ERROR:    amount = len(data)
15:04:50 ERROR:TypeError: object of type 'bool' has no len()
15:04:50 ERROR:
15:04:50 ERROR:Exception: object of type 'bool' has no len()

最佳答案

您可以从/var/log/waagent.log 获取waagent 日志。以及来自/var/log/azure/的扩展日志。

关于Azure linux waagent 在配置后未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34225744/

相关文章:

azure - Windows Azure IaaS 虚拟机可以保留内存状态吗?

c# - 无法发送 HTTP 请求,因为请求已中止。 "Could not create SSL/TLS secure channel"

azure - 二头肌模板在存储帐户中创建容器

javascript - azure ARM 消耗: get consumption with a CSP subscription

node.js - 强制重新安装 Node 模块

sql-server - 基本登录协议(protocol)

python - 在 python 中将字节 block 流式传输到 csv 行

azure - azure linux 应用服务上未添加缓存控制 header

azure - 如何在 Azure PowerShell 中了解附加到 VM 的子网名称?

powershell - 有没有办法使用 PowerShell 在 Azure 中接受 'Terms & Conditions'?