[Bug] gpactivatestandby -f fails with CRITICAL error even though standby is successfully promoted
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comience con la llamada a gpstart de gpactivatestandby mostrada en el informe y, a continuación, inspeccione la ruta _startCoordinator de gpstart y GpArray.initFromCatalog en lib/python/gppylib/gparray.py, junto con la gestión de conexiones en lib/python/gppylib/db/dbconn.py. Reproduzca el escenario de un apagado limpio y verifique que la activación del standby no informe de un fallo crítico y que el reinicio del clúster restante se complete sin un reinicio manual adicional.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Apache Cloudberry version
Apache Cloudberry 2.1.0-incubating
What happened
When running gpactivatestandby -a -f after a clean cluster shutdown, the activation fails with a critical error.
gpactivatestandby internally calls gpstart -c to bring up the standby coordinator in utility mode. However, gpstart itself tries to connect to the catalog as part of its startup sequence. The standby instance starts in recovery mode and connections are rejected immediately with:
20260503:13:38:37:000773 gpstart:standby:gpadmin-[ERROR]:-gpstart failed. exiting...
Traceback (most recent call last):
File "/usr/local/cloudberry-db/lib/python/gppylib/mainUtils.py", line 365, in simple_main_locked
exitCode = commandObject.run()
File "/usr/local/cloudberry-db/bin/gpstart", line 170, in run
self._startCoordinator()
File "/usr/local/cloudberry-db/bin/gpstart", line 513, in _startCoordinator
self.gparray = GpArray.initFromCatalog(self.dburl, utility=True)
File "/usr/local/cloudberry-db/lib/python/gppylib/gparray.py", line 959, in initFromCatalog
with closing(dbconn.connect(dbURL, utility)) as conn:
File "/usr/local/cloudberry-db/lib/python/gppylib/db/dbconn.py", line 263, in connect
connection = pgdb.connect(**conninfo)
File "/usr/local/cloudberry-db/lib/python/pgdb.py", line 1690, in connect
cnx = _connect(dbname, dbhost, dbport, dbopt, dbuser, dbpasswd)
pg.InternalError: connection to server at "localhost" (::1), port 5432 failed: FATAL: the database system is not accepting connections
DETAIL: Hot standby mode is disabled.
'
stderr=''
20260503:13:38:37:000743 gpactivatestandby:standby:gpadmin-[CRITICAL]:-Error activating standby coordinator: ExecutionError: 'non-zero rc: 2' occurred. Details: 'GPSTART_INTERNAL_COORDINATOR_ONLY=1 && $GPHOME/bin/gpstart -a -c -v -d /data/master/gpseg-1' cmd had rc=2 completed=True halted=False
This causes gpstart to exit with rc=2, which propagates back as a CRITICAL failure in gpactivatestandby, aborting the remaining steps — including the cluster restart that would have brought the segments online. The coordinator itself does eventually promote (the trigger file was written before calling gpstart).
It requires an additional cluster restart to correctly start the segments.
What you think should happen instead
No response
How to reproduce
- Initialize a Cloudberry cluster with a standby coordinator (
gpinitstandby). - Perform a clean, graceful shutdown of the cluster (
gpstop -a). - On the standby host, run
gpactivatestandby -a -f. - Observe the CRITICAL error — activation fails even though the standby coordinator process itself did start.
Operating System
Ubuntu
Anything else
No response
Are you willing to submit PR?
- Yes, I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct.
- Lenguaje dominante
- C
- Estrellas
- 1.4k
- Forks
- 262
- Merge medio
- 4 d 20 h
- PR fusionados (30 d)
- 57
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/cloudberry
-
[Bug] Expand fails to recognize user-defined tablespacesPosiblemente ocupada @nix-oss la tomó hace 61 días. Abiertotype: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/cloudberry#1885 · 2 reacciones ·
Los mantenedores suelen responder en 3 días
-
gpexpand first stage fails: 'SyncPackages' object has no attribute 'ret' (extension sync never runs; regression)Posiblemente ocupada @talmacschen-arch la tomó hace 122 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/cloudberry#1825 ·
Los mantenedores suelen responder en 3 días
-
Lance support: contrib/lance_fdw and the MCP server's Lance toolsPosiblemente ocupada @MisterRaindrop la tomó hace 3 días. Abierto
apache/cloudberry#2139 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
type: Bug
Dificultad 3/5 Medio día Aptitud para principiantes 58/100
apache/cloudberry#2137 ·
Los mantenedores suelen responder en 3 días
-
[Proposal] Remove `gpcontrib/gpmapreduce` starting from Cloudberry 3.0Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertotype: Proposal
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
apache/cloudberry#2136 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de apache/cloudberry
Issues similares
-
mewencode: base256[] and base128[] are indexed out of bounds by a non-ASCII octetPosiblemente ocupada @kazu-yamamoto la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kazu-yamamoto/Mew#276 ·
Los mantenedores suelen responder en 1 día
-
[iwm] transaction_get() copies the whole payload regardless of the length asked forPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
FujiNetWIFI/fujinet-firmware#2045 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
[Performance]: Qwen-Image-2.1 CPU-only on i5-10500H (6C AVX2, 32 GB): 512x512 in 7.7 min at 8 stepsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
area:gates area:gfx found-by:critic kind:gate-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
InauguralSystems/EigenScript#1825 ·
Los mantenedores suelen responder en 1 día