Discourse rebuild failed from 1.9.0.beta5 to 1.9.0.beta6

(Hosein Naseri) #1

I tried to upgrade discourse through admin panel but it failed. Then I tried to rebuild app, but it also failed. this is the error I get:

Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 472 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Discourse Backups to Dropbox (Deprecated)
Upgrade discourse-backups-to-dropbox
(Régis Hanol) #2

Like the last line suggest

** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Can you please scroll back up and post the whole log?

(Hosein Naseri) #3

Its a lot of log. I searched for error and I got these lines:

2017-08-17 08:14:02.022 UTC [57] postgres@postgres ERROR:  database "discourse" already exists
2017-08-17 08:14:02.023 UTC [57] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2017-08-17T08:14:02.025563 #15]  INFO -- : 
I, [2017-08-17T08:14:02.025883 #15]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2017-08-17 08:14:02.210 UTC [68] postgres@discourse ERROR:  role "discourse" already exists
2017-08-17 08:14:02.210 UTC [68] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists


I, [2017-08-17T08:14:17.023473 #15]  INFO -- : HEAD is now at ae68795 FIX: deleting own post results in error

and this is the full log:


(Hosein Naseri) #4

and this is my docker info

docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 18
Server Version: 17.05.0-ce
Storage Driver: overlay
 Backing Filesystem: xfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
  Profile: default
Kernel Version: 3.10.0-514.26.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 15.39GiB
Name: server.zabanshenas.com
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
Registry Mirrors:
Live Restore Enabled: false

(Felix Freiberger) #5

Try removing the Dropbox Backup Synchronizer plugin temporarily – does that help?

(Hosein Naseri) #6

Yes. Thank you. How did you find out?

And btw should i add it again now?

(Joshua Rosenfeld) #7

Best guess, @fefrei saw line 3848:

NameError: uninitialized constant DiscourseBackupToDropbox::Synchronizer

(Felix Freiberger) #8

I read the logs (from back to front) :wink:

Did you also install the base plugin?

(Hosein Naseri) #9

No never. But I didn’t have any problem. I don’t know why I faced this problem only now.

(Felix Freiberger) #10

So you’ve used the plugin before it was really done, and the requirements changed :wink:

Simply install both plugins and you should be fine.

(Christoph) #11

Hm, I also I think I have seen some problems with the Dropbox plugin lately when updating I don’t remember any specific details but shall keep it in mind. Any chance that the plugin is (slightly) broken?

(Alberto Aguirre) #12

Is it allowed for one plugin to depend on another?

It seems the dropbox plugin expects the base plugin to be loaded first (to get the Synchronizer definition), but AFAICS, there’s no enforcing order when loading plugins.

Edit: New workaround: Upgrade discourse-backups-to-dropbox


On v1.9.0.beta7 +16, i removed the Git link of discourse backups to dropbox, and now after a rebuild, i’am able to re launch the website.

(Hosein Naseri) #14

I tried to install this plugin first, I got the following error:

fatal: unable to access 'https://github.com/discourse/discourse.git/': GnuTLS recv error (-54): Error in the pull function.

even after removing that plugin in app.yml and rebuild, I’m getting the same error :confused: any Idea?