geocloud2 icon indicating copy to clipboard operation
geocloud2 copied to clipboard

Errors while creating a new user on latest images

Open hrishiballal opened this issue 10 months ago • 20 comments

Hello I just updated the docker images on my side, but when creating a new user, I am seeing errors below. Would appreciate any pointers on how to fix it.

gc2-error

hrishiballal avatar Apr 15 '24 09:04 hrishiballal

Could you check the response from the server in the browser developer consol?

mapcentia avatar Apr 16 '24 19:04 mapcentia

Hello @mapcentia thank you for this, how do you mean? There is no errors, I am using the docket compose script to pull the latest images l.

hrishiballal avatar Apr 16 '24 20:04 hrishiballal

Is in the browser developer tools. When you create a new user, the page will make a POST request. It returns an error in your case. Take a look at the image. Here I got an error because the user already exists. This is an excepted error, but yours is not. I guess the response has some info about the error:

image

mapcentia avatar Apr 17 '24 08:04 mapcentia

screenshot

This happens even I have used docker system prune and also docker volume prune

hrishiballal avatar Apr 18 '24 17:04 hrishiballal

When creating a new user, GC2 will create a database and a role (with the same name). For some reason something went wrong and GC2 tried to clean up by dropping the user role, which was created in the process (or already existing, which may be the cause of the error). But it can't, because the user owns objects in another database?

Is your new user name the same as an already existing user role in the database?

I think I'll take a look on the process of creating the GC2 users. This has happen before and leaves a bit of a mess.

mapcentia avatar Apr 19 '24 06:04 mapcentia

Yes correct the screenshot is when I use a username that is already exists, the error is same when I try to create a new username that does not exist. I had a existing version, I brought it down and updated the images.

hrishiballal avatar Apr 19 '24 08:04 hrishiballal

You get an error even when using a completely new name? As never used before?

mapcentia avatar Apr 22 '24 06:04 mapcentia

Thats correct, I did a totally fresh installation and here is a new error, BTW I am using docker compose down --volumes to ensure that all volumes are also deleted

image

hrishiballal avatar Apr 29 '24 15:04 hrishiballal

I've gone through the Docker images and compose file https://github.com/mapcentia/gc2-vidi-docker-compose

It should work now - I've tested on a freshly installed Ubuntu 24.04.

Remove old images and volumes

docker compose down --volumes should do it

Then docker system prune -a

mapcentia avatar Apr 30 '24 20:04 mapcentia

Thank you for this, I am however getting the same error, fresh install of Ubuntu 24.04 and following your instructions.

image

hrishiballal avatar May 01 '24 12:05 hrishiballal

Could you try to pull the image:

docker pull mapcentia/gc2core8

And then docker compose down and docker compose up

mapcentia avatar May 02 '24 11:05 mapcentia

Thank you for this, it is still creating an issue for me, sharing steps / screenshots

Step 1

p1

Step 2

p2

Step 3

p3

Step 4

p4

Step 5

p5

Step 6

p6

hrishiballal avatar May 02 '24 13:05 hrishiballal

Did you git pull the latest https://github.com/mapcentia/gc2-vidi-docker-compose ?

We're still finding and fixing bugs in the new GC2 Docker, so please pull gc2core again

mapcentia avatar May 02 '24 19:05 mapcentia

Hello @mapcentia , I have done it but still encountering the same issue, I am trying to revert to the old docker compose file and see if it works. Thanks again!

hrishiballal avatar May 04 '24 16:05 hrishiballal

I just tested with the latest repo and docker compose on my second machine with Windows + WSL and Docker and it all works no problems. For some reason it is not working on Ubuntu. I will investigate more.

hrishiballal avatar May 04 '24 17:05 hrishiballal

When I run it on linux server the following error is shown

image

and an additional error when launching for the first time (perhaps not relevant at this point) image

hrishiballal avatar May 07 '24 09:05 hrishiballal

I see the problem now. Migrations is not run on first startup because of the pg_hba.conf error. Could you check, that the mapcentia/postgis15 image is used? It should have digest: sha256:4cfbacc93cb2564104b0c8d16a6ee0ca73c82c8f8feb24bf2eb59c4b82e28050

mapcentia avatar May 07 '24 11:05 mapcentia

Hello @mapcentia I updated the image: image but getting the same error: image

Is there something I should change in the docker compose?

hrishiballal avatar May 08 '24 08:05 hrishiballal

I got it! changing Line 56 to 127.0.0.1 instead of localhost works

image

hrishiballal avatar May 08 '24 08:05 hrishiballal

Oh, thanks for keep trying. I've updated the file. It's strange why it works on some systems. Then I look at /etc/hosts inside the postgis15 container I see these lines:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback

I guess your file is missing the first?

Docker write this file, so maybe it's a Docker thing. I'll keep from using localhost in Docker, because it's not sure it's matched to 127.0.0.1

mapcentia avatar May 08 '24 09:05 mapcentia