Ubuntu Server 上的 Docker 无法在 Azure 上部署

Ubuntu Server 上的 Docker 无法在 Azure 上部署

我正在关注这些方向在 Docker 和 Azure 上运行 TensorFlow。我转到portal.azure.com,单击“创建资源”,然后搜索并单击“Docker for Ubuntu Server”,然后单击“创建”(机器大小为“标准 A1”)。

部署尚未完成,当我单击“部署正在进行中”时,收到此警报:

资源操作已完成,终端配置状态为“失败”。点击此处了解详情

详细信息:

资源操作已完成,终端配置状态为“失败”。(代码:ResourceDeploymentFailure)

  • 虚拟机“hostname”配置状态为“失败”,因为扩展“Microsoft.Azure.Extensions.DockerExtension”处于“就绪”状态。(代码:VirtualMachineProvisioningFailed)

下列的此主题,我发现虚拟机已经创建,找到了它的IP地址,并通过SSH进入它并发现日志:

$ ls -la /var/log/
total 420
drwxrwxr-x  9 root   syslog   4096 Jan  9 15:22 .
drwxr-xr-x 13 root   root     4096 Jun 27  2016 ..
-rw-r--r--  1 root   root      357 Jan  9 15:22 alternatives.log
drwxr-xr-x  2 root   root     4096 Jun 28  2016 apt
-rw-r-----  1 syslog adm     13368 Jan  9 20:09 auth.log
drwxr-xr-x  3 root   root     4096 Jan  9 15:21 azure
-rw-r--r--  1 root   root     5179 Jan  9 15:22 azure-docker-extension-enable.log
-rw-------  1 root   utmp     1536 Jan  9 19:55 btmp
-rw-r--r--  1 syslog adm     97337 Jan  9 15:20 cloud-init.log
-rw-r--r--  1 root   root     5324 Jan  9 15:20 cloud-init-output.log
drwxr-xr-x  2 root   root     4096 Apr 26  2016 dist-upgrade
-rw-r--r--  1 root   root    42140 Jan  9 15:22 dpkg.log
drwxr-xr-x  2 root   root     4096 Jun 27  2016 fsck
-rw-r-----  1 syslog adm     55580 Jan  9 15:22 kern.log
-rw-rw-r--  1 root   utmp   292292 Jan  9 20:09 lastlog
drwxr-xr-x  2 root   root     4096 May 30  2016 lxd
drwxr-x---  2 root   adm      4096 May 20  2016 samba
-rw-r-----  1 syslog adm    122943 Jan  9 20:09 syslog
drwxr-x---  2 root   adm      4096 Feb 21  2016 unattended-upgrades
-rw-r--r--  1 root   root     3680 Jan  9 15:21 waagent.log
-rw-rw-r--  1 root   utmp     3456 Jan  9 20:09 wtmp

错误似乎与以下内容一致azure-docker-extension-enable.log,其结尾为

[DockerExtension] 2019/01/09 21:17:27 no restart needed. issuing only a start command.
[executil] 2019/01/09 21:17:27 +++ invoke: systemctl [start docker]
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[executil] 2019/01/09 21:17:27 --- invoke end
[DockerExtension] 2019/01/09 21:17:30 -- restart docker
[DockerExtension] 2019/01/09 21:17:30 ++ login docker registry
[DockerExtension] 2019/01/09 21:17:30 registry login not specificied
[DockerExtension] 2019/01/09 21:17:30 -- login docker registry
[DockerExtension] 2019/01/09 21:17:30 ++ compose up
[DockerExtension] 2019/01/09 21:17:30 docker-compose config not specified, noop
[DockerExtension] 2019/01/09 21:17:30 -- compose up
[DockerExtension] 2019/01/09 21:17:30 - completed: 'enable'
[DockerExtension] 2019/01/09 21:17:30 Cleaned up .seqnum file.

所以我运行了这个命令:

$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Wed 2019-01-09 15:22:50 UTC; 4h 50min ago
     Docs: https://docs.docker.com
  Process: 10048 ExecStart=/usr/bin/dockerd -H=fd:// (code=exited, status=1/FAILURE)
 Main PID: 10048 (code=exited, status=1/FAILURE)

Jan 09 15:22:50 hostname systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jan 09 15:22:50 hostname systemd[1]: Stopped Docker Application Container Engine.
Jan 09 15:22:50 hostname systemd[1]: docker.service: Start request repeated too quickly.
Jan 09 15:22:50 hostname systemd[1]: Failed to start Docker Application Container Engine.

另一个命令是:

$ journalctl -xe
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit UNIT has finished starting up.
-- 
-- The start-up result is done.
Jan 09 20:09:58 hostname systemd[10602]: Reached target Basic System.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit UNIT has finished starting up.
-- 
-- The start-up result is done.
Jan 09 20:09:58 hostname systemd[10602]: Reached target Default.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit UNIT has finished starting up.
-- 
-- The start-up result is done.
Jan 09 20:09:58 hostname systemd[10602]: Startup finished in 35ms.
-- Subject: System start-up is now complete
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- All system services necessary queued for starting at boot have been
-- successfully started. Note that this does not mean that the machine is
-- now idle as services might still be busy with completing start-up.
-- 
-- Kernel start-up required KERNEL_USEC microseconds.
-- 
-- Initial RAM disk start-up required INITRD_USEC microseconds.
-- 

有什么建议在 Ubuntu 和 Azure 上部署 Docker?

答案1

这似乎是 Microsoft 方面的错误。我今天(一周后)再次尝试,部署没有问题。

相关内容