Giter Club home page Giter Club logo

Comments (10)

XYenon avatar XYenon commented on June 26, 2024 1

go-cqhttp 应该不在一个 docker 内网里,最好用 docker-compose
你看日志的内容是找不到 go-cqhttp 所指向的 IP

不是的,我本地复现出来了,看我提的 pr,是 func 外面包了一层 method 导致 func 上 set 的 attr 拿不到了

from efb-qq-plugin-go-cqhttp.

milkice233 avatar milkice233 commented on June 26, 2024

请给出配置

from efb-qq-plugin-go-cqhttp.

Orokapei avatar Orokapei commented on June 26, 2024

请给出配置

Client: GoCQHttp
GoCQHttp:
    type: HTTP
    access_token:
    api_root: http://go-cqhttp:5700
    host: 0.0.0.0
    port: 5701
# go-cqhttp 默认配置文件

account: # 账号相关
  uin: xxxxxxxx # QQ账号
  password: 'xxxxxxx' # 密码为空时使用扫码登录
  encrypt: false  # 是否开启密码加密
  status: 0      # 在线状态 请参考 https://docs.go-cqhttp.org/guide/config.html#在线状态
  relogin: # 重连设置
    delay: 3   # 首次重连延迟, 单位秒
    interval: 3   # 重连间隔
    max-times: 0  # 最大重连次数, 0为无限制

  # 是否使用服务器下发的新地址进行重连
  # 注意, 此设置可能导致在海外服务器上连接情况更差
  use-sso-address: true

heartbeat:
  # 心跳频率, 单位秒
  # -1 为关闭心跳
  interval: 5

message:
  # 上报数据类型
  # 可选: string,array
  post-format: array
  # 是否忽略无效的CQ码, 如果为假将原样发送
  ignore-invalid-cqcode: false
  # 是否强制分片发送消息
  # 分片发送将会带来更快的速度
  # 但是兼容性会有些问题
  force-fragment: false
  # 是否将url分片发送
  fix-url: false
  # 下载图片等请求网络代理
  proxy-rewrite: ''
  # 是否上报自身消息
  report-self-message: true
  # 移除服务端的Reply附带的At
  remove-reply-at: false
  # 为Reply附加更多信息
  extra-reply-data: false

output:
  # 日志等级 trace,debug,info,warn,error
  log-level: info
  # 是否启用 DEBUG
  debug: false # 开启调试模式

# 默认中间件锚点
default-middlewares: &default
  # 访问密钥, 强烈推荐在公网的服务器设置
  access-token: ''
  # 事件过滤器文件目录
  filter: ''
  # API限速设置
  # 该设置为全局生效
  # 原 cqhttp 虽然启用了 rate_limit 后缀, 但是基本没插件适配
  # 目前该限速设置为令牌桶算法, 请参考:
  # https://baike.baidu.com/item/%E4%BB%A4%E7%89%8C%E6%A1%B6%E7%AE%97%E6%B3%95/6597000?fr=aladdin
  rate-limit:
    enabled: false # 是否启用限速
    frequency: 1  # 令牌回复频率, 单位秒
    bucket: 1     # 令牌桶大小

database: # 数据库相关设置
  leveldb:
    # 是否启用内置leveldb数据库
    # 启用将会增加10-20MB的内存占用和一定的磁盘空间
    # 关闭将无法使用 撤回 回复 get_msg 等上下文相关功能
    enable: true

# 连接服务列表
servers:
  # 添加方式,同一连接方式可添加多个,具体配置说明请查看文档
  #- http: # http 通信
  #- ws:   # 正向 Websocket
  #- ws-reverse: # 反向 Websocket
  #- pprof: #性能分析服务器
  # HTTP 通信设置
  - http:
      # 服务端监听地址
      host: 0.0.0.0
      # 服务端监听端口
      port: 5700
      # 反向HTTP超时时间, 单位秒
      # 最小值为5,小于5将会忽略本项设置
      timeout: 5
      middlewares:
        <<: *default # 引用默认中间件
      # 反向HTTP POST地址列表
      post:
      - url: 'ehforwarderbot:5701' # 地址
        secret: ''           # 密钥
      #- url: 127.0.0.1:5701 # 地址
      #  secret: ''          # 密钥

ehforwarderbot是efb所在容器host,go-cqhttp是cqhttp所在容器host

from efb-qq-plugin-go-cqhttp.

milkice233 avatar milkice233 commented on June 26, 2024

go-cqhttp 应该不在一个 docker 内网里,最好用 docker-compose
你看日志的内容是找不到 go-cqhttp 所指向的 IP

from efb-qq-plugin-go-cqhttp.

Orokapei avatar Orokapei commented on June 26, 2024

go-cqhttp 应该不在一个 docker 内网里,最好用 docker-compose
你看日志的内容是找不到 go-cqhttp 所指向的 IP

在的是用docker-compose一起部署的,而且是启动后是正常的,过一段时间才会这样(可能是网络波动掉线后没法重连?)

from efb-qq-plugin-go-cqhttp.

XYenon avatar XYenon commented on June 26, 2024

哦这里有两个问题

  1. 找不到 go-cqhttp 的服务器
  2. 执行 extra 的命令报错

第一个问题你先看下 go-cqhttp 的日志,有没有异常退出之类的情况

from efb-qq-plugin-go-cqhttp.

Orokapei avatar Orokapei commented on June 26, 2024

哦这里有两个问题

  1. 找不到 go-cqhttp 的服务器
  2. 执行 extra 的命令报错

第一个问题你先看下 go-cqhttp 的日志,有没有异常退出之类的情况

但是按理说启动后可以正常使用说明两边的网络是通的,而且efb是能够接收到cqhttp的消息的,只是没法发送,因为我cqhttp没开debug所以看不到更详细的日志,只能看到如下类似的(感觉这个错误和出现的问题不相干,看起来是cqhttp发送到efb错误),我日志开了debug后再等问题复现看看^v^

[2021-07-02 02:37:59] [WARNING]: 上报Event数据 {"interval":5000,"meta_event_type":"heartbeat","post_type":"meta_event","self_id":1540042330,"status":{"app_enabled":true,"app_good":true,"app_initialized":true,"good":true,"online":true,"plugins_good":null,"stat":{"packet_received":3189,"packet_sent":3175,"packet_lost":0,"message_received":2,"message_sent":0,"disconnect_times":0,"lost_times":0,"last_message_time":1625192025}},"time":1625193479}
 到 ehforwarderbot:5701 失败: Post "http://ehforwarderbot:5701": dial tcp 172.19.0.11:5701: connect: connection refused

from efb-qq-plugin-go-cqhttp.

XYenon avatar XYenon commented on June 26, 2024

看起来是 docker 的问题,和 efb,go-cqhttp 应该都没有什么关系

from efb-qq-plugin-go-cqhttp.

Orokapei avatar Orokapei commented on June 26, 2024

看起来是 docker 的问题,和 efb,go-cqhttp 应该都没有什么关系

好吧,晚点本地部署看看,感谢^v^

from efb-qq-plugin-go-cqhttp.

Orokapei avatar Orokapei commented on June 26, 2024

根据新的pr更改后已经两天没出现提示了,似乎问题已经解决(

from efb-qq-plugin-go-cqhttp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.