Comments (17)
是一次开了多个gocq
么
能否发一下gocq
的配置文件(从现有的报错来看只能推测是心跳包的问题)
以及就是现有的log能给出的信息较少,请将log的等级调整为DEBUG
from sora.
单个gocq
# go-cqhttp 默认配置文件
account: # 账号相关
uin: # QQ账号
password: '' # 密码为空时使用扫码登录
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: true
# 是否将url分片发送
fix-url: false
# 下载图片等请求网络代理
proxy-rewrite: ''
# 是否上报自身消息
report-self-message: false
# 移除服务端的Reply附带的At
remove-reply-at: false
# 为Reply附加更多信息
extra-reply-data: false
# 跳过 Mime 扫描, 忽略错误数据
skip-mime-scan: false
output:
# 日志等级 trace,debug,info,warn,error
log-level: warn
# 日志时效 单位天. 超过这个时间之前的日志将会被自动删除. 设置为 0 表示永久保留.
log-aging: 15
# 是否在每次启动时强制创建全新的文件储存日志. 为 false 的情况下将会在上次启动时创建的日志文件续写
log-force-new: true
# 是否启用 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: #性能分析服务器
# 反向WS设置
- ws-reverse:
# 反向WS Universal 地址
# 注意 设置了此项地址后下面两项将会被忽略
universal: ws://localhost:6700
# 反向WS API 地址
api: ws://your_websocket_api.server
# 反向WS Event 地址
event: ws://your_websocket_event.server
# 重连间隔 单位毫秒
reconnect-interval: 3000
middlewares:
<<: *default # 引用默认中间件
from sora.
那可否给出服务器启动时的ServerConfig
的值
from sora.
var service = SoraServiceFactory.CreateInstance(new ServerConfig
{
Host = "127.0.0.1",
Port = uint.Parse(args[1])
});
from sora.
参数是6700
from sora.
带debug的log
https://pastebin.com/eQcXjEmu
from sora.
我这边复现失败了
并且从log能看到有多个gocq同时连接了服务器,且这些连接均未发送心跳包导致了心跳超时
from sora.
试试连上之后关闭sora然后过一会再开启呢
from sora.
怀疑是go-cqhttp的问题,因为我这里在同一时间会出现多个尝试链接ws
from sora.
同样是复现失败的
不过你可以试一下新的RC版本
是否会有这个问题(但是新的RC版本
有非常多的破坏性更新)
from sora.
而且我也不清楚为什么你的gocq
发起了多次连接请求,并在连接后丢失心跳
from sora.
TCP 127.0.0.1:6700 0.0.0.0:0 LISTENING 19236
TCP 127.0.0.1:6700 127.0.0.1:54914 ESTABLISHED 19236
TCP 127.0.0.1:6700 127.0.0.1:54915 ESTABLISHED 19236
TCP 127.0.0.1:6700 127.0.0.1:54916 ESTABLISHED 19236
TCP 127.0.0.1:54914 127.0.0.1:6700 ESTABLISHED 9312
TCP 127.0.0.1:54915 127.0.0.1:6700 ESTABLISHED 9312
TCP 127.0.0.1:54916 127.0.0.1:6700 ESTABLISHED 9312
from sora.
netstat的结果,我觉得这更可能是cqhttp的bug(?
from sora.
这场面我真没见过(挠头
from sora.
from sora.
算了。。。不能解决问题我就绕过问题。。。我把反向ws改成正向ws就没问题了,感谢解答
from sora.
也行吧。。。但是我还是摸不着头脑这是怎么产生的问题
from sora.
Related Issues (20)
- v1.0.0-rc28及以上版本的Log工具类无法在CentOS 8上使用 HOT 5
- v1.0.0-rc26中 Sora.Net.ConnectionManager.HeartBeatUpdate() 抛出 KeyNotFoundException HOT 3
- SoraCommand设置SourceFlag.Private时提示不支持的类型 HOT 2
- 关于异常捕获 HOT 1
- [功能需求] SoraService中需要StopService方法销毁WebSocket连接,需要Pause方法暂停事件分发
- 单条信息同时匹配多个指令时,eventArgs.CommandRegex永远是最后匹配Command的正则 HOT 1
- 内部HeartBeatUpdate触发程序崩溃
- Fatal:System.Collections.Generic.KeyNotFoundException HOT 4
- 关于SoraCommand中的MatchType HOT 1
- 收到邀请进群通知后崩溃 HOT 1
- 监听群员变动事件后被拉入新群后崩溃 HOT 1
- 依旧是关于SoraCommand中的MatchType HOT 6
- [建议]GroupMemberInfo中增加IsAdmin HOT 3
- 没有注册常规指令时,动态指令不会被执行 HOT 1
- Group.GetGroupRootFiles() 超时
- Group.GetEssenceMsgList() 精华消息获取的2个问题 HOT 7
- 接收消息时出现错误 MSG_NOT_FOUND HOT 3
- 转发消息的时候图片会变成cq码 HOT 10
- [重要] 未来的计划
- [Feature Request] 静态文件的http服务器(? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sora.