plugin-barman-cloud icon indicating copy to clipboard operation
plugin-barman-cloud copied to clipboard

replica crashlooping - end of WAL reached

Open Brice187 opened this issue 1 year ago • 1 comments

POD: clusters-5

{"level":"info","ts":"2025-09-08T14:40:37.005964235Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.005 UTC","user_name":"postgres","database_name":"postgres","process_id":"174","connection_from":"[local]","session_id":"68beeae4.ae","session_line_num":"1","session_start_time":"2025-09-08 14:40:36 UTC","transaction_id":"0","error_severity":"FATAL","sql_state_code":"57P03","message":"the database system is starting up","backend_type":"client backend","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.006963744Z","msg":"Instance is still down, will retry in 1 second","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster","Cluster":{"name":"clusters","namespace":"clusters-database"},"namespace":"clusters-database","name":"clusters","reconcileID":"a35efe9a-0bb0-4765-a97a-4a21db70495a","instance":"clusters-5","cluster":"clusters","namespace":"clusters-database","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.129448342Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.129 UTC","process_id":"42","session_id":"68beeadd.2a","session_line_num":"4","session_start_time":"2025-09-08 14:40:29 UTC","transaction_id":"0","error_severity":"LOG","sql_state_code":"00000","message":"restored log file \"000000260000000100000009\" from archive","backend_type":"startup","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.195640476Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.195 UTC","process_id":"42","session_id":"68beeadd.2a","session_line_num":"5","session_start_time":"2025-09-08 14:40:29 UTC","transaction_id":"0","error_severity":"LOG","sql_state_code":"00000","message":"entering standby mode","backend_type":"startup","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.195731632Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.195 UTC","process_id":"42","session_id":"68beeadd.2a","session_line_num":"6","session_start_time":"2025-09-08 14:40:29 UTC","transaction_id":"0","error_severity":"FATAL","sql_state_code":"XX000","message":"requested timeline 39 is not a child of this server's history","detail":"Latest checkpoint is at 1/9000080 on timeline 38, but in the history of the requested timeline, the server forked off from that timeline at 0/880000A0.","backend_type":"startup","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.200008708Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.199 UTC","process_id":"38","session_id":"68beeadd.26","session_line_num":"6","session_start_time":"2025-09-08 14:40:29 UTC","transaction_id":"0","error_severity":"LOG","sql_state_code":"00000","message":"startup process (PID 42) exited with exit code 1","backend_type":"postmaster","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.200059065Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.199 UTC","process_id":"38","session_id":"68beeadd.26","session_line_num":"7","session_start_time":"2025-09-08 14:40:29 UTC","transaction_id":"0","error_severity":"LOG","sql_state_code":"00000","message":"aborting startup due to startup process failure","backend_type":"postmaster","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.200545196Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.200 UTC","process_id":"38","session_id":"68beeadd.26","session_line_num":"8","session_start_time":"2025-09-08 14:40:29 UTC","transaction_id":"0","error_severity":"LOG","sql_state_code":"00000","message":"database system is shut down","backend_type":"postmaster","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.200713683Z","logger":"postgres","msg":"record","logging_pod":"clusters-5","record":{"log_time":"2025-09-08 14:40:37.200 UTC","user_name":"postgres","database_name":"postgres","process_id":"175","connection_from":"[local]","session_id":"68beeae5.af","session_line_num":"1","session_start_time":"2025-09-08 14:40:37 UTC","transaction_id":"0","error_severity":"FATAL","sql_state_code":"57P03","message":"the database system is starting up","backend_type":"client backend","query_id":"0"}}
{"level":"info","ts":"2025-09-08T14:40:37.208982888Z","msg":"postmaster exited","logger":"instance-manager","logging_pod":"clusters-5","postmasterExitStatus":"exit status 1","postMasterPID":38}
{"level":"info","ts":"2025-09-08T14:40:37.209042281Z","msg":"Extracting pg_controldata information","logger":"instance-manager","logging_pod":"clusters-5","reason":"postmaster has exited"}
{"level":"info","ts":"2025-09-08T14:40:37.21043106Z","logger":"pg_controldata","msg":"pg_control version number:            1700\nCatalog version number:               202406281\nDatabase system identifier:           7481329241739345951\nDatabase cluster state:               in production\npg_control last modified:             Mon 08 Sep 2025 02:08:10 PM UTC\nLatest checkpoint location:           1/9000080\nLatest checkpoint's REDO location:    1/9000028\nLatest checkpoint's REDO WAL file:    000000260000000100000009\nLatest checkpoint's TimeLineID:       38\nLatest checkpoint's PrevTimeLineID:   38\nLatest checkpoint's full_page_writes: on\nLatest checkpoint's NextXID:          0:1043\nLatest checkpoint's NextOID:          29044\nLatest checkpoint's NextMultiXactId:  1\nLatest checkpoint's NextMultiOffset:  0\nLatest checkpoint's oldestXID:        730\nLatest checkpoint's oldestXID's DB:   1\nLatest checkpoint's oldestActiveXID:  1043\nLatest checkpoint's oldestMultiXid:   1\nLatest checkpoint's oldestMulti's DB: 1\nLatest checkpoint's oldestCommitTsXid:0\nLatest checkpoint's newestCommitTsXid:0\nTime of latest checkpoint:            Mon 08 Sep 2025 02:08:10 PM UTC\nFake LSN counter for unlogged rels:   0/3E8\nMinimum recovery ending location:     0/0\nMin recovery ending loc's timeline:   0\nBackup start location:                0/0\nBackup end location:                  0/0\nEnd-of-backup record required:        no\nwal_level setting:                    logical\nwal_log_hints setting:                on\nmax_connections setting:              20\nmax_worker_processes setting:         4\nmax_wal_senders setting:              10\nmax_prepared_xacts setting:           0\nmax_locks_per_xact setting:           64\ntrack_commit_timestamp setting:       off\nMaximum data alignment:               8\nDatabase block size:                  8192\nBlocks per segment of large relation: 131072\nWAL block size:                       8192\nBytes per WAL segment:                16777216\nMaximum length of identifiers:        64\nMaximum columns in an index:          32\nMaximum size of a TOAST chunk:        1996\nSize of a large-object chunk:         2048\nDate/time type storage:               64-bit integers\nFloat8 argument passing:              by value\nData page checksum version:           0\nMock authentication nonce:            fd6ddf19c1c6f0507f9de288fea0ce1189e1567961bb1383ce81729cd4567809\n","pipe":"stdout","logging_pod":"clusters-5"}
{"level":"error","ts":"2025-09-08T14:40:37.210494137Z","msg":"PostgreSQL process exited with errors","logger":"instance-manager","logging_pod":"clusters-5","error":"exit status 1","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\tpkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/instance/run/lifecycle.(*PostgresLifecycle).Start.func1\n\tinternal/cmd/manager/instance/run/lifecycle/lifecycle.go:108\ngithub.com/cloudnative-pg/cloudnative-pg/internal/cmd/manager/instance/run/lifecycle.(*PostgresLifecycle).Start\n\tinternal/cmd/manager/instance/run/lifecycle/lifecycle.go:116\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\tpkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"info","ts":"2025-09-08T14:40:37.210611147Z","msg":"Stopping and waiting for non leader election runnables","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.210635264Z","msg":"Stopping and waiting for leader election runnables","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.21068266Z","msg":"Shutdown signal received, waiting for all workers to finish","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-subscription","controllerGroup":"postgresql.cnpg.io","controllerKind":"Subscription"}
{"level":"info","ts":"2025-09-08T14:40:37.210690096Z","msg":"Shutdown signal received, waiting for all workers to finish","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-external-server","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster"}
{"level":"error","ts":"2025-09-08T14:40:37.210645116Z","msg":"error received after stop sequence was engaged","logger":"instance-manager","logging_pod":"clusters-5","error":"exit status 1","stacktrace":"sigs.k8s.io/controller-runtime/pkg/manager.(*controllerManager).engageStopProcedure.func1\n\tpkg/mod/sigs.k8s.io/[email protected]/pkg/manager/internal.go:512"}
{"level":"info","ts":"2025-09-08T14:40:37.2107024Z","logger":"roles_reconciler","msg":"Terminated RoleSynchronizer loop","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.21073739Z","msg":"Exited log pipe","logger":"instance-manager","fileName":"/controller/log/postgres","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.210713353Z","msg":"Shutdown signal received, waiting for all workers to finish","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-database","controllerGroup":"postgresql.cnpg.io","controllerKind":"Database"}
{"level":"info","ts":"2025-09-08T14:40:37.210737223Z","msg":"Shutdown signal received, waiting for all workers to finish","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-tablespaces","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster"}
{"level":"info","ts":"2025-09-08T14:40:37.21076383Z","msg":"All workers finished","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-database","controllerGroup":"postgresql.cnpg.io","controllerKind":"Database"}
{"level":"info","ts":"2025-09-08T14:40:37.210767336Z","msg":"Shutdown signal received, waiting for all workers to finish","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster"}
{"level":"info","ts":"2025-09-08T14:40:37.210772787Z","msg":"All workers finished","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-cluster","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster"}
{"level":"info","ts":"2025-09-08T14:40:37.210766525Z","msg":"Exited log pipe","logger":"instance-manager","fileName":"/controller/log/postgres.csv","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.210779715Z","msg":"Shutdown signal received, waiting for all workers to finish","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-publication","controllerGroup":"postgresql.cnpg.io","controllerKind":"Publication"}
{"level":"info","ts":"2025-09-08T14:40:37.210786603Z","msg":"All workers finished","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-tablespaces","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster"}
{"level":"info","ts":"2025-09-08T14:40:37.210795712Z","msg":"All workers finished","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-publication","controllerGroup":"postgresql.cnpg.io","controllerKind":"Publication"}
{"level":"info","ts":"2025-09-08T14:40:37.210804846Z","msg":"All workers finished","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-external-server","controllerGroup":"postgresql.cnpg.io","controllerKind":"Cluster"}
{"level":"info","ts":"2025-09-08T14:40:37.210792179Z","msg":"All workers finished","logger":"instance-manager","logging_pod":"clusters-5","controller":"instance-subscription","controllerGroup":"postgresql.cnpg.io","controllerKind":"Subscription"}
{"level":"info","ts":"2025-09-08T14:40:37.210808253Z","msg":"Exited log pipe","logger":"instance-manager","fileName":"/controller/log/postgres.json","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.210838659Z","msg":"Webserver exited","logger":"instance-manager","logging_pod":"clusters-5","address":"localhost:8010"}
{"level":"info","ts":"2025-09-08T14:40:37.21087608Z","msg":"Webserver exited","logger":"instance-manager","logging_pod":"clusters-5","address":":9187"}
{"level":"info","ts":"2025-09-08T14:40:37.210982785Z","msg":"Webserver exited","logger":"instance-manager","logging_pod":"clusters-5","address":":8000"}
{"level":"info","ts":"2025-09-08T14:40:37.211008898Z","msg":"Stopping and waiting for caches","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.211158746Z","msg":"Stopping and waiting for webhooks","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.211175439Z","msg":"Stopping and waiting for HTTP servers","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.211184671Z","msg":"Wait completed, proceeding to shutdown the manager","logger":"instance-manager","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.211200992Z","msg":"Checking for free disk space for WALs after PostgreSQL finished","logger":"instance-manager","logging_pod":"clusters-5"}

kubectl -n clusters-database logs clusters-5 -c plugin-barman-cloud

{"level":"info","ts":"2025-09-08T14:40:29.714038825Z","msg":"Restoring WAL file","logging_pod":"clusters-5","objectStore":"clusters-objectstore","serverName":"clusters","walName":"00000027.history"}
{"level":"error","ts":"2025-09-08T14:40:29.716697847Z","msg":"Error while handling GRPC request","logging_pod":"clusters-5","info":{"Server":{"Client":{"Client":{}},"InstanceName":"clusters-5","SpoolDirectory":"/controller/wal-restore-spool","PGDataPath":"/var/lib/postgresql/data/pgdata","PGWALPath":"/var/lib/postgresql/data/pgdata/pg_wal"},"FullMethod":"/cnpgi.wal.v1.WAL/Restore"},"error":"end of WAL reached","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http.(*Server).Start.logFailedRequestsUnaryServerInterceptor.func2\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/pluginhelper/http/grpc.go:51\ngoogle.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1234\ngithub.com/cloudnative-pg/cnpg-i/pkg/wal._WAL_Restore_Handler\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/wal/wal_grpc.pb.go:214\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1431\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1842\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1061"}
{"level":"info","ts":"2025-09-08T14:40:30.021166913Z","msg":"Restoring WAL file","logging_pod":"clusters-5","objectStore":"clusters-objectstore","serverName":"clusters","walName":"00000028.history"}
{"level":"info","ts":"2025-09-08T14:40:31.513817744Z","msg":"WAL file not found in the recovery object store","logging_pod":"clusters-5","walName":"00000028.history","options":["--endpoint-url","https://storage.example.com","--cloud-provider","aws-s3","s3://database-backup","clusters"],"startTime":"2025-09-08T14:40:30.023471917Z","endTime":"2025-09-08T14:40:31.513778495Z","elapsedWalTime":1.490306591}
{"level":"error","ts":"2025-09-08T14:40:31.513891144Z","msg":"Error while handling GRPC request","logging_pod":"clusters-5","info":{"Server":{"Client":{"Client":{}},"InstanceName":"clusters-5","SpoolDirectory":"/controller/wal-restore-spool","PGDataPath":"/var/lib/postgresql/data/pgdata","PGWALPath":"/var/lib/postgresql/data/pgdata/pg_wal"},"FullMethod":"/cnpgi.wal.v1.WAL/Restore"},"error":"WAL file not found","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http.(*Server).Start.logFailedRequestsUnaryServerInterceptor.func2\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/pluginhelper/http/grpc.go:51\ngoogle.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1234\ngithub.com/cloudnative-pg/cnpg-i/pkg/wal._WAL_Restore_Handler\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/wal/wal_grpc.pb.go:214\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1431\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1842\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1061"}
{"level":"info","ts":"2025-09-08T14:40:31.738986804Z","msg":"Restoring WAL file","logging_pod":"clusters-5","objectStore":"clusters-objectstore","serverName":"clusters","walName":"00000027.history"}
{"level":"info","ts":"2025-09-08T14:40:33.207882495Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"00000027.history","startTime":"2025-09-08T14:40:31.741138228Z","endTime":"2025-09-08T14:40:33.207819972Z","elapsedWalTime":1.466681757}
{"level":"info","ts":"2025-09-08T14:40:33.207938407Z","msg":"WAL restore command completed (parallel)","logging_pod":"clusters-5","walName":"00000027.history","maxParallel":16,"successfulWalRestore":1,"failedWalRestore":15,"startTime":"2025-09-08T14:40:31.739018161Z","downloadStartTime":"2025-09-08T14:40:31.741126761Z","downloadTotalTime":1.466805685,"totalTime":1.46891449}
{"level":"info","ts":"2025-09-08T14:40:33.321499915Z","msg":"Restoring WAL file","logging_pod":"clusters-5","objectStore":"clusters-objectstore","serverName":"clusters","walName":"000000270000000100000009"}
{"level":"info","ts":"2025-09-08T14:40:35.021023361Z","msg":"WAL file not found in the recovery object store","logging_pod":"clusters-5","walName":"000000270000000100000009","options":["--endpoint-url","https://storage.example.com","--cloud-provider","aws-s3","s3://database-backup","clusters"],"startTime":"2025-09-08T14:40:33.324763543Z","endTime":"2025-09-08T14:40:35.020982383Z","elapsedWalTime":1.696218845}
{"level":"error","ts":"2025-09-08T14:40:35.100689492Z","msg":"Error while handling GRPC request","logging_pod":"clusters-5","info":{"Server":{"Client":{"Client":{}},"InstanceName":"clusters-5","SpoolDirectory":"/controller/wal-restore-spool","PGDataPath":"/var/lib/postgresql/data/pgdata","PGWALPath":"/var/lib/postgresql/data/pgdata/pg_wal"},"FullMethod":"/cnpgi.wal.v1.WAL/Restore"},"error":"WAL file not found","stacktrace":"github.com/cloudnative-pg/machinery/pkg/log.(*logger).Error\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/log/log.go:125\ngithub.com/cloudnative-pg/cnpg-i-machinery/pkg/pluginhelper/http.(*Server).Start.logFailedRequestsUnaryServerInterceptor.func2\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/pluginhelper/http/grpc.go:51\ngoogle.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1234\ngithub.com/cloudnative-pg/cnpg-i/pkg/wal._WAL_Restore_Handler\n\t/go/pkg/mod/github.com/cloudnative-pg/[email protected]/pkg/wal/wal_grpc.pb.go:214\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1431\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1842\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1061"}
{"level":"info","ts":"2025-09-08T14:40:35.326611668Z","msg":"Restoring WAL file","logging_pod":"clusters-5","objectStore":"clusters-objectstore","serverName":"clusters","walName":"000000260000000100000009"}
{"level":"info","ts":"2025-09-08T14:40:37.046878528Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"00000026000000010000000D","startTime":"2025-09-08T14:40:35.329489191Z","endTime":"2025-09-08T14:40:37.046797442Z","elapsedWalTime":1.717308248}
{"level":"info","ts":"2025-09-08T14:40:37.055800331Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"00000026000000010000000A","startTime":"2025-09-08T14:40:35.329221498Z","endTime":"2025-09-08T14:40:37.055758434Z","elapsedWalTime":1.726536947}
{"level":"info","ts":"2025-09-08T14:40:37.061062519Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"00000026000000010000000C","startTime":"2025-09-08T14:40:35.329166841Z","endTime":"2025-09-08T14:40:37.061047458Z","elapsedWalTime":1.731880614}
{"level":"info","ts":"2025-09-08T14:40:37.061179198Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"00000026000000010000000E","startTime":"2025-09-08T14:40:35.32945535Z","endTime":"2025-09-08T14:40:37.061154131Z","elapsedWalTime":1.731698782}
{"level":"info","ts":"2025-09-08T14:40:37.081200519Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"000000260000000100000009","startTime":"2025-09-08T14:40:35.329328127Z","endTime":"2025-09-08T14:40:37.08118117Z","elapsedWalTime":1.751853043}
{"level":"info","ts":"2025-09-08T14:40:37.124393317Z","msg":"Restored WAL file","logging_pod":"clusters-5","walName":"00000026000000010000000B","startTime":"2025-09-08T14:40:35.329757513Z","endTime":"2025-09-08T14:40:37.124380869Z","elapsedWalTime":1.794623355}
{"level":"info","ts":"2025-09-08T14:40:37.124445072Z","msg":"Set end-of-wal-stream flag as one of the WAL files to be prefetched was not found","logging_pod":"clusters-5"}
{"level":"info","ts":"2025-09-08T14:40:37.124656607Z","msg":"WAL restore command completed (parallel)","logging_pod":"clusters-5","walName":"000000260000000100000009","maxParallel":16,"successfulWalRestore":6,"failedWalRestore":10,"startTime":"2025-09-08T14:40:35.326647744Z","downloadStartTime":"2025-09-08T14:40:35.329025336Z","downloadTotalTime":1.795623714,"totalTime":1.798001541}
``

Brice187 avatar Sep 08 '25 14:09 Brice187

Your replica is crashlooping because it's hitting a timeline mismatch and missing WAL files. The key error, requested timeline 39 is not a child of this server's history, means the replica is trying to recover on timeline 39, but its last checkpoint is on timeline 38. This usually happens after a failover or promotion: the primary advances to a new timeline, but the replica can't find the required WAL segments for the new timeline in the archive, so recovery can't continue and the pod crashloops. The end of WAL reached and WAL file not found errors confirm that the necessary WAL files are missing from your object store, which is often due to incomplete WAL archiving or misconfiguration on the primary (like missing isWALArchiver: true, typos in the destination path, missing secrets, or S3/MinIO compatibility issues) [source].

To troubleshoot:

  • Check if there was a recent failover or promotion that advanced the timeline.
  • Verify WAL archiving is working on the current primary: check pod logs for archiving errors and confirm the required WAL files for timeline 39 are present in your object store.
  • Make sure your plugin-barman-cloud version includes the fix from PR #458, which adds checks for empty/incomplete WAL archives [source].
  • Double-check your cluster and ObjectStore config for typos, missing isWALArchiver: true, and that all secrets are in the correct namespace.
  • For S3/MinIO, ensure AWS_REQUEST_CHECKSUM_CALCULATION and AWS_RESPONSE_CHECKSUM_VALIDATION are set to when_required.
  • If the archive is incomplete, you may need to resync or reinitialize the replica (e.g., delete its PVC and restart), but if WALs for the new timeline are missing, this alone won't fix it [source].

CloudNativePG and the plugin surface these errors directly from PostgreSQL and will crashloop the pod if recovery can't proceed. If you fix the WAL archiving and ensure all required WALs are present, the replica should recover and join the cluster. For more details and similar cases, see cloudnative-pg/issues/2800 and cloudnative-pg/issues/4551.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about plugin-barman-cloud Share Dosu with your team

dosubot[bot] avatar Sep 08 '25 14:09 dosubot[bot]