Get an error trying to upgrade - can't load memory_profiler


(Lars) #1

I upgraded the docker manager today and went ahead to upgrade discourse, but it fails every time now with this log:

http://pastebin.com/sedDkPbL

I guess the interesting part is this:

Bundle complete! 99 Gemfile dependencies, 180 gems now installed. Gems in the group development were not installed. Bundled gems are installed into ./vendor/bundle. $ bundle exec rake multisite:migrate rake aborted! LoadError: cannot load such file -- memory_profiler

How do I get it to upgrade correctly again? I didn’t mess with anything, except CSS etc :stuck_out_tongue:


(Rafael dos Santos Silva) #2

Please rebuild:

./launcher rebuild app

You aren’t supposed to run latest discourse with ruby 2.0, so something is off.


Discourse failed after attempted update
(Judah) #3

Hi, I am having the exact issue.

Before, it use to error once but if I ran the update again it would complete but now it does not finish the update at all. This also happens when trying up update the docker manager but that does still complete after a try or two.

Am I suppose to run another command after using ./launcher avenge app?


(Jeff Atwood) #4

Launcher avenge app? :laughing:


(Judah) #5

ah, I see now. It was avenge before :stuck_out_tongue:

./launcher rebuild app

Worked for me, thanks


(Régis Hanol) #6

Pretty sure avenge never worked.


(Judah) #7

Oh no, I just realized why I kept seeing avenge. I have an xkcd word substitution addon and it changed the word rebuild to avenge. Avenge did not do anything or actually got some package I think.

Wow, my bad. This is the strip that the addon is based on xkcd: Substitutions 2.


(Lars) #8

Now my instance died…

Output of rebuild app was:

http://pastebin.com/BJA46FA0

Looks like it used up all space in the process (about 5GB was free - not sure if that was the only error that was important) - is there a way to free up some space? I’m afraid of running ./launcher cleanup because it says it will delete all containers not running (and none are running right now!)…


(Jeff Atwood) #9

/launcher cleanup is safe to run. You can also do apt-get autoclean && apt-get autoremove -y to free up some space from old Ubuntu automatic security updates.


(Lars) #10

Thanks. I did a clean up, and the apt-get stuff too - freed up a bit of space, but to be sure, I upgraded the droplet, so now I have 26GB free.

After cleanup/resize I tried rebuild app again, and it looks like it succeeded - site is still not available though - it just says “502 Bad Gateway” - Do I do the postgres upgrade instructions?

I mean these:

UPGRADE OF POSTGRES FAILED

You are going to need to export your data and import into a clean instance:

In containers/app.yml: Change “templates/postgres.template.yml” TO “templates/postgres.9.3.template.yml”

Run ./launcher rebuild app again

When your instance is running:
Run ./launcher enter app
Run cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db

Undo the base_image and postgres template from your container config
Run: ./launcher stop app
Run: sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old
Run: ./launcher rebuild app

Run: ./launcher enter app
Run: cd /shared/postgres_backup
Run: sv stop unicorn
Run: sudo -iu postgres dropdb discourse
Run: sudo -iu postgres createdb discourse
Run: sudo -iu postgres psql discourse < backup.db
Run: exit
Run: ./launcher rebuild app


(Lars) #11

This failed with:

./launcher enter app
root@forum:/# cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db
pg_dump: [archiver (db)] connection to database “discourse” failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?

EDIT: I guess I should change containers/app.yml first, then rebuild… Doing that now.


(Lars) #12

Changing containers/app.yml to postgres.9.3.tempate and rebuilding made another error:

http://pastebin.com/zY62yDk0

:confused: What do I do?


(Lars) #13

Hmm changed it back to postgres.template and rebuilt - now it seems to be running alright? :slight_smile: Hmm!