FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 690 exit 1> Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn’
exec failed with the params {“cd”=>"$home", “hook”=>“db_migrate”, “cmd”=>[“su discourse -c ‘bundle exec rake db:migrate’”]}
7027ff0ccd166f831f9728472676ad91704fdd4caa6833a219d44697e740acdc ** 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.
Ok, how can I identify them? Searching for the word “error”? If you tell me how to run the log, I will attach it. I am new to using servers. Thank you very much for your help.
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- "templates/web.ssl.template.yml"
- "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
- "80:80" # http
- "443:443" # https
params:
db_default_text_search_config: "pg_catalog.spanish"
## Set db_shared_buffers to a max of 25% of the total memory.
## will be set automatically by bootstrap based on detected RAM, or you can override
db_shared_buffers: "2048MB"
## can improve sorting performance, but adds memory usage per-connection
#db_work_mem: "40MB"
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
env:
LC_ALL: es_ES.UTF-8
LANG: es_ES.UTF-8
LANGUAGE: es_ES.UTF-8
DISCOURSE_DEFAULT_LOCALE: es
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
UNICORN_WORKERS: 8
## TODO: The domain name this Discourse instance will respond to
## Required. Discourse will not work with a bare IP number.
DISCOURSE_HOSTNAME: EDITED
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: 'EDITED'
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: EDITED
DISCOURSE_SMTP_PORT: EDITED
DISCOURSE_SMTP_USER_NAME: EDITED
DISCOURSE_SMTP_PASSWORD: EDITED
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_DOMAIN: EDITED
DISCOURSE_NOTIFICATION_EMAIL: EDITED
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: EDITED
## The http or https CDN address for this Discourse instance (configured to pull)
## see https://meta.discourse.org/t/14857 for details
#DISCOURSE_CDN_URL: https://discourse-cdn.example.com
## The maxmind geolocation IP address key for IP address lookup
## see https://meta.discourse.org/t/-/137387/23 for details
DISCOURSE_MAXMIND_LICENSE_KEY: EDITED
## The Docker container is stateless; all data is stored in /shared
volumes:
- volume:
host: /var/discourse/shared/standalone
guest: /shared
- volume:
host: /var/discourse/shared/standalone/log/var-log
guest: /var/log
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-reactions
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
#- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
- exec: echo "End of custom commands"
The truth is that I have never had any problem updating. I wasn’t doing anything weird, I just updated the system and I got the warning that an error had occurred.
It’s having trouble running a migration from May 2021. Was this site moved between the release channels (beta/stable/tests-passed) or restored from backup at some point?
I seem to remember that we migrated from mybb on that date (may 21)
Yes it is true that today I tried to recover a backup from the beginning of the month to try to have a working copy before the error, but when I clicked on start, an error screen appeared.
Thank you for your reply. I think my problem is related to a database error related to the migration of the forums. Rebuild app doesnt work.
I have checked the FAQ and the manuals, but I can’t find any solution.
I have some backups before (I think) the error, but I can’t load them because the app won’t run. I can only think of deleting everything, doing a clean install and loading a backup…
Having a backup, and considering that I can’t run the app (to restore the backup), what can I do? I see no alternative but to delete the Docker and start again?
The only topic I could find with a similar problem was Unable to login into discourse suddenly - #8 by Tarek_Khalil, and the advice was to restore a backup from before the migration snafu, which may not be the best option in your case as it was some time ago.
I’m afraid database errors are out of my skillset. @pfaffman and @RGJ are normally very good at these (though I don’t know if this is something they’ve come across before). Do you guys have any tricks up your sleeve for this?
You’re welcome! When I empty a table, another one gives me an error. I have already emptied about 3 tables… Should I keep doing this one by one? Thank you very much for your help.
I answer myself. After emptying 7 tables (discourse_reactions_reactions, directory_columns, external_upload_stubs, associated_groups, user_associated_groups, group_associated_groups, discourse_reactions_reaction_users) the site is up and running. I restore the last backup too!