illacloud / deploy-illa-manually

Deploy illa utils manually. Docker, docker compose and k8s are all avaliable in this repo.
Apache License 2.0
37 stars 20 forks source link

https://localhost/api/v1/auth/verification net::ERR_CONNECTION_REFUSED #3

Closed duanshuaimin closed 1 year ago

duanshuaimin commented 1 year ago

local install docker-compose https://localhost/api/v1/auth/verification net::ERR_CONNECTION_REFUSED

naj1n commented 1 year ago

@duanshuaimin please provide more information, such as docker container logs, API request, and response.

yudar1024 commented 1 year ago

os: mac m1 docker version : 20.10.14 deploy manner : docker compose with official image logs:

❯ docker logs illa-backend

2022/11/23 07:49:57 /opt/illa/builder-backend/pkg/db/connection.go:48
[error] failed to initialize database, got error failed to connect to `host=illa-database user=illa database=illa`: dial error (dial tcp 172.25.0.2:5432: connect: connection refused)
{"level":"error","ts":1669189797.154934,"caller":"zap@v1.21.0/sugar.go:191","msg":"Ignored key without a value.","ignored":6,"stacktrace":"go.uber.org/zap.(*SugaredLogger).Errorw\n\t/go/pkg/mod/go.uber.org/zap@v1.21.0/sugar.go:191\ngithub.com/illa-family/builder-backend/pkg/db.NewDbConnection\n\t/opt/illa/builder-backend/pkg/db/connection.go:56\nmain.Initialize\n\t/opt/illa/builder-backend/cmd/http-server/wire_gen.go:38\nmain.main\n\t/opt/illa/builder-backend/cmd/http-server/main.go:20\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
{"level":"error","ts":1669189797.1535704,"caller":"db/connection.go:56","msg":"Failed to connect to database, %d","stacktrace":"github.com/illa-family/builder-backend/pkg/db.NewDbConnection\n\t/opt/illa/builder-backend/pkg/db/connection.go:56\nmain.Initialize\n\t/opt/illa/builder-backend/cmd/http-server/wire_gen.go:38\nmain.main\n\t/opt/illa/builder-backend/cmd/http-server/main.go:20\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
{"level":"info","ts":1669189807.2488391,"caller":"db/connection.go:84","msg":"connected with db","db":{"Addr":"illa-database","Port":"5432","User":"illa","Password":"illa2022","Database":"illa"}}
{"level":"info","ts":1669189807.2522745,"caller":"http-server/server.go:61","msg":"Starting server"}
[GIN-debug] POST   /api/v1/auth/verification --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.GetVerificationCode-fm (3 handlers)
[GIN-debug] POST   /api/v1/auth/signup       --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.SignUp-fm (3 handlers)
[GIN-debug] POST   /api/v1/auth/signin       --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.SignIn-fm (3 handlers)
[GIN-debug] POST   /api/v1/auth/forgetPassword --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.ForgetPassword-fm (3 handlers)
[GIN-debug] PATCH  /api/v1/users/password    --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.UpdatePassword-fm (4 handlers)
[GIN-debug] PATCH  /api/v1/users/nickname    --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.UpdateUsername-fm (4 handlers)
[GIN-debug] PATCH  /api/v1/users/language    --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.UpdateLanguage-fm (4 handlers)
[GIN-debug] GET    /api/v1/users             --> github.com/illa-family/builder-backend/api/resthandler.UserRestHandler.GetUserInfo-fm (4 handlers)
[GIN-debug] POST   /api/v1/apps              --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.CreateApp-fm (4 handlers)
[GIN-debug] DELETE /api/v1/apps/:app         --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.DeleteApp-fm (4 handlers)
[GIN-debug] PUT    /api/v1/apps/:app         --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.RenameApp-fm (4 handlers)
[GIN-debug] GET    /api/v1/apps              --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.GetAllApps-fm (4 handlers)
[GIN-debug] GET    /api/v1/apps/:app/versions/:version --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.GetMegaData-fm (4 handlers)
[GIN-debug] POST   /api/v1/apps/:app/duplication --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.DuplicateApp-fm (4 handlers)
[GIN-debug] POST   /api/v1/apps/:app/deploy  --> github.com/illa-family/builder-backend/api/resthandler.AppRestHandler.ReleaseApp-fm (4 handlers)
[GIN-debug] GET    /api/v1/room/:instanceID/dashboard --> github.com/illa-family/builder-backend/api/resthandler.RoomRestHandler.GetDashboardRoomConn-fm (4 handlers)
[GIN-debug] GET    /api/v1/room/:instanceID/app/:roomID --> github.com/illa-family/builder-backend/api/resthandler.RoomRestHandler.GetAppRoomConn-fm (4 handlers)
[GIN-debug] GET    /api/v1/apps/:app/actions --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.FindActions-fm (4 handlers)
[GIN-debug] POST   /api/v1/apps/:app/actions --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.CreateAction-fm (4 handlers)
[GIN-debug] GET    /api/v1/apps/:app/actions/:action --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.GetAction-fm (4 handlers)
[GIN-debug] PUT    /api/v1/apps/:app/actions/:action --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.UpdateAction-fm (4 handlers)
[GIN-debug] DELETE /api/v1/apps/:app/actions/:action --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.DeleteAction-fm (4 handlers)
[GIN-debug] POST   /api/v1/apps/:app/actions/preview --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.PreviewAction-fm (4 handlers)
[GIN-debug] POST   /api/v1/apps/:app/actions/:action/run --> github.com/illa-family/builder-backend/api/resthandler.ActionRestHandler.RunAction-fm (4 handlers)
[GIN-debug] GET    /api/v1/resources         --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.FindAllResources-fm (4 handlers)
[GIN-debug] POST   /api/v1/resources         --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.CreateResource-fm (4 handlers)
[GIN-debug] GET    /api/v1/resources/:resource --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.GetResource-fm (4 handlers)
[GIN-debug] PUT    /api/v1/resources/:resource --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.UpdateResource-fm (4 handlers)
[GIN-debug] DELETE /api/v1/resources/:resource --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.DeleteResource-fm (4 handlers)
[GIN-debug] POST   /api/v1/resources/testConnection --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.TestConnection-fm (4 handlers)
[GIN-debug] GET    /api/v1/resources/:resource/meta --> github.com/illa-family/builder-backend/api/resthandler.ResourceRestHandler.GetMetaInfo-fm (4 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.

docker logs illa-backend-ws

[error] failed to initialize database, got error failed to connect to `host=illa-database user=illa database=illa`: dial error (dial tcp 172.25.0.2:5432: connect: connection refused)
{"level":"error","ts":1669189797.1116006,"caller":"zap@v1.21.0/sugar.go:191","msg":"Ignored key without a value.","ignored":6,"stacktrace":"go.uber.org/zap.(*SugaredLogger).Errorw\n\t/go/pkg/mod/go.uber.org/zap@v1.21.0/sugar.go:191\ngithub.com/illa-family/builder-backend/pkg/db.NewDbConnection\n\t/opt/illa/builder-backend/pkg/db/connection.go:56\nmain.initEnv\n\t/opt/illa/builder-backend/cmd/websocket-server/main.go:54\nmain.main\n\t/opt/illa/builder-backend/cmd/websocket-server/main.go:127\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
{"level":"error","ts":1669189797.1102495,"caller":"db/connection.go:56","msg":"Failed to connect to database, %d","stacktrace":"github.com/illa-family/builder-backend/pkg/db.NewDbConnection\n\t/opt/illa/builder-backend/pkg/db/connection.go:56\nmain.initEnv\n\t/opt/illa/builder-backend/cmd/websocket-server/main.go:54\nmain.main\n\t/opt/illa/builder-backend/cmd/websocket-server/main.go:127\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
{"level":"info","ts":1669189807.2431612,"caller":"db/connection.go:84","msg":"connected with db","db":{"Addr":"illa-database","Port":"5432","User":"illa","Password":"illa2022","Database":"illa"}}
2022/11/23 07:50:07 [START] websocket service serve on 0.0.0.0:8000
naj1n commented 1 year ago

We'll fix it ASAP.

karminski commented 1 year ago

@duanshuaimin it is a bug, we will fix it as soon as possible.

karminski commented 1 year ago

@duanshuaimin @yudar1024

We released the version 1.4.0. it include the bug fix.

Please pull the latest docker image and try out.

And if deploy on server/virtual machine, don't forget set the environment variables in scripts/run.sh:

# builder-backend api server serve address
API_SERVER_ADDRESS=your_server_ip_address

# builder-backend websocket server serve address
WEBSOCKET_SERVER_ADDRESS=your_server_ip_address

For more details, please check out the README.md.

karminski commented 1 year ago

Issue closed due to no feedback over 5 days.