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 connecting to PostgreSQL database #3581

Open
RoLuoGan opened this issue Oct 16, 2024 · 2 comments
Open

Error connecting to PostgreSQL database #3581

RoLuoGan opened this issue Oct 16, 2024 · 2 comments
Assignees
Labels

Comments

@RoLuoGan
Copy link
Contributor

Bug report:

Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: 2024-10-15T19:27:21.275+0800 INFO rpcserver/manager_server_v1.go:805 keepalive for the first time {"hostname": "tianjin034003.cluster.local", "ip": "10.4.34.3", "sourceType": "SEED_PEER_SOURCE", "clusterID": 1}
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: 2024-10-15T19:27:21.489+0800 ERROR recovery/interceptors.go:51 trace {"error": "ERROR: table name "seed_peer" specified more than once (SQLSTATE 42712)", "elapsed": "128.157602ms", "rows": 1, "sql": "UPDATE "seed_peer" SET "updated_at"='2024-10-15 19:27:21.403',"state"='active' FROM "seed_peer" WHERE ("seed_peer"."host_name" = 'tianjin034003.cluster.local' AND "seed_peer"."ip" = '10.4.34.3' AND "seed_peer"."seed_peer_cluster_id" = 1) AND "seed_peer"."is_del" = 0 AND "id" = 3"}
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-middleware/recovery.StreamServerInterceptor.func1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/recovery/interceptors.go:51
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.StreamServerInterceptor.func10
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/validator/validator.go:72
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.StreamServerInterceptor.func1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/logging/zap/server_interceptors.go:53
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-prometheus.init.(*ServerMetrics).StreamServerInterceptor.func4
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.0/server_metrics.go:121
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.StreamServerInterceptor.func9
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/ratelimit/ratelimit.go:34
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:86
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).processStreamingRPC
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1680
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).handleStream
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1794
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).serveStreams.func2.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1029
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: 2024-10-15T19:27:21.489+0800 ERROR zap/server_interceptors.go:61 finished streaming call with code Internal {"grpc.start_time": "2024-10-15T19:27:16+08:00", "system": "grpc", "span.kind": "server", "grpc.service": "manager.Manager", "grpc.method": "KeepAlive", "error": "rpc error: code = Internal desc = ERROR: table name "seed_peer" specified more than once (SQLSTATE 42712)", "grpc.code": "Internal", "grpc.time_ms": 5215.655}
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.StreamServerInterceptor.func1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/logging/zap/server_interceptors.go:61
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-prometheus.init.(*ServerMetrics).StreamServerInterceptor.func4
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.0/server_metrics.go:121
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.StreamServerInterceptor.func9
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/ratelimit/ratelimit.go:34
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:86
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).processStreamingRPC
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1680
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).handleStream
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1794
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).serveStreams.func2.1
Oct 15 19:27:21 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1029
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: 2024-10-15T19:27:31.275+0800 INFO rpcserver/manager_server_v1.go:805 keepalive for the first time {"hostname": "tianjin034003.cluster.local", "ip": "10.4.34.3", "sourceType": "SEED_PEER_SOURCE", "clusterID": 1}
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: 2024-10-15T19:27:31.361+0800 ERROR recovery/interceptors.go:51 trace {"error": "record not found", "elapsed": "85.80663ms", "rows": 0, "sql": "SELECT * FROM "seed_peer" WHERE ("seed_peer"."host_name" = 'tianjin034003.cluster.local' AND "seed_peer"."ip" = '10.4.34.3' AND "seed_peer"."seed_peer_cluster_id" = 1) AND "seed_peer"."is_del" = 0 ORDER BY "seed_peer"."id" LIMIT 1"}
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-middleware/recovery.StreamServerInterceptor.func1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/recovery/interceptors.go:51
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.StreamServerInterceptor.func10
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/validator/validator.go:72
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.StreamServerInterceptor.func1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/logging/zap/server_interceptors.go:53
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-prometheus.init.(*ServerMetrics).StreamServerInterceptor.func4
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.0/server_metrics.go:121
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:83
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.StreamServerInterceptor.func9
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/ratelimit/ratelimit.go:34
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/chain.go:86
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).processStreamingRPC
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1680
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).handleStream
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1794
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: google.golang.org/grpc.(*Server).serveStreams.func2.1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/google.golang.org/grpc@v1.65.0/server.go:1029
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: 2024-10-15T19:27:31.361+0800 ERROR zap/server_interceptors.go:61 finished streaming call with code Internal {"grpc.start_time": "2024-10-15T19:27:26+08:00", "system": "grpc", "span.kind": "server", "grpc.service": "manager.Manager", "grpc.method": "KeepAlive", "error": "rpc error: code = Internal desc = record not found", "grpc.code": "Internal", "grpc.time_ms": 5085.884}
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.StreamServerInterceptor.func1
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: /root/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.4.0/logging/zap/server_interceptors.go:61
Oct 15 19:27:31 tianjin034003 run_manager.sh[5741]: d7y.io/dragonfly/v2/pkg/rpc/manager/server.New.ChainStreamServer.func12.1

Expected behavior:

How to reproduce it:

Environment:

  • Dragonfly version:
  • OS:
  • Kernel (e.g. uname -a):
  • Others:
@RoLuoGan RoLuoGan added the bug label Oct 16, 2024
@gaius-qi
Copy link
Member

gaius-qi commented Oct 16, 2024

@gaius-qi gaius-qi self-assigned this Oct 16, 2024
@andreineustroev
Copy link

For now downgrade dependencies working solution.

	gorm.io/driver/mysql v1.4.7
	gorm.io/driver/postgres v1.4.8
	gorm.io/gorm v1.24.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants