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.
Edit, I found this:
PG::DuplicateTable: ERROR: relation "discourse_reactions_reactions" already exists
Can you share your app.yml file?
Sorry, I was at work. This is my app.yml:
## 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
## Uncomment these two lines if you wish to add Lets Encrypt (https)
## 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
- "80:80" # http
- "443:443" # https
## 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
## can improve sorting performance, but adds memory usage per-connection
## Which Git revision should this container use? (default: tests-passed)
## 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
## TODO: The domain name this Discourse instance will respond to
## Required. Discourse will not work with a bare IP number.
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'firstname.lastname@example.org,email@example.com'
## 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_ENABLE_START_TLS: true # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
## The http or https CDN address for this Discourse instance (configured to pull)
## see https://meta.discourse.org/t/14857 for details
## The maxmind geolocation IP address key for IP address lookup
## see https://meta.discourse.org/t/-/137387/23 for details
## The Docker container is stateless; all data is stored in /shared
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-reactions
## Any custom commands to run after building
- 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.firstname.lastname@example.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.
This is the whole log:
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.
Sorry if my writing is strange, I’m using a translator.
I still can’t find a solution and the forums are still down, any idea where to go from here? Thanks!!
I had my forum go down after the upgrade. The update seems to go okay, but when I went to the forum page the forum page was blank.
I updated it manually, and the forum was okay. Don’t know if this will help you or not.
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?
What you want to do is to get into postgres and drop that table.
In broad strokes, it’s something like
./launcher enter app
drop table the_table _mentioned above ;
And then you should be able to run the upgrade.
Edit: but hopefully you make a database-only backup first just in case!
I apologize, I am new to using Linux servers and commands. The app was not running, so I do:
./launcher start app
x86_64 arch detected. starting up existing container
+ /usr/bin/docker start app
./launcher enter app
And then, following your indications, first error:
sudo: postgres: command not found
If I type psql:
psql: error: FATAL: database "root" does not exist
Sorry. I’m on my phone and not quite thinking well enough to explain…
After the start app
su - postgres
And then the
drop table discourse_reactions_reactions ;
And then type exit or control-d a few times to get out of everything
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.
Hmm. I do hope you have a backup. But maybe? It doesn’t make sense that the migrations would be so out of whack.
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!
Thank you all for your help! Have a nice weekend
But we’re you able to upgrade to the latest version?
Yes, everything seems to work fine! Still testing.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.