Loomio
Tue 30 Jun 2020 10:35PM

problems with upgrading old installation

HW Holger Wessels Public Seen by 47

Hi,

as it was mentioned in a similar topic, upgrading an older loomio installation which wasn't touch since installation can be tricky. I've tried for hours all the variations I could find, but wasn't successful yet. I'm running a Ubuntu 18.4 virtual server. I've tried several from the command mentioned in the other threads, upgrading the os, git pull etc. but nothing got me through.

What could be the most useful next step?

Thanks,

Holger (Berlin Burner e.V.)

HW

Holger Wessels Wed 15 Jul 2020 12:20PM

Hi Rob, that actually brought me through the database migration :-)
Now something appears to be running. But I'm getting time out errors and 500 errors, and

docker-compose logs -f

shows a repeating pattern like this:

loomio-worker | 2020-07-15T12:09:10.361Z pid=7 tid=grwby67hr WARN: Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)

l

RG

Robert Guthrie Wed 15 Jul 2020 7:15PM

Nice. We'll get there.

Looks like your config (env or docker-compose.yml) is missing some new variables... particularly the REDIS_URL. Try updating your docker-compose.yml to match what is the current master on loomio/loomio-deploy

HW

Holger Wessels Thu 16 Jul 2020 12:21AM

I can already feel it, the end is near ... 🙂 But: I updated loomio-deploy (also .env to postgres 12.2, and both TAG=latest), and ended up with an error similar to another recent thread (but in this case I'm already up-to-date):

loomio-worker | 2020-07-16T00:18:07.801Z pid=7 tid=gqfkyrvc3 WARN: PG::ConnectionBad: could not translate host name "db" to address: Name or service not known

(leads to continuous restarts and 500 errors displayed).

RG

Robert Guthrie Thu 16 Jul 2020 12:31AM

Does your docker-compose start with a version like master?

HW

Holger Wessels Thu 16 Jul 2020 1:22AM

Hm, I‘m not sure what you are referring to with master. The loomio-deploy ist from the Master branch, and I’ve just updated it (to avoid more version difficulties). Last update must have been a month ago or so. the docker-compose command are just the normal ones, without any version. From my feeling everything should be as new (latest) as possible ...

RG

Robert Guthrie Thu 16 Jul 2020 4:44AM

Sorry, was on my phone, trying to answer quickly. Usually db not valid hostname is a problem with the docker-compose.yml file being in the older format. The new format starts with version: '3' on it's own line, then a services: section, with db: and app: and such indented under that. Do you have that?

As seen here: https://github.com/loomio/loomio-deploy/blob/master/docker-compose.yml

HW

Holger Wessels Thu 16 Jul 2020 8:24AM

Hi Rob, yes I have the exact same version from the master branch. Any specific parts of the log file or configuration files which could explain this? Shall I add db to the hosts file on the server, or is that a docker-internal reference? The postgres version has changed from 9.6 to 12.2, maybe some additional configuration steps are necessary due to that?

HW

Holger Wessels Thu 16 Jul 2020 9:00AM

And, when I now run update.sh, also the migration step fails in very beginning because of the problems with db hostname
[...]

rake aborted!
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "db" (172.18.0.2) and accepting
TCP/IP connections on port 5432?

RG

Robert Guthrie Thu 16 Jul 2020 9:03AM

I would expect to see some postgres errors.. and actually.. I wonder if there is some you're not seeing. Also.. try modifying your .env file so that you're using postgres image 9.6 rather than.. whatever the latest is... because your database will be 9.6 I expect.

HW

Holger Wessels Thu 16 Jul 2020 10:31AM

Oh, sorry, I expected an automatic migration here, too ... Soon I'll probably get along way better with docker containers and their construction... So, now the db host problem seems to be gone, but I'm still at 500 error. Look like I broke something during updates...

loomio-app | Started GET "/dashboard" for 79.224.162.67 at 2020-07-16 10:25:11 +0000
loomio-app | Processing by ApplicationController#index as HTML
loomio-app | Completed 500 Internal Server Error in 6045ms
loomio-app | Errno::ENOENT (No such file or directory @ rb_sysopen - /loomio/public/client/vue/index.html):

Load More