Admin/upgrade page is blank (aug 2015)


#1

WE can’t see the available update info at /admin/upgrade. i.e. this is similar to
Discourse Meta and
Discourse Meta .

The rails app logs show failure like so:

Started GET "/admin/upgrade" for 161.202.72.168 at 2015-08-10 15:43:47 +0000
Processing by DockerManager::AdminController#index as HTML
  Rendered plugins/docker_manager/app/views/docker_manager/admin/index.html.erb (26.9ms)
Completed 200 OK in 41ms (Views: 30.1ms | ActiveRecord: 5.1ms)
Started GET "/admin/docker/repos" for 161.202.72.168 at 2015-08-10 15:43:48 +0000
Processing by DockerManager::AdminController#repos as */*
Processing by SessionController#csrf as */*
Completed 200 OK in 15ms (Views: 0.6ms | ActiveRecord: 7.4ms)
Completed 500 Internal Server Error in 77ms (ActiveRecord: 1.4ms)

NoMethodError (undefined method `downcase' for nil:NilClass):
  lib/middleware/anonymous_cache.rb:124:in `call'
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:26:in `call'
  lib/middleware/request_tracker.rb:72:in `call'
  lib/scheduler/defer.rb:85:in `process_client'
  lib/middleware/unicorn_oobgc.rb:95:in `process_client'

I’ve had a look at traffic flows, and when I make the above request, there’s no sign of any outgoing request, or dns request that might be the start of one. I’m not sure if that’s a useful diagnostic though, or just a reflection of the remote content having already been fetched and cached.


(Jeff Atwood) #2

SSH in

cd /var/discourse
git pull
./launcher rebuild app
./launcher clean

I also recommend upgrading Docker via apt-get as well so you are on latest.


#3

I did a container rebuild yesterday which didn’t help. I’ve just checked, and both git and the lxc-docker package are already up to date with the latest.

I haven’t done the launcher clean, (or launcher cleanup), but presumably that’s not the source of the primary problem. IT fails though like so:

root@our:/var/discourse# ./launcher cleanup

The following command will
- Delete all docker images for old containers
- Delete all stopped and orphan containers

Are you sure (Y/n): y
Starting Cleanup (bytes free 28204488)
date: invalid date ‘"0001-01-01 00:00:0’
scripts/docker-gc: line 69: 1439300742 - : syntax error: operand expected (error token is "- ")
Finished Cleanup (bytes free 28204448)

I’ve fixed my copy of scripts/docker-gc and created a pull request


(David García-Navas) #4

Do you have some plugins installed?

We had a similar problem with the upgrade page, it showed blank because one of the plugins hadn’t the correct info.


#6

plugins are configured like so:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/verdi327/akismet.git

If there’s a problem with one of these, what would I be looking for to identify it?


(David García-Navas) #7

I’m not 100% sure, but i think that the plugins without the correct info in plugin.rb do that /upgrade page shows blank.
Could you test changing that verdi327/akismet for the official one?

Compare (in the verdi327 plugin there is no info in the first lines):



(Jeff Atwood) #8

Yes David is right you are using an incorrect, unofficial plugin. Only use plugins from our repository path.


#9

Switching to the official version of the plugin has solved the problem. I’ve posted an issue to the github issues page of the original version of the plugin - there should at least be a note on the README page.


(Thomas Davis) #10

I am having this same issue. This is a major problem for me. I could not even rebuild because I ran out of space. I had to go increase the volume size just to get it working again. I finally figured out how to use docker instead… I need to rebuild often. I had other addons, but removed them and rebuilt again with no luck. These are my addons

hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone GitHub - discourse/docker_manager: plugin for use with discourse docker image

This is the failed cleanup command.

[ec2-user@ip-xxx-xx-xx-xxx discourse]$ sudo ./launcher cleanup
which: no docker.io in (/sbin:/bin:/usr/sbin:/usr/bin)

The following command will

  • Delete all docker images for old containers
  • Delete all stopped and orphan containers

Are you sure (Y/n):

Starting Cleanup (bytes free 7887304)
date: invalid date ‘"0001-01-01 00:00:0’
scripts/docker-gc: line 69: 1442446112 - : syntax error: operand expected (error token is "- ")
Finished Cleanup (bytes free 7887304)

I am using the current release.

This seems to be culprit… This command line always returns “0001-01-01T00:00:00Z” for every container.

docker inspect -f “{{json .State.FinishedAt}}” 5ec35595c8ad2b4a45c128b9374a664a69ca4dde303f83c5260da73babe574b7


#11

While the symptom might be the same, I don’t think your situation comes from the same cause.

This might be the issue affecting you; not necessarily that the date value is not a sensible one, but rather that it’s being truncated such that it’s invalid.