New installation fails (fresh install)

Potentially related to 147425 but i started a new thread since my case was a fresh install, and not a migration.

I tried on two different, clean Ubuntu 18.04 instances (one Linode, one Digital Ocean) to setup a self install via the Docker script. Both times I got the same error.

Screenshot of error

Print of error

== 20180917024729 RemoveSuperfluousColumns: migrating =========================

WARNING
-------------------------------------------------------------------------------------
An attempt was made to drop or rename a column in a migration
SQL used was: 'ALTER TABLE user_profiles DROP COLUMN IF EXISTS card_image_badge_id'

Please generate a post deployment migration using `rails g post_migration` to drop
or rename columns.

Note, to minimize disruption use self.ignored_columns = ["column name"] on your
ActiveRecord model, this can be removed 6 months or so later.

This protection is in place to protect us against dropping columns that are currently
in use by live applications.

I, [2020-04-09T15:07:30.875957 #1]  INFO -- : Terminating async processes
I, [2020-04-09T15:07:30.876041 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 64
2020-04-09 15:07:30.876 UTC [64] LOG:  received fast shutdown request
I, [2020-04-09T15:07:30.876354 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 181
181:signal-handler (1586444850) Received SIGTERM scheduling shutdown...
181:M 09 Apr 2020 15:07:30.954 # User requested shutdown...
181:M 09 Apr 2020 15:07:30.954 * Saving the final RDB snapshot before exiting.
181:M 09 Apr 2020 15:07:30.959 * DB saved on disk
181:M 09 Apr 2020 15:07:30.960 # Redis is now ready to exit, bye bye...
2020-04-09 15:07:30.880 UTC [64] LOG:  aborting any active transactions
2020-04-09 15:07:30.886 UTC [64] LOG:  worker process: logical replication launcher (PID 73) exited with exit code 1
2020-04-09 15:07:30.894 UTC [68] LOG:  shutting down
2020-04-09 15:07:31.151 UTC [64] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 12943 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
90378b39f271ddf9c4ba2628e28ceffd9ede8f3c6cdb4815b12f8b3ae5a218ac
** 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.

We reverted the related commits, can you try again?

1 Like

yes i’ll need to switch over the DNS so will need about an hour. will report back. thank you

Yeah @sam will look at this his Australia Monday

1 Like

i got the install to work properly. thanks for the help!

I will look on Monday makes no sense cause I had a specific commit that avoided loading the code

3 Likes

Fixed this per:

https://github.com/discourse/discourse/commit/e2284cf7391aa94ed2f22662305bc14e9e51262c

Zeitwerk was autoloading this cause we had some migrations that would run overrides on SafeMigrate.

I disabled this in the class.

4 Likes