problems with upgrading old installation
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
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.)
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
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](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
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](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 12:31AM
Does your docker-compose start with a version like master?
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
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](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
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](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
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](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
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](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
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](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
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):
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 8:27PM
No such file or directory @ rb_sysopen - /loomio/public/client/vue/index.html
means the vue client did not build or could not be found.
Are you running stable or latest?
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 8:39PM
Actually, I posted that last comment too early.
Honestly, I don't get this error. The vue client is built during the Dockerfile build stage, so before the image gets to you. (assuming you're running :latest).
It's very strange to me that it's not there.
Side note: I just found a problem where app should have had "depends_on: redis" added, so I've added that to master now.
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
Holger Wessels Thu 16 Jul 2020 10:36PM
I'm running latest, now with your last addition. The funny thing is that the file is there somewhere and readable (/var/snap/docker/common/var-lib-docker/aufs/diff/e5de098ed06bdabead2ada2aaf96e78166a8c5c39be7950154a38e9cdb176683/loomio/public/client/vue/index.html), but somehow the relative path is not working. I tried also en-us locale in the browser, but no change. The machine has a very tight memory and cpu setting, it was just enough for the old version a year ago, but I sometimes get requestTimeoutExceptions (>15sec) usually in sprockets. Do you think those problems could be related? the 500 usually comes quite fast ...
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 10:58PM
oh dear, I think this line needs to be taken out of docker-compose.yml:
- ./client:/loomio/public/client
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 10:59PM
I've updated loomio-deploy master just now, so you can git pull rather than editing if you like
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
Holger Wessels Thu 16 Jul 2020 11:20PM
(sorry, that was before your last comments) Still strange. I've upgraded the server to 2 vCpus and 2 GB RAM, but the problem remains.
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
Holger Wessels Thu 16 Jul 2020 11:27PM
Yes, that was the break-through! :-) Now there's a beautiful new looking loomio (and a slightly bigger server) ! 👏Thanks for all your effort!
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 11:31PM
Thank you, really, for persisting. We found a lot of issues together... and I can't do it alone.
![RG](/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBK0xZRVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7a581de88c41bcec9b40d2bb53a4dc7ab8efdb69/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFHQWFRR0FPZ3B6WVhabGNuc0hPZ3h4ZFdGc2FYUjVhVlU2Q25OMGNtbHdWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--bee53b50eefebbfaf3427852775dd64daaceca76/IMG_4141.CR2.jpg)
Robert Guthrie Thu 16 Jul 2020 11:33PM
If you wanted to go back and edit your comments so only the relevant lines of stack trace remained, and maybe put them into code fences, that would form a pretty good guide for anyone else who later decides to upgrade an old Loomio install.
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
Holger Wessels Thu 16 Jul 2020 11:40PM
That's a good idea, I'll do that tomorrow morning 😴
![HW](https://secure.gravatar.com/avatar/a6e2cf7ff5347a91535001cd67386c84.png?d=retro&r=pg&s=128)
Holger Wessels Fri 17 Jul 2020 6:39PM
Done. Was also a good exercise in reading logfiles 😉
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
shows a repeating pattern like this:
l