Hi,
I had an old 9.9.x install (docker based), and I tried to upgrade it to the latest today, and have been running into a series of problems.
First, I tried upgrading using the upgrade admin panel, and that didn't go too well - it seemed to freeze up, and I had to reboot.
Then I tried ./launcher rebuild app
- and that failed quite early in the process - around "Pulling fs/metadata/dependent layers"
Next, since I had a backup from the admin cp, I decided to fully reinstall. So I deleted (renamed) /var/docker (the old install) away, and started afresh in /var/discourse. The install/bootstrap went fine this time. When trying to start it though, I got an error:
Found an existing container by its name, recovering cidfile, please rerun
On re-running:
cid found, ensuring container is started
Error response from daemon: Cannot start container 971e92863c77: Volume exists: 0d89465b1f9e0b67dbd782ace8714e463acafc5e2c3e0b872bbd0ef3d3e30e0c
I then tried ./launcher restart app
and that seemed to work - except, the site kept giving me a 502 - bad gateway
./launcher logs app
is filled with messages like:
ok: run: redis: (pid 33) 0s
ok: run: postgres: (pid 31) 0s
[33] 26 Feb 07:06:57.492 # Can't chdir to '/shared/redis_data': No such file or directory
[38] 26 Feb 07:06:57.983 # Can't chdir to '/shared/redis_data': No such file or directory
[40] 26 Feb 07:07:01.369 # Can't chdir to '/shared/redis_data': No such file or directory
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
[41] 26 Feb 07:07:04.827 # Can't chdir to '/shared/redis_data': No such file or directory
[42] 26 Feb 07:07:09.017 # Can't chdir to '/shared/redis_data': No such file or directory
[43] 26 Feb 07:07:10.698 # Can't chdir to '/shared/redis_data': No such file or directory
[44] 26 Feb 07:07:11.534 # Can't chdir to '/shared/redis_data': No such file or directory
2015-02-26 07:07:13 UTC FATAL: data directory "/shared/postgres_data" does not exist
[46] 26 Feb 07:07:13.705 # Can't chdir to '/shared/redis_data': No such file or directory
[51] 26 Feb 07:07:15.284 # Can't chdir to '/shared/redis_data': No such file or directory
2015-02-26 07:07:15 UTC FATAL: data directory "/shared/postgres_data" does not exist
SSH'ing into the app, and looking at /shared/log/production.log
:
Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:331:in `rescue in establish_connection'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:317:in `establish_connection'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:94:in `block in connect'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:279:in `with_reconnect'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:93:in `connect'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:262:in `with_socket_timeout'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:273:in `without_socket_timeout'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:125:in `call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/subscribe.rb:35:in `subscription'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/subscribe.rb:12:in `subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:2622:in `_subscription'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:2035:in `block in subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in `block in synchronize'", "/usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in `synchronize'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:2034:in `subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/message_bus-1.0.6/lib/message_bus/reliable_pub_sub.rb:247:in `global_subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/message_bus-1.0.6/lib/message_bus.rb:375:in `global_subscribe_thread'", "/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/message_bus-1.0.6/lib/message_bus.rb:370:in `block in new_subscriber_thread'"]
...
And /shared/log/rails/unicorn.stderr.log
:
I, [2015-02-26T07:08:20.009631 #59] INFO -- : pid=/var/www/discourse/tmp/pids/unicorn.pid possibly stale, got EPERM signalling PID:50
I, [2015-02-26T07:08:20.036221 #59] INFO -- : Refreshing Gem list
URGENT: 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"?
Failed to initialize site default
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:331:in `rescue in establish_connection': Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) (Redis::CannotConnectError)
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:317:in `establish_connection'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:94:in `block in connect'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:279:in `with_reconnect'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:93:in `connect'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:350:in `ensure_connected'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:207:in `block in process'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:292:in `logging'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:206:in `process'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:112:in `call'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:789:in `block in get'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in `block in synchronize'
from /usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in `synchronize'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:788:in `get'
from /var/www/discourse/lib/discourse_redis.rb:57:in `block (2 levels) in <class:DiscourseRedis>'
from /var/www/discourse/config/initializers/secret_token.rb:6:in `<top (required)>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:241:in `load'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:241:in `block in load'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:241:in `load'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/engine.rb:648:in `block in load_config_initializer'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/notifications.rb:161:in `instrument'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/engine.rb:647:in `load_config_initializer'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/engine.rb:611:in `each'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /usr/local/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `each'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:44:in `tsort_each_child'
from /usr/local/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/railtie.rb:194:in `public_send'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/railtie.rb:194:in `method_missing'
from /var/www/discourse/config/environment.rb:5:in `<top (required)>'
from config.ru:3:in `require'
from config.ru:3:in `block in <main>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in `start'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
...
Any pointers what might be wrong?
Thank you!
Edit: This is on Ubuntu 12.04. I had to get a newer docker than what the distro had - I now have:
$ docker -v
Docker version 1.5.0, build a8a31ef