./launcher ricostruisce l'app per il vecchio discourse 1.6 non funzionante

Ecco l’ultimo pezzo del puzzle per me

Ho i miei vecchi forum che ho appena spostato in una nuova posizione ma ho ancora bisogno di accesso - ho modificato app.yml per cambiare il nome del dominio e poi ho eseguito ./launcher/ rebuild app --skip-prereqs per aggiornarlo ma fallisce

Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
2.0.20230116-0051: Pulling from discourse/base
e01f084ee363: Already exists 
db2fb8a75c87: Already exists 
6e789f3cf3a6: Already exists 
afa15f3b4f49: Already exists 
bd9a8f354aab: Already exists 
7492e41ba139: Already exists 
17620c643046: Already exists 
24a2215b994e: Already exists 
3119b33deb35: Already exists 
32a8b7f7c0e8: Already exists 
2dbcf46b2450: Already exists 
bdc228d4887d: Already exists 
914f28af582f: Already exists 
4a67c541b202: Already exists 
d3fc17f1b671: Already exists 
77b3d250e54b: Already exists 
9329aa462aa8: Already exists 
daeee236a97d: Already exists 
b7746b7c02a0: Already exists 
5c28ac2537d4: Already exists 
56d3ef9b7e39: Already exists 
3bb00ba1ec5a: Already exists 
1f758f6d6132: Already exists 
374c5f9048f9: Already exists 
0259a5d2f899: Already exists 
3ad74725ef87: Already exists 
f61c04c40065: Already exists 
1917d29aeb87: Already exists 
6bf5a4e9b5be: Already exists 
0f99e9c433c1: Already exists 
5c757ebc11e3: Already exists 
eb1d61649fc0: Already exists 
b3fce4a2403d: Already exists 
2252a5634a08: Already exists 
3b67775f0e8d: Already exists 
fb7e87c0cabf: Already exists 
f0ba17f026a5: Already exists 
aa579fdb2c50: Already exists 
9b282f6a881a: Already exists 
e60b39d46409: Already exists 
4e9e640a98df: Already exists 
0d2ba21fdd7e: Already exists 
5871f9f51cef: Already exists 
2a25ca72ae61: Already exists 
a6b1f035e2fa: Already exists 
4f13760fda63: Already exists 
856119d0afd5: Already exists 
0d289e5416ba: Already exists 
7ee9fa0f4507: Already exists 
aa6751fe4791: Already exists 
a586d833efb5: Already exists 
769ebf485619: Already exists 
701cfc339927: Already exists 
Digest: sha256:xxx
Status: Image is up to date for discourse/base:2.0.20230116-0051
/usr/local/lib/ruby/gems/3.1.0/lib/pups.rb
/usr/local/bin/pups --stdin
flag provided but not defined: --shm-size
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
bootstrap failed with exit code 2
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
Container name cannot be empty

DISCOURSE DOCTOR Tue Jan 24 13:46:45 GMT 2023
OS: Linux xxxx01 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=forumsold.xxxxx.com
SMTP_ADDRESS=smtp.xxxxx.com # (mandatory)
DEVELOPER_EMAILS=xxxxxx
SMTP_PASSWORD=xxxxx # (optional)
SMTP_PORT=25 # (optional)
SMTP_USER_NAME=xxxxx # (optional)
LETSENCRYPT_ACCOUNT_EMAIL=

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 1.7.0, build 0baf609

DOCKER PROCESSES (docker ps -a)

CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                      PORTS               NAMES
456040e68bec        local_discourse/app   \"/sbin/boot\"        6 years ago         Exited (5) 52 minutes ago                       app                 
91834fc0d913        hello-world           \"/hello\"            7 years ago         Exited (0) 7 years ago                          ecstatic_poitras    

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
ERROR: Docker version 1.7.0 not supported, please upgrade to at least 17.03.1, or recommended 17.06.2
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to xxxx.xxxxxx.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . . 
ERROR: Docker version 1.7.0 not supported, please upgrade to at least 17.03.1, or recommended 17.06.2
Failed to restart the container.

==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-solved.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at xxxx.xxxx.com: NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
RAM (MB): 4048

             total       used       free     shared    buffers     cached
Mem:          3953       2058       1894          0         13       1811
-/+ buffers/cache:        233       3719
Swap:         2047        134       1913

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        79G   66G  9.5G  88% /

==================== DISK INFORMATION ====================

WARNING: GPT (GUID Partition Table) detected on '/dev/vda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/vda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1               1   167772159    83886079+  ee  GPT

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [xxxxxx]: n
Mail test skipped.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================

Se hai spostato l’intera installazione, hai provato semplicemente ad avviare il container prima di tentare un aggiornamento?

Se hai un backup, perché non ripristinarlo su una nuova installazione?

Stai tentando di ricostruire da 1.6, il che dovrebbe funzionare, ma è molto più complicato.

Perché saltare i prerequisiti? Dato che stai ricostruendo, questo non salta l’aggiornamento, ma solo i controlli che ti salvano da messaggi di errore più difficili da diagnosticare.

Puoi aggiornare Docker mentre ci sei?

1 Mi Piace

Ho già eseguito l’aggiornamento alla 3.1, ora funziona correttamente.
Sto cercando di rimettere online i vecchi forum, che non sono stati toccati, per lo sviluppo.

sto saltando i prerequisiti perché non posso usare il comando di ricostruzione del launcher senza di esso - docker in esecuzione v1.7 e v1.8 richiesti - ma forse questo è il problema, quindi proverò ad aggiornarlo ora.
Sono solo un po’ confuso perché non ho aggiornato questi forum, quindi non capisco perché la ricostruzione non funzioni dato che non ho cambiato alcuna dipendenza, ecc.

L’unica cosa che ho cambiato è l’app.yml per aggiornare l’hostname e ho provato a eseguire la ricostruzione, che non funziona senza saltare i prerequisiti.

L’ultima versione del launcher e dell’immagine Docker non è compatibile con Discourse 1.6. Dovrai scaricare una versione precedente di discourse_docker. Qualcosa come git checkout 2ec550f potrebbe funzionare…

1 Mi Piace

È una buona scommessa che anche il tuo sistema operativo sia obsoleto, ma in ogni caso, ti consiglierei di eseguire un backup, creare una nuova installazione su una nuova vm e ripristinare il backup sulla nuova. Questo ti farà anche risparmiare alcuni passaggi necessari per Cambiare il nome del dominio o rinominare il tuo Discourse.

non posso più farlo perché non riesco più a riavviare l’app

Se hai un backup della vecchia cartella, puoi sempre ripristinarlo e provare ad avviarlo.
Il problema è che hai aggiornato l’immagine base di Discourse.

Poi farei rsync sulla directory /var/discourse/shared al nuovo server.

funzionerà se utilizzo una build di discourse più recente sul nuovo server?

1 Mi Piace

Perché non ci dici quale risultato stai cercando qui.

La tua vecchia istanza è attualmente 1.6, ma il tuo titolo suggerisce che vuoi eseguire una ricostruzione, che la aggiornerà anche: è corretto? Se è così, allora sì, ripristinare una nuova installazione fresca sarà meno doloroso.

Se stai solo cercando di avviare l’istanza 1.6 invece di aggiornarla, allora il consiglio sarà diverso. Senza la modifica del nome host inclusa, di solito copieresti il contenuto di /var/discourse tra i server. Finché la macchina di destinazione ha docker installato, può essere semplicemente avviata usando ./launcher start.

1 Mi Piace

Voglio solo accedere ai vecchi forum poiché c’erano alcuni post che non sono stati trasferiti nella nuova installazione (backup leggermente obsoleto).

Volevo avvisare quegli utenti, ma non riesco a ripristinare la versione 1.6: non volevo aggiornarla, ma non importa se è aggiornata, ho solo bisogno di accesso.

cosa devo fare se c’è invece una modifica del nome host?

Sì. Dovrebbe funzionare.

1 Mi Piace