yangjian102621 / geekai

AI 助手全套开源解决方案,自带运营管理后台,开箱即用。集成了 ChatGPT, Azure, ChatGLM,讯飞星火,文心一言等多个平台的大语言模型。支持 MJ AI 绘画,Stable Diffusion AI 绘画,微博热搜等插件工具。采用 Go + Vue3 + element-plus 实现。
https://chat.geekai.me
Apache License 2.0
3.78k stars 964 forks source link

chatgpt-plus-api服务无法启动 #178

Closed jx714764812 closed 7 months ago

jx714764812 commented 7 months ago

⚠️ 确认 issue 是否已存在 ⚠️

GPT-3 or GPT-4

GPT-3.5

操作系统

Linux

Bug 描述 📝

api服务无法启动,启动报错

重现步骤 🕹

34c23e9ab83b registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:v3.2.7-amd64 "./chatgpt-plus-linux" 6 minutes ago Restarting (1) 17 seconds ago chatgpt-plus-api

你的应用配置信息

(base) root@jiang-All-Series:~# docker logs --tail=200 chatgpt-plus-api [Fx] PROVIDE handler.ChatModelHandler <= chatplus/handler.NewChatModelHandler() [Fx] PROVIDE handler.SdJobHandler <= chatplus/handler.NewSdJobHandler() [Fx] PROVIDE handler.PaymentHandler <= chatplus/handler.NewPaymentHandler() [Fx] PROVIDE handler.OrderHandler <= chatplus/handler.NewOrderHandler() [Fx] PROVIDE handler.ProductHandler <= chatplus/handler.NewProductHandler() [Fx] PROVIDE admin.ConfigHandler <= chatplus/handler/admin.NewConfigHandler() [Fx] PROVIDE admin.ManagerHandler <= chatplus/handler/admin.NewAdminHandler() [Fx] PROVIDE admin.ApiKeyHandler <= chatplus/handler/admin.NewApiKeyHandler() [Fx] PROVIDE admin.UserHandler <= chatplus/handler/admin.NewUserHandler() [Fx] PROVIDE admin.ChatRoleHandler <= chatplus/handler/admin.NewChatRoleHandler() [Fx] PROVIDE admin.RewardHandler <= chatplus/handler/admin.NewRewardHandler() [Fx] PROVIDE admin.DashboardHandler <= chatplus/handler/admin.NewDashboardHandler() [Fx] PROVIDE admin.ChatModelHandler <= chatplus/handler/admin.NewChatModelHandler() [Fx] PROVIDE admin.ProductHandler <= chatplus/handler/admin.NewProductHandler() [Fx] PROVIDE admin.OrderHandler <= chatplus/handler/admin.NewOrderHandler() [Fx] PROVIDE admin.ChatHandler <= chatplus/handler/admin.NewChatHandler() [Fx] PROVIDE sms.ServiceManager <= chatplus/service/sms.NewSendServiceManager() [Fx] PROVIDE service.CaptchaService <= main.main.func6() [Fx] PROVIDE oss.UploaderManager <= chatplus/service/oss.NewUploaderManager() [Fx] PROVIDE mj.Service <= chatplus/service/mj.NewService() [Fx] PROVIDE service.SmtpService <= chatplus/service.NewSmtpService() [Fx] PROVIDE wx.Bot <= chatplus/service/wx.NewWeChatBot() [Fx] PROVIDE mj.ServicePool <= chatplus/service/mj.NewServicePool() [Fx] PROVIDE sd.ServicePool <= chatplus/service/sd.NewServicePool() [Fx] PROVIDE payment.AlipayService <= chatplus/service/payment.NewAlipayService() [Fx] PROVIDE payment.HuPiPayService <= chatplus/service/payment.NewHuPiPay() [Fx] PROVIDE payment.PayJS <= chatplus/service/payment.NewPayJS() [Fx] PROVIDE service.Snowflake <= chatplus/service.NewSnowflake() [Fx] PROVIDE service.XXLJobExecutor <= chatplus/service.NewXXLJobExecutor() [Fx] PROVIDE handler.InviteHandler <= chatplus/handler.NewInviteHandler() [Fx] PROVIDE handler.PromptHandler <= chatplus/handler.NewPromptHandler() [Fx] PROVIDE admin.FunctionHandler <= chatplus/handler/admin.NewFunctionHandler() [Fx] PROVIDE handler.FunctionHandler <= chatplus/handler.NewFunctionHandler() [Fx] PROVIDE handler.TestHandler <= chatplus/handler.NewTestHandler() [Fx] PROVIDE fx.Lifecycle <= go.uber.org/fx.New.func1() [Fx] PROVIDE fx.Shutdowner <= go.uber.org/fx.(App).shutdowner-fm() [Fx] PROVIDE fx.DotGraph <= go.uber.org/fx.(App).dotGraph-fm() [Fx] INVOKE main.main.func3() [Fx] ERROR fx.Invoke(main.main.func3()) called from: main.main /go/chatgpt-plus/api/main.go:87 runtime.main /usr/local/go/src/runtime/proc.go:250 Failed: could not build arguments for function "main".main.func3 /go/chatgpt-plus/api/main.go:87: failed to build redis.Client: received non-nil error from function "chatplus/store".NewRedisClient /go/chatgpt-plus/api/store/redis.go:9: dial tcp [::1]:6379: connect: connection refused [Fx] ERROR Failed to start: could not build arguments for function "main".main.func3 /go/chatgpt-plus/api/main.go:87: failed to build redis.Client: received non-nil error from function "chatplus/store".NewRedisClient /go/chatgpt-plus/api/store/redis.go:9: dial tcp [::1]:6379: connect: connection refused 2024/03/27 16:03:44 could not build arguments for function "main".main.func3 (/go/chatgpt-plus/api/main.go:87): failed to build redis.Client: received non-nil error from function "chatplus/store".NewRedisClient (/go/chatgpt-plus/api/store/redis.go:9): dial tcp [::1]:6379: connect: connection refused 2024-03-27T16:04:45.077+0800 INFO api/main.go:62 Loading config file: config.toml [Fx] PROVIDE types.AppConfig <= main.main.func2() [Fx] PROVIDE core.AppServer <= chatplus/core.NewServer() [Fx] PROVIDE gorm.Config <= chatplus/store.NewGormConfig() [Fx] PROVIDE gorm.DB <= chatplus/store.NewMysql() [Fx] PROVIDE redis.Client <= chatplus/store.NewRedisClient() [Fx] PROVIDE embed.FS <= main.main.func4() [Fx] PROVIDE xdb.Searcher <= main.main.func5() [Fx] PROVIDE handler.ChatRoleHandler <= chatplus/handler.NewChatRoleHandler() [Fx] PROVIDE handler.UserHandler <= chatplus/handler.NewUserHandler() [Fx] PROVIDE chatimpl.ChatHandler <= chatplus/handler/chatimpl.NewChatHandler() [Fx] PROVIDE handler.UploadHandler <= chatplus/handler.NewUploadHandler() [Fx] PROVIDE handler.SmsHandler <= chatplus/handler.NewSmsHandler() [Fx] PROVIDE handler.RewardHandler <= chatplus/handler.NewRewardHandler() [Fx] PROVIDE handler.CaptchaHandler <= chatplus/handler.NewCaptchaHandler() [Fx] PROVIDE handler.MidJourneyHandler <= chatplus/handler.NewMidJourneyHandler() [Fx] PROVIDE handler.ChatModelHandler <= chatplus/handler.NewChatModelHandler() [Fx] PROVIDE handler.SdJobHandler <= chatplus/handler.NewSdJobHandler() [Fx] PROVIDE handler.PaymentHandler <= chatplus/handler.NewPaymentHandler() [Fx] PROVIDE handler.OrderHandler <= chatplus/handler.NewOrderHandler() [Fx] PROVIDE handler.ProductHandler <= chatplus/handler.NewProductHandler() [Fx] PROVIDE admin.ConfigHandler <= chatplus/handler/admin.NewConfigHandler() [Fx] PROVIDE admin.ManagerHandler <= chatplus/handler/admin.NewAdminHandler() [Fx] PROVIDE admin.ApiKeyHandler <= chatplus/handler/admin.NewApiKeyHandler() [Fx] PROVIDE admin.UserHandler <= chatplus/handler/admin.NewUserHandler() [Fx] PROVIDE admin.ChatRoleHandler <= chatplus/handler/admin.NewChatRoleHandler() [Fx] PROVIDE admin.RewardHandler <= chatplus/handler/admin.NewRewardHandler() [Fx] PROVIDE admin.DashboardHandler <= chatplus/handler/admin.NewDashboardHandler() [Fx] PROVIDE admin.ChatModelHandler <= chatplus/handler/admin.NewChatModelHandler() [Fx] PROVIDE admin.ProductHandler <= chatplus/handler/admin.NewProductHandler() [Fx] PROVIDE admin.OrderHandler <= chatplus/handler/admin.NewOrderHandler() [Fx] PROVIDE admin.ChatHandler <= chatplus/handler/admin.NewChatHandler() [Fx] PROVIDE sms.ServiceManager <= chatplus/service/sms.NewSendServiceManager() [Fx] PROVIDE service.CaptchaService <= main.main.func6() [Fx] PROVIDE oss.UploaderManager <= chatplus/service/oss.NewUploaderManager() [Fx] PROVIDE mj.Service <= chatplus/service/mj.NewService() [Fx] PROVIDE service.SmtpService <= chatplus/service.NewSmtpService() [Fx] PROVIDE wx.Bot <= chatplus/service/wx.NewWeChatBot() [Fx] PROVIDE mj.ServicePool <= chatplus/service/mj.NewServicePool() [Fx] PROVIDE sd.ServicePool <= chatplus/service/sd.NewServicePool() [Fx] PROVIDE payment.AlipayService <= chatplus/service/payment.NewAlipayService() [Fx] PROVIDE payment.HuPiPayService <= chatplus/service/payment.NewHuPiPay() [Fx] PROVIDE payment.PayJS <= chatplus/service/payment.NewPayJS() [Fx] PROVIDE service.Snowflake <= chatplus/service.NewSnowflake() [Fx] PROVIDE service.XXLJobExecutor <= chatplus/service.NewXXLJobExecutor() [Fx] PROVIDE handler.InviteHandler <= chatplus/handler.NewInviteHandler() [Fx] PROVIDE handler.PromptHandler <= chatplus/handler.NewPromptHandler() [Fx] PROVIDE admin.FunctionHandler <= chatplus/handler/admin.NewFunctionHandler() [Fx] PROVIDE handler.FunctionHandler <= chatplus/handler.NewFunctionHandler() [Fx] PROVIDE handler.TestHandler <= chatplus/handler.NewTestHandler() [Fx] PROVIDE fx.Lifecycle <= go.uber.org/fx.New.func1() [Fx] PROVIDE fx.Shutdowner <= go.uber.org/fx.(App).shutdowner-fm() [Fx] PROVIDE fx.DotGraph <= go.uber.org/fx.(*App).dotGraph-fm() [Fx] INVOKE main.main.func3() [Fx] ERROR fx.Invoke(main.main.func3()) called from:

yangjian102621 commented 7 months ago
dial tcp [::1]:6379: connect: connection refused
2024/03/27 16:03:44 could not build arguments for function "main".main.func3 (/go/chatgpt-plus/api/main.go:87): failed to build *redis.Client: received non-nil error from function "chatplus/store".NewRedisClient (/go/chatgpt-plus/api/store/redis.go:9): dial tcp [::1]:6379: connect: connection refused

Redis 连接失败。你自己检查下是不是 redis 没有启动。