fititnt / uwazi-docker

Dockerized version of Uwazi (“openness" in Swahili). HURIDOCS designed Uwazi to make human rights information more open and accessible to the defenders who need it.
The Unlicense
11 stars 4 forks source link

Unmaintained deb package list, not starting #45

Closed mayeulk closed 1 year ago

mayeulk commented 1 year ago
$ docker-compose run -e IS_FIRST_RUN=true --rm uwazi
Building uwazi
Step 1/8 : FROM node:8-jessie
 ---> 0f8964092ab1
Step 2/8 : LABEL maintainer="Emerson Rocha <rocha@ieee.org>"
 ---> Using cache
 ---> 47df3a7c03bb
Step 3/8 : RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y   bzip2   dh-autoreconf   git   libpng-dev   poppler-utils
 ---> Running in 9c17417cbab4
Ign http://deb.debian.org jessie InRelease
Ign http://security.debian.org jessie/updates InRelease
Ign http://deb.debian.org jessie-updates InRelease
Ign http://security.debian.org jessie/updates Release.gpg
Ign http://deb.debian.org jessie Release.gpg
Ign http://security.debian.org jessie/updates Release
Ign http://deb.debian.org jessie-updates Release.gpg
Err http://security.debian.org jessie/updates/main amd64 Packages

Ign http://deb.debian.org jessie Release
Err http://security.debian.org jessie/updates/main amd64 Packages

Ign http://deb.debian.org jessie-updates Release
Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages
  404  Not Found [IP: 151.101.194.132 80]
Err http://deb.debian.org jessie/main amd64 Packages
  404  Not Found
Err http://deb.debian.org jessie-updates/main amd64 Packages
  404  Not Found
W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.194.132 80]

W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'uwazi' failed to build : The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y   bzip2   dh-autoreconf   git   libpng-dev   poppler-utils' returned a non-zero code: 100
(base) 

https://unix.stackexchange.com/a/508728/455148 said (in 2019):

"Wheezy and Jessie were recently removed from the mirror network, so if you want to continue fetching Jessie backports, you need to use archive.debian.org instead" "Since you’re building a container image, I highly recommend basing it on Debian 9 (Stretch) instead."

Is this project maintained? Thank you. Mayeul

fititnt commented 1 year ago

Hi @mayeulk. It's been a long time since I don't touch this project in production, but I would happily help you on this. In case there's not a more easy way to dockerize Uwazi, I could do it again, but I would need someone more to at least test the end result!

What I'm sure I could do is, at minimum, update all dependencies and check if the Uwazi welcome screen load is okay. What might be necessary just after this would be to test a bit if the app itself is still running okay with docker.

If I reply in the next few days, maybe by the next week we have this issue fixed.

Waitng, Rocha

fititnt commented 1 year ago

Confirmed!

Maybe it could be a good idea to update the underlying operational system and the dependencies, so you could test a newer release? This would take a bit more time from me, but might be better than just keep using outdated debian.

The current one uwazi-docker hardcoded on v1.4 (see https://github.com/huridocs/uwazi/releases/tag/v1.4) and the last one tagged with a lower release rate was 1.6. Even if I let the script always use the latest (current number: v1.123.2), at least after a few years, some dependency might stop working. Not sure how I would organize this (maybe another user option to manually select the Uwazi version?) but it tends to be a good idea to have a docker image able to at least run and be somewhat tested. Or we could simply let using the latest version and wait for anyone in the future to report that with the latest, the docker-uwazi has some dependency broken with the latest uwazi.

fititnt commented 1 year ago

Hi @mayeulk , this issue is now fixed. Maybe I will have newer ones, feel free to open other issues.

Actually, I took the time to do a quick fix on some small improvements that could be done as parameters, so at least the upgrades which does not involve major database upgrade (ElasticSearch and MongoDB) can now be executed with a upgrade command which will run yarn migrate and yarn reindex. This wasn't exposed on previous versions of this repository.

Also pinging @vasyugan . Maybe there's some bits on this branch he would be interested to copy and paste on his fork. (there is also a fork by @bardocuteam, so another pinging)

At this moment I'm not using Uwazi in production, so for both of you, I would need steps to reproduce if you open newer issues. But in general, some things that might be complex, such as the MongoDB and the ElasticSearch upgrades, I think I would be pretty comfortable to update like was done since this issue was opened.

I didn't attempt to use the very last Debian 12 Bookworm (which will have a LTS by 2028, see https://endoflife.date/debian) but now is the Debian 11 (Bullseye), but if you want we could do a quick check.

Relevant point which is different from current Uwazi documentation: this Uwazi-docker is using MongoDB 6.0, not the MongoDB 4.2, which I had problems using recently Debian. In theory the Uwazi app is working, but I haven't tested every feature, so in particular @acme might need to do tests on a backup (not main database) and maybe warn me if it was a bad idea.

If you all have some time next weeks and are interested, I could try to test again on very recent Debian, so we might push the versions up and for several years just keep doing minor incremental upgrades. For now I only done with MongoDB.

But, as expected, the fititnt/uwazi-docker, even with current approach of point to latest production tag of uwazi, is granted "to break" after some years because of the dependencies, however this likely to be better since at least the ones who are users don't stay with version too older.

mayeulk commented 1 year ago

Hi, thanks a lot for this! I'll be happy to make more tests and contribute to other tasks.

The server now seems to work, I was able to use many features.

EDIT: I'm copying all my comments below about "Redis connection in broken state " in https://github.com/fititnt/uwazi-docker/issues/50

However, after a while (maybe 30 or 60 minutes?), the uwazi-docker_uwazi_1 container stops. Below are extracts of the logs. Attached are longer logs. Happy to provide more if needed.

2023-07-25T20:38:37.944Z [uwazi_development] uncaughtException: Redis connection in broken state: connection timeout exceeded. Error: Redis connection in broken state: connection timeout exceeded. at RedisClient.connection_gone (/home/node/uwazi/prod/node_modules/redis/index.js:588:19) at RedisClient.on_error (/home/node/uwazi/prod/node_modules/redis/index.js:346:10) at Socket. (/home/node/uwazi/prod/node_modules/redis/index.js:223:14) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:489:12) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) [Tenant error] Error: Accessing nonexistent async context 2023-07-25T20:38:37.946Z [uwazi_development] uncaught exception or unhandled rejection, Node process finished !! Error: Redis connection in broken state: connection timeout exceeded. at RedisClient.connection_gone (/home/node/uwazi/prod/node_modules/redis/index.js:588:19) at RedisClient.on_error (/home/node/uwazi/prod/node_modules/redis/index.js:346:10) at Socket. (/home/node/uwazi/prod/node_modules/redis/index.js:223:14) at Socket.emit (node:events:513:28) at Socket.emit (node:domain:489:12) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) original error: { "code": "CONNECTION_BROKEN",

mayeulk commented 1 year ago

logs_uwazi_docker_server_stopping.txt

With timestamps, one sees that error 2023-07-25T20:38:37.945259424Z Error: Redis connection in broken state: connection timeout exceeded.

was just a few milliseconds before the end of the log file.

Note that, in the meantime, uwazi-docker-elasticsearch-1 and uwazi-docker-mongo-1 containers were still running

mayeulk commented 1 year ago

With bookworm (see https://github.com/fititnt/uwazi-docker/issues/48), the server stopped responding, too, after a while, with the same Redis error: [uwazi_development] uncaughtException: Redis connection in broken state: connection timeout exceeded. Error: Redis connection in broken state: connection timeout exceeded.

fititnt commented 1 year ago

Thank you @mayeulk . Already today I will start looking on your feedback.

I was suspecting it would need more tests