Обсуждение: PgAdmin 7.0 Import/Export servers function

Поиск
Список
Период
Сортировка

PgAdmin 7.0 Import/Export servers function

От
Edson Richter
Дата:

Pgadmin 7.0 running on Docker/Linux.

 

- What I’m doing: migrating from one (old) username to anoter (new) username.

- Both users have the role “Admin”.

- I can login both users, so there are no permissions or access issues.

 

Steps done:

  1. Login with old username, and exported all servers in a file called “servers-richter.json”
  2. Copied file from “storage/old-username” to “storage/new-username” (I’ve used the old lazy way, via docker exec -ti ... /bin/sh)
  3. Logout from old username, and login as new username
  4. Open the “import servers” window, and the file appears there
  5. I select the file, and click next: error “Access denied (/servers-richter.json)”

 

Permissions are set:

 

“-rw-r--r--    1 pgadmin  root         58637 Apr 23 16:21 servers-richter.json”

 

In log, I see the following line of error:

 

“::ffff:192.168.0.30 - - [23/Apr/2023:16:37:14 +0000] "POST /import_export_servers/load_servers HTTP/1.1" 401 100 "https://192.168.0.251:15000/browser/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"

 

Could you help me to import the servers file?

 

This is the error window:

 

 

 

Thanks,

 

ER

 

Enviado do Email para Windows

 

Вложения

RES: PgAdmin 7.0 Import/Export servers function

От
Edson Richter
Дата:

Additional info:

 

Trying to import using command line resulted in the following error:

 

/pgadmin4 $ python ./setup.py --load-servers /var/lib/pgadmin/storage/edson.richter_simfrete.com.br/servers-richter.json

Traceback (most recent call last):

  File "/pgadmin4/./setup.py", line 24, in <module>

    import config

  File "/pgadmin4/config.py", line 25, in <module>

    from pgadmin.utils import env, IS_WIN, fs_short_path

  File "/pgadmin4/pgadmin/__init__.py", line 24, in <module>

    from flask import Flask, abort, request, current_app, session, url_for

ModuleNotFoundError: No module named 'flask'

 

 

Thanks,

ER

 

Enviado do Email para Windows

 

De: Edson Richter
Enviado:domingo, 23 de abril de 2023 13:49
Para: Pgadmin-Support@Postgresql. Org
Assunto: PgAdmin 7.0 Import/Export servers function

 

Pgadmin 7.0 running on Docker/Linux.

 

- What I’m doing: migrating from one (old) username to anoter (new) username.

- Both users have the role “Admin”.

- I can login both users, so there are no permissions or access issues.

 

Steps done:

  1. Login with old username, and exported all servers in a file called “servers-richter.json”
  2. Copied file from “storage/old-username” to “storage/new-username” (I’ve used the old lazy way, via docker exec -ti ... /bin/sh)
  3. Logout from old username, and login as new username
  4. Open the “import servers” window, and the file appears there
  5. I select the file, and click next: error “Access denied (/servers-richter.json)”

 

Permissions are set:

 

“-rw-r--r--    1 pgadmin  root         58637 Apr 23 16:21 servers-richter.json”

 

In log, I see the following line of error:

 

“::ffff:192.168.0.30 - - [23/Apr/2023:16:37:14 +0000] "POST /import_export_servers/load_servers HTTP/1.1" 401 100 "https://192.168.0.251:15000/browser/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"

 

Could you help me to import the servers file?

 

This is the error window:

 

 

 

Thanks,

 

ER

 

Enviado do Email para Windows

 

 

Вложения

Re: PgAdmin 7.0 Import/Export servers function

От
Akshay Joshi
Дата:
Hi Edson

I am not able to reproduce the issue. Performed exact steps as mentioned above

Screenshot 2023-04-24 at 2.30.38 PM.png

Import/Export Dialog

Screenshot 2023-04-24 at 2.31.03 PM.png


On Sun, Apr 23, 2023 at 10:19 PM Edson Richter <edsonrichter@hotmail.com> wrote:

Pgadmin 7.0 running on Docker/Linux.

 

- What I’m doing: migrating from one (old) username to anoter (new) username.

- Both users have the role “Admin”.

- I can login both users, so there are no permissions or access issues.

 

Steps done:

  1. Login with old username, and exported all servers in a file called “servers-richter.json”
  2. Copied file from “storage/old-username” to “storage/new-username” (I’ve used the old lazy way, via docker exec -ti ... /bin/sh)
  3. Logout from old username, and login as new username
  4. Open the “import servers” window, and the file appears there
  5. I select the file, and click next: error “Access denied (/servers-richter.json)”

 

Permissions are set:

 

“-rw-r--r--    1 pgadmin  root         58637 Apr 23 16:21 servers-richter.json”

 

In log, I see the following line of error:

 

“::ffff:192.168.0.30 - - [23/Apr/2023:16:37:14 +0000] "POST /import_export_servers/load_servers HTTP/1.1" 401 100 "https://192.168.0.251:15000/browser/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"

 

Could you help me to import the servers file?

 

This is the error window:

 

 

 

Thanks,

 

ER

 

Enviado do Email para Windows

 

Вложения

RES: PgAdmin 7.0 Import/Export servers function

От
Edson Richter
Дата:

Ok, thanks - it seems the problem is my setup. I’ve been upgrading since early days of pgAdmin 4.7 or 4.8 – can’t remember now – may be something wen’t not so well.

Would you mind to guide me how can I debug this issue?

Or where do I get detailed logs (besides docker logs)?

Can I activate a higher log level to debug this issue?

 

Thanks in advance,

 

ER

 

 

Enviado do Email para Windows

 

De: Akshay Joshi
Enviado:segunda-feira, 24 de abril de 2023 06:14
Para: Edson Richter
Cc:Pgadmin-Support@Postgresql. Org
Assunto: Re: PgAdmin 7.0 Import/Export servers function

 

Hi Edson

 

I am not able to reproduce the issue. Performed exact steps as mentioned above

 

 

Import/Export Dialog

 

 

 

On Sun, Apr 23, 2023 at 10:19 PM Edson Richter <edsonrichter@hotmail.com> wrote:

Pgadmin 7.0 running on Docker/Linux.

 

- What I’m doing: migrating from one (old) username to anoter (new) username.

- Both users have the role “Admin”.

- I can login both users, so there are no permissions or access issues.

 

Steps done:

  1. Login with old username, and exported all servers in a file called “servers-richter.json”
  2. Copied file from “storage/old-username” to “storage/new-username” (I’ve used the old lazy way, via docker exec -ti ... /bin/sh)
  3. Logout from old username, and login as new username
  4. Open the “import servers” window, and the file appears there
  5. I select the file, and click next: error “Access denied (/servers-richter.json)”

 

Permissions are set:

 

“-rw-r--r--    1 pgadmin  root         58637 Apr 23 16:21 servers-richter.json”

 

In log, I see the following line of error:

 

“::ffff:192.168.0.30 - - [23/Apr/2023:16:37:14 +0000] "POST /import_export_servers/load_servers HTTP/1.1" 401 100 "https://192.168.0.251:15000/browser/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"

 

Could you help me to import the servers file?

 

This is the error window:

 

 

 

Thanks,

 

ER

 

Enviado do Email para Windows

 

 

Вложения