cyanasterisk / freecar Goto Github PK
View Code? Open in Web Editor NEWTime-sharing car rental system suite based on CloudWeGo series framework
License: GNU General Public License v3.0
Time-sharing car rental system suite based on CloudWeGo series framework
License: GNU General Public License v3.0
╭─ /src/FreeCar-0.1.1 15:39 192.168.3.5
╰>>> make api
go run ./server/cmd/api
exit status 1
make: *** [api] Error 1
如上:运行make api以后提示1个错误,没有详细的错误日志信息了,排查不到问题。
// auth/main.go
func main() {
// initialization
initialize.InitLogger()
// xxxx
defer p.Shutdown(context.Background())
//init blob
initialize.InitBlob()
并且在blob_service时无法读取对应配置name,可能是因为auth的ServerConfig读不到blob_srv?
func (kc *kClient) checkOptions() (err error) {
// 此处为空
if kc.opt.Svr.ServiceName == "" {
return errors.New("service name is required")
}
return nil
}
我后续在auth的nacos配置中添加了blob_srv字段才解决
{
"name": "auth_srv",
"host": "your host",
"mysql": {
"host": "127.0.0.1",
"port": 3306,
"user": "root",
"password": "123456",
"db": "FreeCar",
"salt": "FreeCar"
},
"otel": {
"endpoint": ":4317"
},
"wx_config": {
"app_id": "xxx",
"app_secret": "xxx"
},
"blob_srv": {
"name": "blob_srv"
// xxx
}
}
报错代码如下
go run ./server/cmd/user
2024/02/20 16:13:58.613314 config.go:26: [Info] Config Info: {127.0.0.1 8500 freecar/user_srv}
{"level":"info","msg":"ip: 0.0.0.0","time":"2024-02-20T16:13:58+08:00"}
{"level":"info","msg":"port: 64223","time":"2024-02-20T16:13:58+08:00"}
{"level":"fatal","msg":"key length incorrect (0), expected 64","time":"2024-02-20T16:13:58+08:00"}
exit status 1
make: *** [user] Error 1
不知道从哪里报出来的
Describe the bug
A clear and concise description of what the bug is.
文档中文 api注解地址 显示404
https://www.cloudwego.io/zh/docs/hertz/tutorials/toolkit/toolkit/#%E6%94%AF%E6%8C%81%E7%9A%84-api-%E6%B3%A8%E8%A7%A3
Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.
显示正确的地址
如 https://www.cloudwego.io/zh/docs/hertz/tutorials/toolkit/usage/annotation/
If applicable, add screenshots to help explain your problem.
make api
会报这个错:
{"level":"info","msg":"Config Info: {127.0.0.1 8510 freecar/api_srv}","time":"2023-04-21T22:29:43+08:00"}
{"level":"fatal","msg":"consul kv failed: Get "http://127.0.0.1:8510/v1/kv/freecar/api_srv\": dial tcp 127.0.0.1:8510: connect: connection refused","time":"2023-04-21T22:29:43+08:00"}
exit status 1
make: *** [api] Error 1
In server/cmd/api/Makefile, to initialize (auto generate hertz code), we need hz new -idl ./../../idl/api.proto -mod github.com/CyanAsterisk/FreeCar/server/cmd/api
.
But fail to find api.proto
in such path
make user等几个执行结果都是gorm bad connection的错误
运行 make migrate 失败,报错如下:
go run server/cmd/auth/model/migrate/main.go
stat server/cmd/auth/model/migrate/main.go: no such file or directory
make: *** [migrate] Error 1
Process finished with exit code 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.