-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hello,
I'm using cnpg v1.28.0 and barman plugin v0.10.0 on private on premises k8s vanilla cluster.
I try to configure WAL archiving on a private S3 server.
Configuration and access sounds ok, if I try with the same parameters to run barman-cloud-check-wal-archive on a separate server after configuring the .aws/credendials file, all sounds ok ($? = 0)
barman-cloud-check-wal-archive --endpoint-url https://s3.xxx/ --cloud-provider aws-s3 "s3://fra-bkp/pg-cluster-backups/" pg-cluster
However, can't manage to get it working, get utf-8 errors ...
{"level":"info","ts":"2026-01-15T16:19:01.661515283Z","msg":"barman-cloud-check-wal-archive checking the first wal","logging_pod":"pg-cluster-1"} {"level":"info","ts":"2026-01-15T16:19:02.831635279Z","logger":"barman-cloud-check-wal-archive","msg":"2026-01-15 16:19:02,831 [94] ERROR: Barman cloud WAL archive check exception: 'utf-8' codec can't encode characters in position 4-6: surrogates not allowed","pipe":"stderr","logging_pod":"pg-cluster-1"} {"level":"error","ts":"2026-01-15T16:19:02.896804809Z","msg":"Error invoking barman-cloud-check-wal-archive","logging_pod":"pg-cluster-1","options":["--endpoint-url","https://s3.xxx/","--cloud-provider","aws-s3","s3://fra-bkp/pg-cluster/","pg-cluster"],"exitCode":-1,"error":"exit status 4","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/machinery@v0.3.3/pkg/log/log.go:125\ngithub.com/cloudnative-pg/barman-cloud/pkg/walarchive.(*BarmanArchiver).CheckWalArchiveDestination\n\t/go/pkg/mod/github.com/cloudnative-pg/barman-cloud@v0.4.0/pkg/walarchive/cmd.go:184\ngithub.com/cloudnative-pg/barman-cloud/pkg/archiver.(*WALArchiver).CheckWalArchiveDestination\n\t/go/pkg/mod/github.com/cloudnative-pg/barman-cloud@v0.4.0/pkg/archiver/archiver.go:131\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/common.CheckBackupDestination\n\t/workspace/internal/cnpgi/common/check.go:52\ngithub.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/common.WALServiceImplementation.Archive\n\t/workspace/internal/cnpgi/common/wal.go:165\ngithub.com/cloudnative-pg/cnpg-i/pkg/wal._WAL_Archive_Handler.func1\n\t/go/pkg/mod/github.com/cloudnative-pg/cnpg-i@v0.3.1/pkg/wal/wal_grpc.pb.go:194\ngithub.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery.UnaryServerInterceptor.func1\n\t/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.3.3/interceptors/recovery/interceptors.go:34\ngoogle.golang.org/grpc.getChainUnaryHandler.func1.getChainUnaryHandler.1\n\t/go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1241\ngithub.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http.(*Server).Start.loggingUnaryServerInterceptor.func3\n\t/go/pkg/mod/github.com/cloudnative-pg/cnpg-i-machinery@v0.4.2/pkg/pluginhelper/http/grpc.go:39\ngoogle.golang.org/grpc.getChainUnaryHandler.func1\n\t/go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1241\ngithub.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http.(*Server).Start.logFailedRequestsUnaryServerInterceptor.func2\n\t/go/pkg/mod/github.com/cloudnative-pg/cnpg-i-machinery@v0.4.2/pkg/pluginhelper/http/grpc.go:51\ngoogle.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1\n\t/go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1232\ngithub.com/cloudnative-pg/cnpg-i/pkg/wal._WAL_Archive_Handler\n\t/go/pkg/mod/github.com/cloudnative-pg/cnpg-i@v0.3.1/pkg/wal/wal_grpc.pb.go:196\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1428\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1832\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/go/pkg/mod/google.golang.org/grpc@v1.78.0/server.go:1063"}
Objectstore is
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: pg-cluster-store
namespace: pg-cluster
spec:
configuration:
destinationPath: "s3://fra-bkp/pg-cluster/"
endpointURL: "https://s3.xxx/"
endpointCA:
name: root-acme
key: root_ca.crt
s3Credentials:
accessKeyId:
name: s3-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: s3-creds
key: ACCESS_SECRET_KEY
Postgres logs includes that
{"level":"error","ts":"2026-01-15T16:44:58.517145Z","logger":"wal-archive","msg":"failed to run wal-archive command","logging_pod":"pg-cluster-1","error":"rpc error: code = Unknown desc = unexpected failure invoking barman-cloud-wal-archive: exit status 4","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\tpkg/mod/github.com/cloudnative-pg/machinery@v0.3.1/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/walarchive.NewCmd.func1\n\tinternal/cmd/manager/walarchive/cmd.go:70\ngithub.com/spf13/cobra.(*Command).execute\n\tpkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1015\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tpkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1148\ngithub.com/spf13/cobra.(*Command).Execute\n\tpkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1071\nmain.main\n\tcmd/manager/main.go:71\nruntime.main\n\t/opt/hostedtoolcache/go/1.25.5/x64/src/runtime/proc.go:285"}
Any idea to debug that ?