Loomio

loomio-worker | could not connect to server: Connection refused

Q
Quim Public Seen by 34

Hello!

I've successfully installed loomio-deploy following github loomio-deploy instructions.

The server is an Ubuntu 18.04.

The app worked yesterday before setting the crontab. I saw the main loomio page.

Today the app and workers are failing to start due to pg connection refused.

I need some help with that issue. Thanks.

Here are some logs:

loomio-letsencrypt | 2020/06/03 18:27:44 Received event start for container 4073159beb5e
loomio-nginx   | dockergen.1 | 2020/06/03 18:27:44 Received event start for container 4073159beb5e
loomio-nginx   | dockergen.1 | 2020/06/03 18:27:44 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
loomio-nginx   | dockergen.1 | 2020/06/03 18:27:44 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
loomio-worker  | 2020-06-03T18:27:49.626Z pid=7 tid=goribzl9n INFO: Booting Sidekiq 6.0.7 with redis options {:url=>"redis://redis:6379"}
loomio-worker  | could not connect to server: Connection refused
loomio-worker  | 	Is the server running on host "db" (172.17.0.3) and accepting
loomio-worker  | 	TCP/IP connections on port 5432?
loomio-worker  | /usr/local/bundle/gems/pg-1.2.3/lib/pg.rb:58:in `initialize'
loomio-worker  | /usr/local/bundle/gems/pg-1.2.3/lib/pg.rb:58:in `new'
loomio-worker  | /usr/local/bundle/gems/pg-1.2.3/lib/pg.rb:58:in `connect'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in `connect'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in `initialize'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `new'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in `postgresql_connection'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in `new_connection'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in `checkout_new_connection'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `try_to_checkout_new_connection'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in `acquire_connection'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in `checkout'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
loomio-worker  | /usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in `retrieve_connection'

I know I can connect to the pg server:

~/loomio-deploy# /snap/bin/docker exec -it loomio-db psql -h 172.17.0.3 -U postgres
psql (12.2 (Debian 12.2-2.pgdg100+1))
Type "help" for help.

postgres=# exit

RG

Rob Guthrie Fri 3 Jul 2020

Hi, sorry for the slow reply!

This has been fixed recently. Please update your loomio-deploy repo. We've moved to a new docker-compse format which seems to help with this.