Botched upgrade left me locked out


(Fabian Santiago) #1

Hello,

i ran git pull on /var/discourse

then ran ./launcher rebuild app

no problem.

some time later, i visited /admin/upgrade, and started an upgrade from there manually. i closed my browser window before it finished.

now, while i was still “logged in” to my site as admin, and trying to visit my preferences page, i receive a page not found or private message. i logged out.

now, on trying to re-login, i receive unknown error.

i enter my app, tail the production log and see this:

Started GET “/session/csrf?=1504731633203" for 108.53.239.102 at 2017-09-06 21:00:36 +0000
Processing by SessionController#csrf as /
Parameters: {"
”=>“1504731633203”}
Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.0ms)
Started POST “/session” for 45.33.82.183 at 2017-09-06 21:00:36 +0000
Processing by SessionController#create as /
Parameters: {“login”=>"<user_ID>", “password”=>"[FILTERED]"}
Completed 500 Internal Server Error in 234ms (ActiveRecord: 28.1ms)
NoMethodError (undefined method alias_level' for #<Group:0x007f1a80e14a50>) /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:inmethod_missing’

what could have happened? Thanks.

the site is still up & running otherwise but i cannot login.


(Régis Hanol) #2

Not sure but here’s how to fix it

# ssh into server
cd /var/discourse
./launcher rebuild app

:wink:


(Fabian Santiago) #3

No that didn’t work I already tried that and I still receive the same error


(Jeff Atwood) #4

This is usually due to incompatible third party plugins.


(Fabian Santiago) #5

That was it. Working now EXCEPT /admin/upgrade now shows just a blank page. Expected?


(Joshua Rosenfeld) #6

Did you remove Docker Manager from your plugin list?


(Jeff Atwood) #7

Don’t remove the first party plugins, anything beginning with /discourse is official.


(Fabian Santiago) #8

No, I returned the app.yaml file to it’s stock config, plugin wise. So it’s there.

Upon further inspection , in the logs, I now also see redis connection refused errors.


(Fabian Santiago) #9

Gotcha. Interestingly, any plugins I added I believe we’re official (as in beginning with discourse). Let me figure out what they were and I’ll inform the thread.


(Régis Hanol) #10

Official plugins are the ones under the Discourse organization on GitHub.


(Fabian Santiago) #11

ok got it. then certainly not official they were. :frowning: oh well. now i know. but still don’t have an /admin/upgrade page.


(David Taylor) #12

See this topic:


(Fabian Santiago) #13

ok, my web console shows this error(s):

docker-manager-vendor-4dd192655476ad4a9594bf218c3aab34ac1ad23cf54be7bb7174b6f475e67e86.js:1 Uncaught TypeError: Discourse._registerPluginScriptDefinition is not a function
at docker-manager-vendor-4dd192655476ad4a9594bf218c3aab34ac1ad23cf54be7bb7174b6f475e67e86.js:1
(anonymous) @ docker-manager-vendor-4dd192655476ad4a9594bf218c3aab34ac1ad23cf54be7bb7174b6f475e67e86.js:1

docker-manager-app-05126b4030cfb026187ab683ad137e7eb9ce4d8cd69e33734d1d17cf2171f7eb.js:1 Uncaught TypeError: Discourse._registerPluginScriptDefinition is not a function
at docker-manager-app-05126b4030cfb026187ab683ad137e7eb9ce4d8cd69e33734d1d17cf2171f7eb.js:1

not sure what to do with the links you sent me but perhaps related?


(David Taylor) #14

The link has details of the issue you’re having. The simple answer is that the problem is being worked on, and once it’s fixed you’ll need to do a rebuild of your instance to fix the upgrade page.


(Fabian Santiago) #15

Ok very well. Thanks for everyone’s input. I’ll just wait it out then.


(Jeff Atwood) #16