Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: relation public.constraint does not exist failed executing command #640

Open
devopsmash opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@devopsmash
Copy link

Hi Team,

I'm using keycloak that stores it's data on my AWS RDS postgres (1 primary instance that contains multiple databases).

I'm trying to open some tables in the web console but I'm getting the following error on dev tools:

image

error in loop server gw

{"level":"warn","timestamp":"2025-01-13T12:26:05Z","logger":"storagev2/core.go:23","msg":"failed obtaing context from *gin.Context for key \"storagev2\""}
{"level":"debug","timestamp":"2025-01-13T12:26:05Z","logger":"apiroutes/auth.go:116","msg":"user authenticated, roles=[standard auditor], org=default, [email protected], isadmin=false, isauditor=false"}
{"level":"info","timestamp":"2025-01-13T12:26:05Z","logger":"transport/client.go:111","msg":"proxy connected: [email protected],hostname=hoopgateway-5dd47fdbbb-bhkrc,origin=client-api,verb=plain-exec,platform=linux/amd64,version=1.31.14,license=oss","sid":"a08c3c88-e114-4159-801c-3ac2e147c6aa","connection":"mydb-devtest-pg","agent-name":"mydb-dev","mode":"standard","ua":"webapp.core"}
{"level":"info","timestamp":"2025-01-13T12:26:05Z","logger":"transport/client.go:253","msg":"opening session with agent, sent=true","sid":"a08c3c88-e114-4159-801c-3ac2e147c6aa","agent-name":"mydb-dev"}
{"level":"info","timestamp":"2025-01-13T12:26:05Z","logger":"transport/client.go:112","msg":"proxy disconnected, reason=failed executing command, reason=exit status 3","sid":"a08c3c88-e114-4159-801c-3ac2e147c6aa","connection":"mydb-devtest-pg","agent-name":"mydb-dev","mode":"standard","ua":"webapp.core"}
{"level":"error","timestamp":"2025-01-13T12:26:05Z","logger":"connections/connections.go:625","msg":"failed issuing plain exec: exit_code=3, truncated=false, has_review=false, output_length=103, execution_time_sec=0, output=ERROR:  relation \"public.constraint_17-2\" does not exist\nfailed executing command, reason=exit status 3","stacktrace":"github.com/hoophq/hoop/gateway/api/connections.GetDatabaseSchemas\n\t/home/runner/work/hoop/hoop/gateway/api/connections/connections.go:625\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngithub.com/hoophq/hoop/gateway/api/apiroutes.(*Router).setUserContext\n\t/home/runner/work/hoop/hoop/gateway/api/apiroutes/auth.go:133\ngithub.com/hoophq/hoop/gateway/api/apiroutes.(*Router).AuthMiddleware\n\t/home/runner/work/hoop/hoop/gateway/api/apiroutes/auth.go:118\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngithub.com/hoophq/hoop/gateway/api/apiroutes.ReadOnlyAccessRole\n\t/home/runner/work/hoop/hoop/gateway/api/apiroutes/roles.go:59\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngo.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin.Middleware.func1\n\t/home/runner/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/[email protected]/gintrace.go:95\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngithub.com/getsentry/sentry-go/gin.(*handler).handle\n\t/home/runner/go/pkg/mod/github.com/getsentry/[email protected]/gin/sentrygin.go:57\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngithub.com/hoophq/hoop/gateway/api.(*Api).StartAPI.CORSMiddleware.func2\n\t/home/runner/work/hoop/hoop/gateway/api/middleware.go:120\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngithub.com/hoophq/hoop/gateway/api.(*Api).StartAPI.RecoveryWithZap.CustomRecoveryWithZap.func4\n\t/home/runner/go/pkg/mod/github.com/gin-contrib/[email protected]/zap.go:159\ngithub.com/gin-gonic/gin.(*Context).Next\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\t/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576\nnet/http.serverHandler.ServeHTTP\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/net/http/server.go:3210\nnet/http.(*conn).serve\n\t/opt/hostedtoolcache/go/1.23.4/x64/src/net/http/server.go:2092"}

Any idea how to solve this?
Not sure why the public schema is relevant here which is not in use on my case.

webapp version 1.35.2
gateway version 1.31.14

@feraio feraio self-assigned this Jan 27, 2025
@feraio feraio added the bug Something isn't working label Jan 27, 2025
@feraio
Copy link

feraio commented Jan 27, 2025

Hey @devopsmash, thanks for bringing this error.
We're releasing a new version this week that is not directly related but aims to improve performance and fix an issue with large schemas and indexes.

If you want to bring us more information about your connection I can share it with the team to evaluate better in details about your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants