Site broken even in safe mode

(Jay Pfaffman) #1

This site is returning a 500 error. I’ve rebuilt several times. I finally tried safe-mode and it comes up, but after I click the “enter safe mode” button, the 500 error returns.

Only cakeday and spoiler alert are installed.

Started POST "/safe-mode" for at 2017-12-11 22:57:34 +0000
Processing by SafeModeController#enter as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"++3T6uLPglnLQdkB4w1V19R0QDwOcRvOYRu4n7X+hTnsnIClvQEYynOyTBxaM1Rl6L82JcBxfK7SYHtaIWCzJQ==", "no_customizations"=>"true", "only_official"=>"true", "no_plugins"=>"true", "commit"=>"Enter Safe Mode"}
Redirected to
Completed 302 Found in 2ms
Started GET "/?safe_mode=no_custom%2Cno_plugins%2Conly_official" for at 2017-12-11 22:57:34 +0000
Processing by ListController#latest as HTML
  Parameters: {"safe_mode"=>"no_custom,no_plugins,only_official"}
  Rendering list/list.erb within layouts/application
  Rendered list/list.erb within layouts/application (1.4ms)
  Rendered layouts/_head.html.erb (0.3ms)
  Rendered common/_discourse_stylesheet.html.erb (0.1ms)
  Rendered common/_special_font_face.html.erb (0.1ms)
  Rendered application/_header.html.erb (0.2ms)
  Rendered common/_discourse_javascript.html.erb (1.0ms)
Completed 500 Internal Server Error in 32ms (ActiveRecord: 9.4ms)
ActionView::Template::Error (access_key_id)
/var/www/discourse/lib/s3_helper.rb:194:in `check_missing_site_options'

(Matt Palmer) #2

Is there any more backtrace after that one line? It seems… truncated.

(Jay Pfaffman) #3

Nope. I just reloaded the web page, and that’s the end of the file.

(Sam Saffron) #4

Only so much safe we can do in safe mode, disable all unofficial plugins from yaml and rebuild

(Jay Pfaffman) #5

Only unofficial plugins were installed.

Edit: Err. only official plugins were installed.

I’ve removed them too and still no joy.

I tried doing a backup from the command line and got access_key_id. I guess I’ll just trash the install and start over.

These are what had been installed. Could any of them left behind stuff that would break things after they were removed?

          #- git clone
          #- git clone
          #- git clone
          #- git clone

Yeah. I rebuilt from scratch and restored the old database and it’s broken again. Hopefully there was nothing there that they wanted.

(Rafael dos Santos Silva) #6

Try this in the rails console:

./launcher enter app
rails c
SiteSetting.s3_access_key_id = 'test'

(Jay Pfaffman) #7



./launcher enter app
rails c
SiteSetting.s3_access_key_id = 'test'

Fixed it. Somehow both of those keys need to be set and weren’t.

(Jay Pfaffman) #8

And now backup fails because “EXCEPTION: The AWS Access Key Id you provided does not exist in our records.”

It seems that the whole thing was due to S3 settings being mis-configured.

I suppose that if there is a bug, it’s better error-checking on S3 settings when they are entered, which I bet is a big chicken-egg situation.