V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
leegoo
V2EX  ›  Docker

请教一个 docker load 的问题(ERRO[0000] error waiting for container: context canceled)

  •  
  •   leegoo · 282 天前 · 643 次点击
    这是一个创建于 282 天前的主题,其中的信息可能已经有所发展或是发生改变。

    事情是这样的,我有两台服务器,我在 A 服务器上面已经使用docker pull redis,并且正常运行

    我现在需要将 docker 里面的 redis 迁移到 B 服务器(B 服务器是内网环境)

    所以我使用 docker save docker load 命令,但是 docker load 提示

    ERRO[0000] error waiting for container: context canceled

    下面这是 A 服务器上的操作

    [root@localhost tmp]# docker ps 
    CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
    
    
    [root@localhost tmp]# docker images
    REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
    redis        6.0       5e50eed779b1   3 months ago   126MB
    
    
    [root@localhost tmp]# docker save -o redis_6.0.tar redis:6.0
    
    [root@localhost tmp]# sz redis_6.0.tar 
    rz
      zmodem  trl+C ȡ
    正在传输 redis_6.0.tar...
      100%  127713 KB    63856 KB/  00:00:02       0  
    
    

    然后我把 redis_6.0.tar 传到 B 服务器 并且进行了docker load 操作

    -rw-r--r-- 1 root root 130778112 Mar 14  2024 redis_6.0.tar
    drwx------ 3 root root        60 Mar 14 00:43 systemd-private-1050e01145eb417f803614d08584fd12-chronyd.service-y10izh
    drwx------ 3 root root        60 Mar 14 00:43 systemd-private-1050e01145eb417f803614d08584fd12-ModemManager.service-C5uss0
    drwx------ 3 root root        60 Mar 14 00:43 systemd-private-1050e01145eb417f803614d08584fd12-rtkit-daemon.service-VTGvUy
    drwx------ 3 root root        60 Mar 14 00:43 systemd-private-1050e01145eb417f803614d08584fd12-systemd-logind.service-H1vY1S
    [root@localhost tmp]# sudo docker load -i redis_6.0.tar 
    ceb365432eec: Loading layer  77.83MB/77.83MB
    6cbb7561e1b5: Loading layer  10.75kB/10.75kB
    b8193dd07dc2: Loading layer  10.75kB/10.75kB
    dbbba2a456e9: Loading layer  4.143MB/4.143MB
    6045f5430ff2: Loading layer  48.75MB/48.75MB
    92db3a851eaf: Loading layer  1.536kB/1.536kB
    5f70bf18a086: Loading layer  1.024kB/1.024kB
    12739a454b8b: Loading layer  4.096kB/4.096kB
    Loaded image: redis:6.0
    
    
    [root@localhost tmp]# docker run redis:6.0
    docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: container_linux.go:318: starting container process caused "permission denied": unknown.
    ERRO[0000] error waiting for container: context canceled 
    
    
    

    这是我的服务器信息(两台服务器都是通过虚拟机使用同一个镜像安装的)

    [root@localhost tmp]# uname -a
    Linux localhost.localdomain 4.19.90-52.22.v2207.ky10.x86_64 #1 SMP Tue Mar 14 12:19:10 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
    
    [root@localhost tmp]# docker info 
    Client:
     Version:    25.0.0
     Context:    default
     Debug Mode: false
    
    Server:
     Containers: 1
      Running: 0
      Paused: 0
      Stopped: 1
     Images: 1
     Server Version: 25.0.0
     Storage Driver: overlay2
      Backing Filesystem: xfs
      Supports d_type: true
      Using metacopy: false
      Native Overlay Diff: true
      userxattr: false
     Logging Driver: json-file
     Cgroup Driver: cgroupfs
     Cgroup Version: 1
     Plugins:
      Volume: local
      Network: bridge host ipvlan macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
     Swarm: inactive
     Runtimes: io.containerd.runc.v2 runc
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: 71909c1814c544ac47ab91d2e8b84718e517bb99
     runc version: 
     init version: de40ad0
     Security Options:
      seccomp
       Profile: builtin
     Kernel Version: 4.19.90-52.22.v2207.ky10.x86_64
     Operating System: Kylin Linux Advanced Server V10 (Lance)
     OSType: linux
     Architecture: x86_64
     CPUs: 4
     Total Memory: 6.504GiB
     Name: localhost.localdomain
     ID: 911eb204-1c0f-459d-8c37-b7e1af6e90a1
     Docker Root Dir: /var/lib/docker
     Debug Mode: false
     Experimental: false
     Insecure Registries:
      127.0.0.0/8
     Live Restore Enabled: false
     Product License: Community Engine
    
    
    第 1 条附言  ·  281 天前
    PS:两台都是国产系统
    2 条回复    2024-03-15 08:38:34 +08:00
    nagisaushio
        1
    nagisaushio  
       282 天前 via Android
    虽然我也不知道为什么,但是提示一下真正的报错是上面那行 permission denied
    leegoo
        2
    leegoo  
    OP
       281 天前
    @nagisaushio 嗯,但是我确实是用 root 用户执行的。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1576 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 16:45 · PVG 00:45 · LAX 08:45 · JFK 11:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.