Postgresql can't connect application server through PGAdmin4

前端 未结 8 2023
陌清茗
陌清茗 2020-12-30 08:18

I installed PostgreSql on my Windows machine. I can connect to PostgreSql through cmd. But when I want to launch pgAdmin I am getting this error message.

相关标签:
8条回答
  • 2020-12-30 09:01

    The same problem happened to me today:

    And this is how I've solved it:

    1) Use a text editor to open the config_distro.py file under the c:\Program Files\pgAdmin 4\v1\web folder. Change the value for SERVER_MODE from True to False, then save the change. (I have run Notepad++ as an Administrator, in order to be able to save in this protected folder.)

    2) Go to folder c:\Users\your_name\AppData\Roaming\pgAdmin and make sure there is nothing there (delete all the files, as they are temporary and will be restored after starting pgAdmin)

    3) Start pgAdmin

    4) This time you will see a white box that sits - at least, on my slow laptop - about 20 seconds. (You may briefly see the original error message, but do not worry).

    5) Meanwhile, the temporary files - required for running the application - are created.

    6) Once the temporary files process is over, the application starts as expected.

    0 讨论(0)
  • 2020-12-30 09:05

    My config_distro.py was missing this line:

    MINIFY_HTML=False
    

    I added it as in the above steps and it works

    0 讨论(0)
提交回复
热议问题