songquanpeng / message-pusher

搭建专属于你的消息推送服务,支持多种消息推送方式,支持 Markdown,基于 Golang 仅单可执行文件,开箱即用
https://msgpusher.com
MIT License
2.64k stars 395 forks source link

Docker 版使用企业微信应用号测试出错:dial tcp: lookup qyapi.weixin.qq.com: device or resource busy #35

Closed coppea closed 1 year ago

coppea commented 1 year ago

提示 failed to refresh access token: Get "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=ww2a8xxxxxxxx378&corpsecret=JyU4HIdpqxxxxxxxxxxxxxdB4_u2sZxxxxxxxxxxx": dial tcp: lookup qyapi.weixin.qq.com: device or resource busy 已加入可信ip和域名,使用腾讯云服务器,同服务器使用其他推送没有问题,推送成功,使用本docker版v0.3.0提示以上错误,重启也不行

songquanpeng commented 1 year ago

初步判断是镜像构建的问题,可以先尝试使用可执行文件的形式进行部署。另外,宿主机是什么系统?

coppea commented 1 year ago

好的,我试试,我的系统是ubuntu20.04

songquanpeng commented 1 year ago

可以看一下 uname -ra 的输出吗?我的测试环境是 Linux VM-12-5-ubuntu 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux,目前还不能复现。

coppea commented 1 year ago

Linux VM-8-5-ubuntu 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

coppea commented 1 year ago

刚测试单可执行文件可以推送,没有任何出错,应该就是docker问题

songquanpeng commented 1 year ago

好的谢谢反馈,我继续调查 Docker 版本的问题

coppea commented 1 year ago

使用docker直接部署没有问题

docker run -d --restart always --name message-pusher -p 3000:3000 -v /data/message-pusher:/data justsong/message-pusher

Docker version 20.10.21 docker logs:

[SYS] 2022/12/17 - 05:18:02 | system started [SYS] 2022/12/17 - 05:18:02 | SQL_DSN not set, using SQLite as database [SYS] 2022/12/17 - 05:18:02 | REDIS_CONN_STRING not set, Redis is not enabled [SYS] 2022/12/17 - 05:18:02 | access token refreshed


使用docker-compose部署就失败

version: '3.3'(从2.0更换到3.4都不行)
services:
    message-pusher:
        restart: always
        container_name: message-pusher
        ports:
            - '3000:3000'
        volumes:
            - '/data/message-pusher:/data'
        image: justsong/message-pusher

Docker Compose version v2.14.1 docker-compose logs:

message-pusher | [SYS] 2022/12/17 - 05:12:19 | system started message-pusher | [SYS] 2022/12/17 - 05:12:19 | SQL_DSN not set, using SQLite as database message-pusher | [SYS] 2022/12/17 - 05:12:19 | REDIS_CONN_STRING not set, Redis is not enabled message-pusher | [SYS] 2022/12/17 - 05:12:19 | failed to refresh access token: Get "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=ww2a8xxxxxxx78&corpsecret=JyU4HIdpqSL35xxxxxxxxQEGSFqfo": dial tcp: lookup qyapi.weixin.qq.com: device or resource busy

songquanpeng commented 1 year ago

Docker compose 我还没试过,我调查一下。

iskycc commented 1 year ago

Docker compose 我还没试过,我调查一下。

你这效率也太高了,不用上班的吗,哈哈哈

songquanpeng commented 1 year ago

最近不算太忙

songquanpeng commented 1 year ago

我最近调查了一下,貌似这个是和 Docker Compose 创建的网络的 DNS 解析相关的问题。

暂时没有其他人汇报该问题,所以有可能和本项目关系不大哈,因此先关闭该 issue 了。

如果新版本依旧能复现问题,欢迎重开 issue。