Cannot clean reinstall with docker-compose.

When things don't work as they should.
Post Reply
mehmet.ali.anil
Posts: 6
Joined: Thu Sep 27, 2018 4:56 pm

Cannot clean reinstall with docker-compose.

Post by mehmet.ali.anil »

I was able to make a clean install of mayan-edms through docker-compose, and I was able to log onto the admin panel.
Then I wanted to get LDAP running, but whildst doing so, I realized that I am not even able to do a clean install anymore.

I have another postgresql at port 5432 for another docker. But I don't think that there is a mixup there, since the logs explicitly state postgresql_1

The logs are long but eventually:

Code: Select all

postgresql_1  | PostgreSQL init process complete; ready for start up.
postgresql_1  |
postgresql_1  | LOG:  incomplete startup packet
postgresql_1  | LOG:  database system was shut down at 2021-02-01 23:43:34 UTC
postgresql_1  | LOG:  MultiXact member wraparound protections are now enabled
postgresql_1  | LOG:  database system is ready to accept connections
postgresql_1  | LOG:  autovacuum launcher started
postgresql_1  | ERROR:  relation "permissions_storedpermission" does not exist at character 132
postgresql_1  | STATEMENT:  SELECT "permissions_storedpermission"."id", "permissions_storedpermission"."namespace", "permissions_storedpermission"."name" FROM "permissions_storedpermission" WHERE ("permissions_storedpermission"."name" = 'acl_edit' AND "permissions_storedpermission"."namespace" = 'acls')
postgresql_1  | ERROR:  relation "permissions_storedpermission" does not exist at character 132
postgresql_1  | STATEMENT:  SELECT "permissions_storedpermission"."id", "permissions_storedpermission"."namespace", "permissions_storedpermission"."name" FROM "permissions_storedpermission" WHERE ("permissions_storedpermission"."name" = 'acl_view' AND "permissions_storedpermission"."namespace" = 'acls')
postgresql_1  | ERROR:  relation "permissions_storedpermission" does not exist at character 132
And get this for the log of app_1

Code: Select all

app_1         | /opt/mayan-edms/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.11) or chardet (4.0.0) doesn't match a supported version!
app_1         |   RequestsDependencyWarning)
I remove all containers and all volumes before reinstalling.
Somehow I managed to make something persist clean installation.
mehmet.ali.anil
Posts: 6
Joined: Thu Sep 27, 2018 4:56 pm

Re: Cannot clean reinstall with docker-compose.

Post by mehmet.ali.anil »

Realized that Mayan was using my host PSQL instance.
I tried to configure PSQL and mayan to connect through a different port 5434, but no avail.

I am wondering why mayan does not use the psql that is shipped with it by default? Shouldn't containers use some kind of an internal socketry to communicate, than to raise the communication to the host level?
User avatar
rosarior
Developer
Developer
Posts: 651
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Cannot clean reinstall with docker-compose.

Post by rosarior »

I am wondering why mayan does not use the psql that is shipped with it by default? Shouldn't containers use some kind of an internal socketry to communicate, than to raise the communication to the host level?
This is indeed the case when using Docker Compose. The Compose file for Mayan creates its own network, and while it is route-able to and from the host OS network, it will only connect to hosts in its own network, namely "postgresql" and "redis". Because the Docker network is different than the host network, the Docker network hosts will have IP addresses in a range different that the host OS network and will not resolve to any service in your host OS network.

https://docs.docker.com/compose/networking/

Line #3: https://gitlab.com/mayan-edms/mayan-edm ... ose.yml#L3

You can confirm this with: docker network ls
2021-02-03_03-04.png
2021-02-03_03-04.png (45.77 KiB) Viewed 232 times
2021-02-03_03-05.png
2021-02-03_03-05.png (122.11 KiB) Viewed 232 times
Post Reply