Hello everyone!
I was trying to update the discourse forum using the link posted in admin panel and i got this error. The whole forum just gone. What should i do now to reset the update? Thanks a lot if anyone could help me.
In fact it means that your forum is being updated. - unless you interrupt the update before it finishes.
Try visiting your forum https://yoursite.com/latest.json
. If it returns something, then wait 10 minutes and see if the problem resolves itself
Thanks for your reply, I tried the method you gave and it returns 502 Bad Gateway nginx.
It looks like you may have to ./launcher rebuild app
I tried the ./launcher rebuild app and i got following error messages:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development' failed with return #<Process::Status: pid 340 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'"]}
6e9e60bd6b6113cdcb001127fd2a24fe86f2a1658bf24500e5e2b720fd793510
** 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.
and i scrolled up and found some possible errors logs:
1)200:M 25 Jun 2023 16:00:16.252 # Failed listening on port 6379 (TCP), aborting.
2)[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'true'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'test development'`, and stop using this flag
3)Bundler::PathError: The path `/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/sprockets-f4d3dae71ef2` does not exist.
4)Bundler::InstallError: sass-embedded-1.63.6-x86_64-linux requires rubygems version >= 3.3.22, which is incompatible with the current version, 3.2.18
Someone else encountered a similar issue recently if this is any help?
Thanks a lot for your reply, but i guess it is not the same problem, my server is at Germany. Iâm using discourse docker image for my server. What should i do if ./launcher rebuild app doesnât work?
Looks similar to
Rebuild failed due to ruby gem incompatibility
Thanks for your help! Yes, it looks similar and I tried:
my server:/var/discourse**$ git pull
fatal: Not a git repository: ../.git/modules/discourse_docker
Should i do something before running git pull? I was doing this in my serverâs /var/discourse.
Seems possible you have an unusual setup - is this a standard install?
I read the last programmerâs documents for me and it says because many things of the web running behind nginx and discourse also needs to be hosted behind nginx. The standard install doesnât work for my situation.
and the following is how he said in the document and how he did:
Discourse runs in a docker container. However, it requires a special kind of configuration, not via a docker-compose.yml or a .conf file.
The discourse-project/ the github repository required to config and build the docker-image can be found here. Ignore the nice and juicy âdiscourse-setupâ program they provide, that wonât work here. We need to configure the app ourselves.
- clone discourse_docker to /var/discourse:
git clone https://github.com/discourse/discourse_docker.git /var/discourse
- go to the folder and use a provided sample configuration:
cd /var/discourse && cp samples/standalone.yml containers/app.yml
- then edit the containers/app.yml file (e.g. with
sudo nano
)
- Changes were made to the hosting section, the smtp settings for mail and - important - the expose section so only an unused port is exposed to the outside
- To run discourse on a path such as â/forumâ some more changes were needed as described here
- Some problems also occur with the email-authentication:
- The mail that sends emails is here âserverâs emailâ. However, Discourse expects the mail to have the same domain as its host, namely âserverâs emailâ
- Solution described here
- Also use âDISCOURSE_SMTP_AUTHENTICATION: loginâ as another env option. Why also always . . .
- The mail that sends emails is here âserverâs emailâ. However, Discourse expects the mail to have the same domain as its host, namely âserverâs emailâ
- Then build the app from the
/var/discourse
directory withsudo ./launcher bootstrap app
. This takes quite a while - Then you may be able to start the discourse container with
sudo ./launcher start app
.
Those are good notes.
The git pull;./launcher rebuild app
should work.
What version are you updating from?
Is he os out of date? (cat /etc/issue
)
Is the disk full? (df - h
)
Thanks for your reply! The version Iâm updating from is 2.8.0.beta6 and last update was at 28.09.2021.
After running cat /etc/issue
i got:
Debian GNU/Linux 9 \n \l
And the following are Information according to ./discourse-doctor
==================== MEMORY INFORMATION ====================
RAM (MB): 4050
total used free shared buff/cache available
Mem: 3955 427 1152 63 2375 3182
Swap: 0 0 0
==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 63G 27G 34G 45% /
==================== DISK INFORMATION ====================
Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 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
Disklabel type: dos
Disk identifier: 0xc0b6220c
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 134217727 134215680 64G 83 Linux
You might add swap.
Also, see PostgreSQL 13 update.
Did you rebuild more than once?
See also Debian | endoflife.date
You really need to move everything to a new vm with a supported operating system. So youâll also need to get whatever the other stuff you have running upgraded as well.
hello jammy, after times of fail installation , i found itâs caused by memory limit of server and network, i suggest you to use a server of 4GB Mem and access normally of github and ruby
This error bothers me - do you still see it? The docker container should now be running 3.2.0
But if your /var/discourse is not a git directory, something has been done which is different from the instructions. It prevents an update and causes the ruby version mismatch. For me:
/var/discourse# git status
On branch main
Your branch is up to date with 'origin/main'.
Also we see a .git directory:
# ls -a /var/discourse/
. .github README.md cids discourse-setup launcher scripts tests
.. .gitignore bin containers image rebuild.log shared
.git LICENSE c discourse-doctor index.html samples templates
Edit: but itâs true, if youâre on a too-old OS, you have some work to do, to install discourse in a new OS and recover your backup, and also to do all the extra things which might be needed for your specific situation.
If your server is doing more things than just running discourse then thatâs an extra complication. You may need local expertise.
I have a comparable failure with ruby gems etc.
It was a fresh install on a new server.
Thank you guys for helping, I will try your suggestions one by one to fix the problem. If there is any feedback(good or bad), I will post it back in the forum. Thanks againďź
I successfully installed the new version discourse. I just followed the instructions in the document above and i worked for me. But now I have trouble to restore from the backup.
I tried Restore a backup from the command line but i got following:
root@my_server:/var/www/discourse# discourse restore my_server-2023-06-20-033008-v20210922064213.tar.gz
Starting restore: my_server-2023-06-20-033008-v20210922064213.tar.gz
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2023-06-29-113408 exists...
Copying archive to tmp directory...
Unzipping archive, this may take a while...
EXCEPTION: /var/www/discourse/lib/discourse.rb:137:in `exec': Failed to decompress archive.
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
/var/www/discourse/lib/discourse.rb:171:in `execute_command'
/var/www/discourse/lib/discourse.rb:137:in `exec'
/var/www/discourse/lib/discourse.rb:33:in `execute_command'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:78:in `decompress_archive'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:23:in `decompress'
/var/www/discourse/lib/backup_restore/restorer.rb:42:in `run'
script/discourse:149:in `restore'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
script/discourse:290:in `<top (required)>'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:492:in `exec'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:28:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/exe/bundle:45:in `block in <top (required)>'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/exe/bundle:33:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Trying to rollback...
There was no need to rollback
Cleaning stuff up...
Removing tmp '/var/www/discourse/tmp/restores/default/2023-06-29-113408' directory...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
Restore done.
What should i do now?
Something is wrong with your backup file. It might just be truncated.