Hola a todos,
Hace unos días, actualicé mi instancia de Discourse a la última versión. (Lamentablemente, no tengo el número exacto de la versión desde la que actualicé ni a la que lo hice). La instalación falló, sin embargo, pude revertir la actualización y reconstruir la aplicación de Discourse, y el sitio volvió a funcionar normalmente.
Al día siguiente, decidí intentar la actualización nuevamente; esta vez falló otra vez y obtuve una de esas páginas de «Ups - Error 500». Intenté reconstruir la aplicación varias veces, pero seguía obteniendo errores de reconstrucción; uno de los que recuerdo estaba relacionado con un tiempo de espera de yarn en la red. Al desplazarme hacia arriba en los registros, aparecía el mensaje «Parece que hay un problema con tu red, reintentando…» varias veces hasta que dejaba de intentarlo y pasaba a lo siguiente. Lamentablemente, no tengo una foto de esto, pero sí tengo una foto del mensaje de error a continuación.
Después de muchas reconstrucciones y de buscar los errores que obtenía en el registro en este foro sin llegar a ninguna conclusión real, hice una copia de seguridad de mi instalación de Discourse desde la línea de comandos de Rails y me aseguré de tener algunas copias de seguridad anteriores. Luego, eliminé la máquina virtual que estaba ejecutando Discourse. Es importante mencionar que estaba ejecutando Ubuntu 20.04 LTS.
Luego, recreé la máquina virtual con Ubuntu 20.04 LTS y seguí los pasos para reinstalar Discourse en una instalación estándar, pero los mismos problemas continuaron surgiendo. A veces también obtenía un error en los registros de instalación indicando que la base de datos PostgreSQL aún estaba iniciándose. Otro error que noté fue que, cuando se clonaban los plugins, aparecía un error de acceso denegado.
Incluso intenté recrear la máquina virtual con Ubuntu 22.04.04 LTS para ver si eso ayudaba, pero no solucionó ningún problema.
En cuanto a los plugins, todos los que uso son oficiales de Discourse; incluso intenté eliminar todos mis plugins, pero eso tampoco sirvió de nada.
Toda esta situación ha sido realmente frustrante para mí, ya que mi foro ha estado fuera de línea durante bastante tiempo. Es importante mencionar que no estoy ejecutando la instalación en la nube, sino en una máquina virtual en un servidor dedicado en mi casa. Los recursos asignados a la máquina virtual cumplen con los requisitos del sistema de Discourse, sin embargo, un aspecto importante a tener en cuenta es que el servidor funciona con un disco duro mecánico lento, lo que hace que las reconstrucciones tarden aproximadamente 20-30 minutos. También he leído que el disco lento podría causar que yarn se quede sin tiempo de espera, aunque no estoy completamente seguro de que esto sea causado por el dispositivo de almacenamiento. Planeo reemplazar el disco mecánico por uno de estado sólido (SSD) pronto, ya que parece que el disco duro mecánico (HDD) está fallando. A continuación, adjunto una imagen que tomé de CrystalDisk mostrando el estado del disco duro.
No había habido ningún problema con la configuración que usaba para alojar mi foro hasta que ocurrió esto. Mi red está configurada correctamente, con los puertos HTTP/HTTPS de la máquina virtual redirigidos a Internet público, y la máquina virtual tiene asignados recursos que cumplen con los requisitos de Discourse, además de estar usando una versión LTS de Ubuntu. La máquina virtual se ejecuta en Windows Server 2019 bajo Windows Hyper-V.
Estoy comenzando a creer que puede haber un problema relacionado con mi hardware o configuración, aunque no sé hasta qué punto se extiende este problema.
Aquí están los registros del último comando ./launcher rebuild app:
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
2.0.20231218-0429: Pulling from discourse/base
Digest: sha256:468f70b9bb4c6d0c6c2bbb3efc1a5e12d145eae57bdb6946b7fe5558beb52dc1
Status: Image is up to date for discourse/base:2.0.20231218-0429
docker.io/discourse/base:2.0.20231218-0429
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-03-19T16:32:41.438256 #1] INFO -- : Reading from stdin
I, [2024-03-19T16:32:41.459943 #1] INFO -- : > locale-gen $LANG && update-local e
I, [2024-03-19T16:32:41.567791 #1] INFO -- : Generating locales (this might tak e a while)...
Generation complete.
I, [2024-03-19T16:32:41.568457 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2024-03-19T16:32:41.574854 #1] INFO -- :
I, [2024-03-19T16:32:41.575495 #1] INFO -- : > chown postgres:postgres /shared/ postgres_run
I, [2024-03-19T16:32:41.581326 #1] INFO -- :
I, [2024-03-19T16:32:41.581893 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2024-03-19T16:32:41.587104 #1] INFO -- :
I, [2024-03-19T16:32:41.587652 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2024-03-19T16:32:41.593452 #1] INFO -- :
I, [2024-03-19T16:32:41.594102 #1] INFO -- : > ln -s /shared/postgres_run /var/ run/postgresql
I, [2024-03-19T16:32:41.599363 #1] INFO -- :
I, [2024-03-19T16:32:41.599920 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/sh ared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2024/03/19 16:32:41 socat[20] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5 432", 36): Connection refused
I, [2024-03-19T16:32:41.612696 #1] INFO -- :
I, [2024-03-19T16:32:41.613175 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2024-03-19T16:32:41.620936 #1] INFO -- :
I, [2024-03-19T16:32:41.621584 #1] INFO -- : > rm -fr /shared/postgres_run/*.pi d
I, [2024-03-19T16:32:41.629005 #1] INFO -- :
I, [2024-03-19T16:32:41.629459 #1] INFO -- : > mkdir -p /shared/postgres_run/13 -main.pg_stat_tmp
I, [2024-03-19T16:32:41.635403 #1] INFO -- :
I, [2024-03-19T16:32:41.636075 #1] INFO -- : > chown postgres:postgres /shared/ postgres_run/13-main.pg_stat_tmp
I, [2024-03-19T16:32:41.642020 #1] INFO -- :
I, [2024-03-19T16:32:41.654972 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2024-03-19T16:32:41.668688 #1] INFO -- : File > /etc/service/postgres/log/r un chmod: +x chown:
I, [2024-03-19T16:32:41.680605 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2024-03-19T16:32:41.692403 #1] INFO -- : File > /root/upgrade_postgres chm od: +x chown:
I, [2024-03-19T16:32:41.693451 #1] INFO -- : > chown -R root /var/lib/postgresq l/13/main
I, [2024-03-19T16:34:37.968585 #1] INFO -- :
I, [2024-03-19T16:34:37.968992 #1] INFO -- : > [ ! -e /shared/postgres_data ] & & install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2024-03-19T16:34:37.975335 #1] INFO -- :
I, [2024-03-19T16:34:37.975526 #1] INFO -- : > chown -R postgres:postgres /shar ed/postgres_data
I, [2024-03-19T16:34:38.003767 #1] INFO -- :
I, [2024-03-19T16:34:38.004482 #1] INFO -- : > chown -R postgres:postgres /var/ run/postgresql
I, [2024-03-19T16:34:38.012328 #1] INFO -- :
I, [2024-03-19T16:34:38.013012 #1] INFO -- : > /root/upgrade_postgres
I, [2024-03-19T16:34:38.027169 #1] INFO -- :
I, [2024-03-19T16:34:38.027657 #1] INFO -- : > rm /root/upgrade_postgres
I, [2024-03-19T16:34:38.032914 #1] INFO -- :
I, [2024-03-19T16:34:38.033769 #1] INFO -- : Replacing data_directory = '/var/l ib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/pos tgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.035668 #1] INFO -- : Replacing (?-mix:#?listen_addresse s *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.109152 #1] INFO -- : Replacing (?-mix:#?synchronous_com mit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13 /main/postgresql.conf
I, [2024-03-19T16:34:38.133759 #1] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgr esql.conf
I, [2024-03-19T16:34:38.158429 #1] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.183076 #1] INFO -- : Replacing (?-mix:#?default_text_se arch_config *=.*) with default_text_search_config = '$db_default_text_search_con fig' in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.207491 #1] INFO -- : > install -d -m 0755 -o postgres - g postgres /shared/postgres_backup
I, [2024-03-19T16:34:38.214924 #1] INFO -- :
I, [2024-03-19T16:34:38.216145 #1] INFO -- : Replacing (?-mix:#?checkpoint_segm ents *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql /13/main/postgresql.conf
I, [2024-03-19T16:34:38.232187 #1] INFO -- : Replacing (?-mix:#?logging_collect or *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/ma in/postgresql.conf
I, [2024-03-19T16:34:38.256804 #1] INFO -- : Replacing (?-mix:#?log_min_duratio n_statement *=.*) with log_min_duration_statement = $db_log_min_duration_stateme nt in /etc/postgresql/13/main/postgresql.conf
I, [2024-03-19T16:34:38.281452 #1] INFO -- : Replacing (?-mix:^#local +replicat ion +postgres +peer$) with local replication postgres peer in /etc/postgresql/1 3/main/pg_hba.conf
I, [2024-03-19T16:34:38.282725 #1] INFO -- : Replacing (?-mix:^host.*all.*all.* 127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-03-19T16:34:38.330730 #1] INFO -- : Replacing (?-mix:^host.*all.*all.* ::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-03-19T16:34:38.355097 #1] INFO -- : > HOME=/var/lib/postgresql USER=po stgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /u sr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
I, [2024-03-19T16:34:38.358895 #1] INFO -- : > sleep 5
2024-03-19 16:34:38.803 UTC [43] LOG: starting PostgreSQL 13.13 (Debian 13.13-1 .pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 202 10110, 64-bit
2024-03-19 16:34:38.804 UTC [43] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-03-19 16:34:38.804 UTC [43] LOG: listening on IPv6 address "::", port 5432
2024-03-19 16:34:39.043 UTC [43] LOG: listening on Unix socket "/var/run/postgr esql/.s.PGSQL.5432"
2024-03-19 16:34:39.808 UTC [46] LOG: database system shutdown was interrupted; last known up at 2024-03-19 16:29:44 UTC
2024-03-19 16:34:40.550 UTC [46] LOG: database system was not properly shut dow n; automatic recovery in progress
2024-03-19 16:34:40.687 UTC [46] LOG: redo starts at 0/1BD48B8
2024-03-19 16:34:40.687 UTC [46] LOG: invalid record length at 0/1BD49A0: wante d 24, got 0
2024-03-19 16:34:40.687 UTC [46] LOG: redo done at 0/1BD4968
2024-03-19 16:34:41.469 UTC [43] LOG: database system is ready to accept connec tions
I, [2024-03-19T16:34:43.364553 #1] INFO -- :
I, [2024-03-19T16:34:43.365415 #1] INFO -- : > su postgres -c 'createdb discour se' || true
2024-03-19 16:34:43.539 UTC [56] postgres@postgres ERROR: database "discourse" already exists
2024-03-19 16:34:43.539 UTC [56] postgres@postgres STATEMENT: CREATE DATABASE d iscourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2024-03-19T16:34:43.543547 #1] INFO -- :
I, [2024-03-19T16:34:43.544689 #1] INFO -- : > su postgres -c 'psql discourse - c "create user discourse;"' || true
2024-03-19 16:34:43.722 UTC [60] postgres@discourse ERROR: role "discourse" alr eady exists
2024-03-19 16:34:43.722 UTC [60] postgres@discourse STATEMENT: create user disc ourse;
ERROR: role "discourse" already exists
I, [2024-03-19T16:34:43.726332 #1] INFO -- :
I, [2024-03-19T16:34:43.727467 #1] INFO -- : > su postgres -c 'psql discourse - c "grant all privileges on database discourse to discourse;"' || true
I, [2024-03-19T16:34:43.889339 #1] INFO -- : GRANT
I, [2024-03-19T16:34:43.890574 #1] INFO -- : > su postgres -c 'psql discourse - c "alter schema public owner to discourse;"'
I, [2024-03-19T16:34:44.060633 #1] INFO -- : ALTER SCHEMA
I, [2024-03-19T16:34:44.061745 #1] INFO -- : > su postgres -c 'psql template1 - c "create extension if not exists hstore;"'
NOTICE: extension "hstore" already exists, skipping
I, [2024-03-19T16:34:44.249298 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.250601 #1] INFO -- : > su postgres -c 'psql template1 - c "create extension if not exists pg_trgm;"'
NOTICE: extension "pg_trgm" already exists, skipping
I, [2024-03-19T16:34:44.429609 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.430432 #1] INFO -- : > su postgres -c 'psql template1 - c "create extension if not exists vector;"'
NOTICE: extension "vector" already exists, skipping
I, [2024-03-19T16:34:44.606159 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.607078 #1] INFO -- : > su postgres -c 'psql discourse - c "create extension if not exists hstore;"'
NOTICE: extension "hstore" already exists, skipping
I, [2024-03-19T16:34:44.777476 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.778760 #1] INFO -- : > su postgres -c 'psql discourse - c "create extension if not exists pg_trgm;"'
NOTICE: extension "pg_trgm" already exists, skipping
I, [2024-03-19T16:34:44.941936 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:44.942985 #1] INFO -- : > su postgres -c 'psql discourse - c "create extension if not exists vector;"'
NOTICE: extension "vector" already exists, skipping
I, [2024-03-19T16:34:45.126152 #1] INFO -- : CREATE EXTENSION
I, [2024-03-19T16:34:45.127264 #1] INFO -- : > sudo -u postgres psql discourse
I, [2024-03-19T16:34:45.131449 #1] INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_t o_encoding('SQL_ASCII');
I, [2024-03-19T16:34:45.319678 #1] INFO -- : File > /var/lib/postgresql/take-da tabase-backup chmod: +x chown: postgres:postgres
I, [2024-03-19T16:34:45.327509 #1] INFO -- : File > /var/spool/cron/crontabs/po stgres chmod: chown:
I, [2024-03-19T16:34:45.327975 #1] INFO -- : > echo postgres installed!
I, [2024-03-19T16:34:45.337715 #1] INFO -- : postgres installed!
I, [2024-03-19T16:34:45.350316 #1] INFO -- : File > /etc/service/redis/run chm od: +x chown:
I, [2024-03-19T16:34:45.364575 #1] INFO -- : File > /etc/service/redis/log/run chmod: +x chown:
I, [2024-03-19T16:34:45.376683 #1] INFO -- : File > /etc/runit/3.d/10-redis ch mod: +x chown:
I, [2024-03-19T16:34:45.377876 #1] INFO -- : Replacing daemonize yes with in / etc/redis/redis.conf
I, [2024-03-19T16:34:45.379812 #1] INFO -- : Replacing (?-mix:^pidfile.*$) with in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.522977 #1] INFO -- : > install -d -m 0755 -o redis -g r edis /shared/redis_data
I, [2024-03-19T16:34:45.530519 #1] INFO -- :
I, [2024-03-19T16:34:45.531688 #1] INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.605605 #1] INFO -- : Replacing (?-mix:^bind .*$) with in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.654747 #1] INFO -- : Replacing (?-mix:^dir .*$) with di r /shared/redis_data in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.704127 #1] INFO -- : Replacing (?-mix:^protected-mode y es) with protected-mode no in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.753115 #1] INFO -- : Replacing # io-threads 4 with io-t hreads $redis_io_threads in /etc/redis/redis.conf
I, [2024-03-19T16:34:45.802297 #1] INFO -- : > echo redis installed
I, [2024-03-19T16:34:45.808061 #1] INFO -- : redis installed
I, [2024-03-19T16:34:45.808693 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2024-03-19T16:34:45.818814 #1] INFO -- : logfile ""
I, [2024-03-19T16:34:45.819515 #1] INFO -- : > exec chpst -u redis -U redis /us r/bin/redis-server /etc/redis/redis.conf
I, [2024-03-19T16:34:45.823505 #1] INFO -- : > sleep 10
112:C 19 Mar 2024 16:34:45.842 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
112:C 19 Mar 2024 16:34:45.842 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=112, just started
112:C 19 Mar 2024 16:34:45.842 # Configuration loaded
112:M 19 Mar 2024 16:34:45.844 * monotonic clock: POSIX clock_gettime
112:M 19 Mar 2024 16:34:45.845 * Running mode=standalone, port=6379.
112:M 19 Mar 2024 16:34:45.846 # Server initialized
112:M 19 Mar 2024 16:34:45.846 # WARNING Memory overcommit must be enabled! With out it, a background save or replication may fail under low memory condition. Be ing disabled, it can can also cause failures without low memory condition, see h ttps://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overc ommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
112:M 19 Mar 2024 16:34:45.847 * Loading RDB produced by version 7.0.7
112:M 19 Mar 2024 16:34:45.847 * RDB age 305 seconds
112:M 19 Mar 2024 16:34:45.847 * RDB memory usage when created 0.83 Mb
112:M 19 Mar 2024 16:34:45.847 * Done loading RDB, keys loaded: 11, keys expired : 0.
112:M 19 Mar 2024 16:34:45.848 * DB loaded from disk: 0.001 seconds
112:M 19 Mar 2024 16:34:45.848 * Ready to accept connections
I, [2024-03-19T16:34:55.828926 #1] INFO -- :
I, [2024-03-19T16:34:55.829696 #1] INFO -- : > thpoff echo "thpoff is installed !"
I, [2024-03-19T16:34:55.839100 #1] INFO -- : thpoff is installed!
I, [2024-03-19T16:34:55.839934 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV[" DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not conf igured!"; exit 1; end'
I, [2024-03-19T16:34:56.090160 #1] INFO -- :
I, [2024-03-19T16:34:56.090902 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV[" DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not c onfigured!"; exit 1; end'
I, [2024-03-19T16:34:56.340784 #1] INFO -- :
I, [2024-03-19T16:34:56.341858 #1] INFO -- : > /usr/local/bin/ruby -e 'if (ENV[ "DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a proto col specified. Once fixed you should rebake your posts now to correct all posts. "; exit 1; end'
I, [2024-03-19T16:34:56.593304 #1] INFO -- :
I, [2024-03-19T16:34:56.594095 #1] INFO -- : > rm -f /etc/cron.d/anacron
I, [2024-03-19T16:34:57.388238 #1] INFO -- :
I, [2024-03-19T16:34:57.396937 #1] INFO -- : File > /etc/cron.d/anacron chmod: chown:
I, [2024-03-19T16:34:57.418454 #1] INFO -- : File > /etc/runit/1.d/copy-env ch mod: +x chown:
I, [2024-03-19T16:34:57.436263 #1] INFO -- : File > /etc/service/unicorn/run c hmod: +x chown:
I, [2024-03-19T16:34:57.451285 #1] INFO -- : File > /etc/service/nginx/run chm od: +x chown:
I, [2024-03-19T16:34:57.464828 #1] INFO -- : File > /etc/runit/3.d/01-nginx ch mod: +x chown:
I, [2024-03-19T16:34:57.478016 #1] INFO -- : File > /etc/runit/3.d/02-unicorn chmod: +x chown:
I, [2024-03-19T16:34:57.478451 #1] INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2024-03-19T16:34:57.479456 #1] INFO -- : > exec chpst -u redis -U redis /us r/bin/redis-server /etc/redis/redis.conf
I, [2024-03-19T16:34:57.487402 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
139:C 19 Mar 2024 16:34:57.509 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
139:C 19 Mar 2024 16:34:57.509 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=139, just started
139:C 19 Mar 2024 16:34:57.509 # Configuration loaded
139:M 19 Mar 2024 16:34:57.511 * monotonic clock: POSIX clock_gettime
139:M 19 Mar 2024 16:34:57.512 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
139:M 19 Mar 2024 16:34:57.512 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (33715/33715), done.
I, [2024-03-19T16:35:10.829468 #1] INFO -- : HEAD is now at 6ab1a19e9 DEV: Conv ert min_trust_level_to_allow_invite to groups (#24893)
```He propuesto una arquitectura limpia para el nuevo servicio. Pero limpio no siempre significa simple.I, [2024-03-19T16:35:24.079798 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git config user.discourse-version tests-passed
I, [2024-03-19T16:35:24.227550 #1] INFO -- :
I, [2024-03-19T16:35:24.228193 #1] INFO -- : > cd /var/www/discourse && mkdir - p tmp
I, [2024-03-19T16:35:24.236342 #1] INFO -- :
I, [2024-03-19T16:35:24.236676 #1] INFO -- : > cd /var/www/discourse && chown d iscourse:www-data tmp
I, [2024-03-19T16:35:24.245352 #1] INFO -- :
I, [2024-03-19T16:35:24.245660 #1] INFO -- : > cd /var/www/discourse && mkdir - p tmp/pids
I, [2024-03-19T16:35:24.254265 #1] INFO -- :
I, [2024-03-19T16:35:24.254685 #1] INFO -- : > cd /var/www/discourse && mkdir - p tmp/sockets
I, [2024-03-19T16:35:24.262959 #1] INFO -- :
I, [2024-03-19T16:35:24.263379 #1] INFO -- : > cd /var/www/discourse && touch t mp/.gitkeep
I, [2024-03-19T16:35:24.271221 #1] INFO -- :
I, [2024-03-19T16:35:24.271450 #1] INFO -- : > cd /var/www/discourse && mkdir - p /shared/log/rails
I, [2024-03-19T16:35:24.279371 #1] INFO -- :
I, [2024-03-19T16:35:24.279626 #1] INFO -- : > cd /var/www/discourse && bash -c "touch -a /shared/log/rails/{production,production_errors,unicorn.std out,unicorn.stderr,sidekiq}.log"
I, [2024-03-19T16:35:24.291996 #1] INFO -- :
I, [2024-03-19T16:35:24.292367 #1] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.std out,unicorn.stderr,sidekiq}.log /var/www/discourse/log"
I, [2024-03-19T16:35:24.305093 #1] INFO -- :
I, [2024-03-19T16:35:24.305386 #1] INFO -- : > cd /var/www/discourse && bash -c "mkdir -p /shared/{uploads,backups}"
I, [2024-03-19T16:35:24.319893 #1] INFO -- :
I, [2024-03-19T16:35:24.320188 #1] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/{uploads,backups} /var/www/discourse/public"
I, [2024-03-19T16:35:24.332421 #1] INFO -- :
I, [2024-03-19T16:35:24.332724 #1] INFO -- : > cd /var/www/discourse && bash -c "mkdir -p /shared/tmp/{backups,restores}"
I, [2024-03-19T16:35:24.345308 #1] INFO -- :
I, [2024-03-19T16:35:24.345616 #1] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2024-03-19T16:35:24.357207 #1] INFO -- :
I, [2024-03-19T16:35:24.357719 #1] INFO -- : > cd /var/www/discourse && chown - R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/t mp
I, [2024-03-19T16:35:24.366660 #1] INFO -- :
I, [2024-03-19T16:35:24.366976 #1] INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2024-03-19T16:35:24.371930 #1] INFO -- :
I, [2024-03-19T16:35:24.372597 #1] INFO -- : Reemplazando # redis con sv start re dis || exit 1 en /etc/service/unicorn/run
I, [2024-03-19T16:35:24.375568 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Clonando en 'docker_manager'...
I, [2024-03-19T16:35:26.673043 #1] INFO -- :
I, [2024-03-19T16:35:26.673305 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-yearly-re view.git
Clonando en 'discourse-yearly-review'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:27.763857 #1] INFO -- :
I, [2024-03-19T16:35:27.764363 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-reactions .git
Clonando en 'discourse-reactions'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:29.275124 #1] INFO -- :
I, [2024-03-19T16:35:29.275598 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-user-note s.git
Clonando en 'discourse-user-notes'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:30.428436 #1] INFO -- :
I, [2024-03-19T16:35:30.429173 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-gamificat ion.git
Clonando en 'discourse-gamification'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:31.788286 #1] INFO -- :
I, [2024-03-19T16:35:31.789821 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-policy.gi t
Clonando en 'discourse-policy'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:34.719712 #1] INFO -- :
I, [2024-03-19T16:35:34.720281 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-calendar. git
Clonando en 'discourse-calendar'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:39.165042 #1] INFO -- :
I, [2024-03-19T16:35:39.165522 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-adplugin. git
Clonando en 'discourse-adplugin'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:45.006305 #1] INFO -- :
I, [2024-03-19T16:35:45.006702 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-follow.gi t
Clonando en 'discourse-follow'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:50.572583 #1] INFO -- :
I, [2024-03-19T16:35:50.573195 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.gi t
Clonando en 'discourse-solved'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:52.922038 #1] INFO -- :
I, [2024-03-19T16:35:52.922601 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-post-voti ng.git
Clonando en 'discourse-post-voting'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:54.380420 #1] INFO -- :
I, [2024-03-19T16:35:54.380867 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-cakeday.g it
Clonando en 'discourse-cakeday'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:35:55.531642 #1] INFO -- :
I, [2024-03-19T16:35:55.532304 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-subscript ions.git
Clonando en 'discourse-subscriptions'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:36:00.495608 #1] INFO -- :
I, [2024-03-19T16:36:00.496142 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-whos-onli ne.git
Clonando en 'discourse-whos-online'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:36:01.759717 #1] INFO -- :
I, [2024-03-19T16:36:01.760165 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-chat-inte gration.git
Clonando en 'discourse-chat-integration'...
warning: no se puede acceder a '/root/.config/git/attributes': Permiso denegado
I, [2024-03-19T16:36:03.246218 #1] INFO -- :
I, [2024-03-19T16:36:03.247472 #1] INFO -- : > cp /var/www/discourse/config/ngi nx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2024-03-19T16:36:03.255381 #1] INFO -- :
I, [2024-03-19T16:36:03.255949 #1] INFO -- : > rm /etc/nginx/sites-enabled/defa ult
I, [2024-03-19T16:36:03.261744 #1] INFO -- :
I, [2024-03-19T16:36:03.262032 #1] INFO -- : > mkdir -p /var/nginx/cache
I, [2024-03-19T16:36:03.268429 #1] INFO -- :
I, [2024-03-19T16:36:03.269266 #1] INFO -- : Reemplazando pid /run/nginx.pid; con daemon off; en /etc/nginx/nginx.conf
I, [2024-03-19T16:36:03.270349 #1] INFO -- : Reemplazando (?m-ix:upstream[^\}]+\}) con upstream discourse { server 127.0.0.1:3000; } en /etc/nginx/conf.d/discour se.conf
I, [2024-03-19T16:36:03.271428 #1] INFO -- : Reemplazando (?-mix:server_name.+$) w ith server_name _ ; en /etc/nginx/conf.d/discourse.conf
I, [2024-03-19T16:36:03.321320 #1] INFO -- : Reemplazando (?-mix:client_max_body_s ize.+$) con client_max_body_size $upload_size ; en /etc/nginx/conf.d/discourse. conf
I, [2024-03-19T16:36:03.370586 #1] INFO -- : Reemplazando (?-mix:worker_connection s.+$) con worker_connections $nginx_worker_connections ; en /etc/nginx/nginx.co nf
I, [2024-03-19T16:36:03.371396 #1] INFO -- : > echo "configuración web completada"
I, [2024-03-19T16:36:03.375945 #1] INFO -- : configuración web completada
I, [2024-03-19T16:36:03.377150 #1] INFO -- : > cd /var/www/discourse && gem ins tall bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); pr int $0 }' Gemfile.lock)
I, [2024-03-19T16:36:05.075958 #1] INFO -- : Se instaló correctamente bundler-2.5 .3
1 gem instalada
I, [2024-03-19T16:36:05.076333 #1] INFO -- : > cd /var/www/discourse && find /v ar/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2024-03-19T16:36:09.016883 #1] INFO -- :
I, [2024-03-19T16:36:09.017986 #1] INFO -- : > cd /var/www/discourse && if [ "t ests-passed" != "tests-passed" ]; then
rm -rf app/assets/javascripts/node_modules
fi
I, [2024-03-19T16:36:09.023415 #1] INFO -- :
I, [2024-03-19T16:36:09.023782 #1] INFO -- : > cd /var/www/discourse && su disc ourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning El campo de resolución "unset-value@2.0.1" es incompatible con la versión solicitada "unset-value@^1.0.0"
warning El patrón ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"] está intentando desempaquetarse en el mismo destino "/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e14 5cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" que el patrón ["wrap-ansi@^7.0.0"]. Esto podría resultar en un comportamiento no determinista, omitiéndolo.
error Ocurrió un error inesperado: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz: ESOCKETTIMEDOUT".
I, [2024-03-19T16:40:12.194716 #1] INFO -- : yarn install v1.22.19
[1/5] Validando package.json...
[2/5] Resolviendo paquetes...
[3/5] Obteniendo paquetes...
info Parece que hay problemas con tu conexión de red. Reintentando...
info Parece que hay problemas con tu conexión de red. Reintentando...
info Parece que hay problemas con tu conexión de red. Reintentando...
info Parece que hay problemas con tu conexión de red. Reintentando...
info Si crees que esto es un error, por favor abre un reporte de error con la información proporcionada en "/var/www/discourse/yarn-error.log".
info Visita https://yarnpkg.com/en/docs/cli/install para documentación sobre este comando.
I, [2024-03-19T16:40:12.195985 #1] INFO -- : Terminando procesos asíncronos
112:signal-handler (1710866412) Recibido SIGTERM programando apagado...
I, [2024-03-19T16:40:12.196356 #1] INFO -- : Enviando INT a HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 43
I, [2024-03-19T16:40:12.196559 #1] INFO -- : Enviando TERM a exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 112
2024-03-19 16:40:12.196 UTC [43] LOG: recibida solicitud de apagado rápido
112:M 19 Mar 2024 16:40:12.297 # Usuario solicitó apagado...
112:M 19 Mar 2024 16:40:12.297 * Guardando la instantánea RDB final antes de salir.
2024-03-19 16:40:12.630 UTC [43] LOG: abortando cualquier transacción activa
2024-03-19 16:40:12.636 UTC [43] LOG: el trabajador de fondo "logical replication launcher" (PID 52) salió con código de salida 1
2024-03-19 16:40:12.640 UTC [47] LOG: apagando
112:M 19 Mar 2024 16:40:12.778 * BD guardada en disco
112:M 19 Mar 2024 16:40:12.778 # Redis está listo para salir, adiós...
2024-03-19 16:40:13.564 UTC [43] LOG: sistema de base de datos apagado
FALLIDO
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' falló con retorno #<Process::Status: pid 457 exit 1>
Ubicación del fallo: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec falló con los parámetros {"cd"=>"$home", "cmd"=>["if [ \"$version\" != \"tests-passed\" ]; then\n rm -rf app/assets/javascripts/node_modules\nfi", "su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'"]}
bootstrap falló con código de salida 1
** FALLO EN EL BOOTSTRAP ** por favor desplázate hacia arriba y busca mensajes de error anteriores, puede haber más de uno.
./discourse-doctor puede ayudar a diagnosticar el problema.
4207e08ef2f55ca92e6033e1cfa6585a54381e6f5947ad251e7eb5a4a21a37d1
Si alguien tiene una idea de cómo solucionar este problema, por favor házmelo saber. Por ahora, creo que la mejor opción es cambiar el disco duro que falla por un mejor estado sólido, ya que el disco defectuoso podría estar escribiendo datos corruptos y las reconstrucciones están tardando de 20 a 30 minutos cuando deberían tardar apenas unos minutos, sin embargo, no estoy completamente seguro de esta conclusión.
Dado que no puedo obtener un nuevo disco en este momento, probablemente voy a levantar temporalmente una instancia en DigitalOcean y ejecutar el sitio desde allí hasta que pueda conseguir un reemplazo de disco.
Por favor, háganme saber sus opiniones, lo agradecería mucho.



