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

关于 docker 23.0.0 和 23.0.1 的一些问题,看看大家有遇到吗?

  •  
  •   maleedingdaa · 2023-02-15 10:32:09 +08:00 · 1233 次点击
    这是一个创建于 646 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我在一些服务器上( ubuntu20.04 ),使用了这两个版本的 docker ,发现 docker 服务时不时就会崩溃重启,导致我的容器也自己重启了。使的我容器内的一些服务出现了异常。不知道大家有没有遇到,有没有解决办法?或者我只能回退安装 23 版本以前的 docker 了。以下是 docker 重启的日志:

    Feb 12 02:20:17 ecs-2383 dockerd[274932]: time="2023-02-12T02:20:17.694078365Z" level=warning msg="[resolver] failed to read from DNS server: 127.0.0.53:53, query: ;yidui>
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: panic: runtime error: invalid memory address or nil pointer dereference
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x55a5805487ff]
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: goroutine 11868 [running]:
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: github.com/docker/docker/libnetwork.(*resolver).ServeDNS(0xc000f6a540, {0x55a581adf0c0, 0xc000e09900}, 0xc0006565a0)
    Feb 12 03:05:30 ecs-2383 dockerd[274932]:         /go/src/github.com/docker/docker/libnetwork/resolver.go:399 +0x6ff
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: github.com/docker/docker/vendor/github.com/miekg/dns.(*Server).serveDNS(0xc0000e7b00, {0xc000dba200, 0x25, 0x200}, 0xc000e09900)
    Feb 12 03:05:30 ecs-2383 dockerd[274932]:         /go/src/github.com/docker/docker/vendor/github.com/miekg/dns/server.go:651 +0x4e2
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: github.com/docker/docker/vendor/github.com/miekg/dns.(*Server).serveUDPPacket(0xc0000e7b00, 0x0?, {0xc000dba200, 0x25, 0x200}, {>
    Feb 12 03:05:30 ecs-2383 dockerd[274932]:         /go/src/github.com/docker/docker/vendor/github.com/miekg/dns/server.go:591 +0x185
    Feb 12 03:05:30 ecs-2383 dockerd[274932]: created by github.com/docker/docker/vendor/github.com/miekg/dns.(*Server).serveUDP
    Feb 12 03:05:30 ecs-2383 dockerd[274932]:         /go/src/github.com/docker/docker/vendor/github.com/miekg/dns/server.go:521 +0x485
    Feb 12 03:05:30 ecs-2383 systemd[1]: docker.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
    Feb 12 03:05:30 ecs-2383 systemd[1]: docker.service: Failed with result 'exit-code'.
    Feb 12 03:05:32 ecs-2383 systemd[1]: docker.service: Scheduled restart job, restart counter is at 4.
    Feb 12 03:05:32 ecs-2383 systemd[1]: Stopped Docker Application Container Engine.
    Feb 12 03:05:32 ecs-2383 systemd[1]: Starting Docker Application Container Engine...
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.643965606Z" level=info msg="Starting up"
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.646131806Z" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.650232757Z" level=info msg="[core] [Channel #1] Channel created" module=grpc
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.650396954Z" level=info msg="[core] [Channel #1] original dial target is: \"unix:///run/containerd/cont>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.650534499Z" level=info msg="[core] [Channel #1] parsed dial target is: {Scheme:unix Authority: Endpoin>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.650669189Z" level=info msg="[core] [Channel #1] Channel authority set to \"localhost\"" module=grpc
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.650921914Z" level=info msg="[core] [Channel #1] Resolver state updated: {\n  \"Addresses\": [\n    {\n>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.652209595Z" level=info msg="[core] [Channel #1] Channel switches to new LB policy \"pick_first\"" modu>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.652416486Z" level=info msg="[core] [Channel #1 SubChannel #2] Subchannel created" module=grpc
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.652572189Z" level=info msg="[core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNEC>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.652702899Z" level=info msg="[core] [Channel #1 SubChannel #2] Subchannel picks a new address \"/run/co>
    Feb 12 03:05:32 ecs-2383 dockerd[302526]: time="2023-02-12T03:05:32.653339994Z" level=info msg="[core] [Channel #1] Channel Connectivity change to CONNECTING" module=grpc
    
    
    4 条回复    2023-02-15 14:23:46 +08:00
    pubby
        1
    pubby  
       2023-02-15 11:08:34 +08:00
    我是碰到过用基于 ubuntu:22.04 制作的 docker 镜像,而且是那种放一个简单的 go 编译的程序, 在部分 k8s 节点随机崩溃

    后来改成 ubuntu:latest 就稳定了
    julyclyde
        2
    julyclyde  
       2023-02-15 12:39:28 +08:00
    可以试试把 daemon 和 container 分离 https://docs.docker.com/config/containers/live-restore/
    maleedingdaa
        3
    maleedingdaa  
    OP
       2023-02-15 14:23:06 +08:00
    @pubby 估计是 docker 自己的问题。查到也有人这个问题,https://forums.docker.com/t/after-upgraded-to-docker-23-0-0-docker-service-crashes-every-night/134593
    maleedingdaa
        4
    maleedingdaa  
    OP
       2023-02-15 14:23:46 +08:00
    @julyclyde 非常感谢,刚才试了一下,感觉不错。不知道能不能用在生产环境?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4548 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 09:57 · PVG 17:57 · LAX 01:57 · JFK 04:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.