Discourse on AlmaLinux

Greetings,

I realize that the supported version of Discourse requires a specific set up, however…

My curiosity and amount of work put in thus far compels me to ask for help here.

I installed docker on an AlmaLinux VPS and installed Discourse, had it running and set it up, invited users, all was hunky-dory. I’ve not added any plugins or made any major modification beyond the front-end interface changes.

And then I did a security update for Discourse that came through yesterday (or the day before).
It all went smoothly.

This is where the rookie mistake happened (I’m a rookie when it comes to this for sure). I decided to change my SSH port and forgot to open that port in the firewall. Well, after I fixed that I tried to restart Discourse and…

FAIL

Anyway, here are some of the errors (let me know if there is hope, or if I’m missing the obvious, or whatever. Be gentle :stuck_out_tongue: :

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
' failed with return #<Process::Status: pid 135 exit 128>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params 
{"cd"=>"$home", "hook"=>"code", "cmd"=>["sudo -H -E -u discourse git reset --hard", 
"sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n  
set -o errexit\n  if [ $(git rev-parse --is-shallow-repository) == \"true\" ]; then\n      
git remote set-branches --add origin main\n      
git remote set-branches origin $version\n      
git fetch --depth 1 origin $version\n  else\n      
git fetch --tags --prune-tags --prune --force origin\n  fi\n'", 
"sudo -H -E -u discourse bash -c '\n  set -o errexit\n
  if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n      
git pull\n  else\n      
git -c advice.detachedHead=false checkout $version\n  fi\n'", 
"sudo -H -E -u discourse git config user.discourse-version $version", "mkdir -p tmp", 
"chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", 
"touch tmp/.gitkeep", "mkdir -p                    
/shared/log/rails", "bash -c \"touch -a           
/shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", 
"bash -c \"ln    -s           
/shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", 
"bash -c \"mkdir -p           
/shared/{uploads,backups}\"", 
"bash -c \"ln    -s           
/shared/{uploads,backups} $home/public\"", 
"bash -c \"mkdir -p           
/shared/tmp/{backups,restores}\"", 
"bash -c \"ln    -s           
/shared/tmp/{backups,restores} $home/tmp\"", 
"chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", 
"[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

If I’m not mistaken, this used to be an error on low memory situations. How much RAM/SWAP do you have on this VM?

what is the output of free -h

 total        used        free      shared  buff/cache   available
Mem:          7.5Gi       1.0Gi       4.4Gi       6.0Mi       2.1Gi       6.2Gi
Swap:         614Mi          0B       614Mi

Definitely out of memory from what I can see. Try making a bigger swap (maybe 4GB) and see if that lets you rebuild.

1 Like