You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
如题,本机环境为windows11。
本地debug、打包成.exe文件执行均正常
但是打包成Linux程序时,总是报错:
config file etc/****.yaml, field "Host" is not set 2024/07/01
配置添加了Host也不行。升级成1.6.6之后还是报错:
16:29:18 error: config file etc/centerrpc.yaml, field "Cache[1].Host" is not set
换成mac进行打包也不行。最后打开源码找到了/stores/redis/conf.go文件,发现Conf定义如下:
// A RedisConf is a redis config.
RedisConf struct {
Host string
Type string json:",default=node,options=node|cluster"
Pass string json:",optional"
Tls bool json:",optional"
NonBlock bool json:",default=true"
// PingTimeout is the timeout for ping redis.
PingTimeout time.Duration json:",default=1s"
}
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
In fact, the main meaning of up is that Host is required. Others should be optional or use the default. However, the prompt information should be more accurate (including some contextual information)
如题,本机环境为windows11。
本地debug、打包成.exe文件执行均正常
但是打包成Linux程序时,总是报错:
config file etc/****.yaml, field "Host" is not set 2024/07/01
配置添加了Host也不行。升级成1.6.6之后还是报错:
16:29:18 error: config file etc/centerrpc.yaml, field "Cache[1].Host" is not set
换成mac进行打包也不行。最后打开源码找到了/stores/redis/conf.go文件,发现Conf定义如下:
// A RedisConf is a redis config.
RedisConf struct {
Host string
Type string
json:",default=node,options=node|cluster"
Pass string
json:",optional"
Tls bool
json:",optional"
NonBlock bool
json:",default=true"
// PingTimeout is the timeout for ping redis.
PingTimeout time.Duration
json:",default=1s"
}
怀疑Host没有添加tag而导致的错误,到本地进行修改:
Host string
json:",default=127.0.0.1"
打包,上传,执行,成功!
足足让我折腾了三天
你们这也太坑了,怎么还能漏这个?
The text was updated successfully, but these errors were encountered: