При запуске pgAdmin выдает ошибку
The application server could not be contacted
но если запустит pgAdmin 3
все загружается,
При повторном запуске pgAdmin 4
этой ошибки нет,все загружается.
Kosta B.
5,8113 золотых знака14 серебряных знаков24 бронзовых знака
задан 12 июн 2018 в 18:12
Антон ПрохоровАнтон Прохоров
3131 золотой знак2 серебряных знака11 бронзовых знаков
Перезапустите службу postgres.
ответ дан 27 июл 2018 в 6:37
1
Я не знаю поможет ли это кому-то, но всё же напишу тут, дорогой читатель. Если не помогли такие методы, как:
-попробуйте запустить PgAdmin отмени администратора.
-добавьте путь к bin-папке Postgresql в переменные окружения.
-очистите папку C:Users%USERNAME%AppDataRoamingpgAdmin
-перезапустите службу
То проверьте имя и описание своего компьютера, если заданы значения на русском, то измените их на латинские буквы, затем всё полностью удалите и переустановите, мне помогло.
ответ дан 19 июл 2019 в 17:19
Win7_x64 pgAdmin 4.21 — при такой ошибке помогло задать латинское имя компьютера, с перезагрузкой
ответ дан 31 мая 2020 в 10:15
Once upon a time I had a Postgres database that worked with pgAdmin. I have a webservice running on a WildFly server that made connections to the DB and everything worked fine.
After a while(a few months) I have tried to open pgAdmin again and it stuck on the loading…
I remove postgres and pgAdmin using Revo Uninstall, then installed postgres 9.6 and opened pgAdmin and it stays in the loading screen forever.
Can anyone help me ? [Using postgres 9.6 with pgAdmin v1.3],
On Event Viewer I saw the following error in pgAdmin :
Faulting application name: pgAdmin4.exe, version: 0.0.0.0, time stamp: 0x580f31f6
Faulting module name: MSVCP120.dll, version: 6.3.9600.18438, time stamp: 0x57ae642e
Exception code: 0xc0000135
Fault offset: 0x00000000000ecdd0
Faulting process id: 0x1de4
Faulting application start time: 0x01d2a7d1566324ba
Faulting application path: C:Program FilesPostgreSQL9.6pgAdmin 4binpgAdmin4.exe
Faulting module path: MSVCP120.dll
Report Id: 984dd9d8-13c4-11e7-832d-5ce0c535006f
Faulting package full name:
Faulting package-relative application ID:
PostgreSQL recently released version 15. Now the pgAdmin comes as a desktop application instead of being opened in a browser. But they have recently been an error that’s roaming around which reads ‘pgAdmin 4 the application server could not be contacted.’ I have to admit, I do not fully know what the causes of this error are (all I know is it has to do with servers) but I’ve also encountered this error myself, and luckily, I found a quick way to fix it, but it might not be the best. I’m going to share with you in this blog post how o did it. Feel free to let me know in the comments if there are any other better fixes.
Here are the steps to take in order to fix the fatal error:
- Click the configure button at the bottom right corner.
- check the checkbox which reads, Fixed port number.
- Change the port number to the one you entered during the installation
- click the save button at the bottom right corner of the window.
Now here are details steps:
1. Click the configure button at the bottom right corner.
On the error window, click the configure button at the bottom right corner of the error window.
2. check the checkbox which reads, Fixed port number.
After you click the Configure window, another window will pop up. On this window, check the checkbox which reads, Fixed port number.
3. Change the port number to the one you entered during installation
Clicking the checkbox will enable the port input on the right side. Change the port number to the one you entered during installation, if you used our guide on how to connect PostgreSQL with Django, it’s more likely you’ve used port 5432 because it is the default. If a message that says ‘the port is already in usage pops up’, keep on changing it till you find a port that is free.
4. Click the save button at the bottom right corner of the window.
After changing the port number, click the save button at the bottom right corner of the window.
A window will pop up telling you that pgAdmin has to be restarted in order to apply the changes. Go ahead and click the ‘okay’ button.
And wait for the app to start. Most of the time, it might not restart on its own, so if it takes a long time before it starts, better do that on your own.
Okay, above is what I did to fix the error. Please let me know in the comments section below if you have any other ways of fixing the error. Peace.
Problem Description:
I’ve installed PostgreSQL 12, and pgAdmin 4. When I try to run pgAdmin 4 i get a fatal error «The pgAdmin 4 server could not be contacted». I’ve tried running it as administrator, deleting files at «C:UsersUserAppDataRoamingpgAdmin» and adding «C:Program FilesPostgreSQL12bin» to system environment variables. I don’t know what else can I do. I’m sure that the PostgreSQL server is working since it’s service at services.msc is running.
Here are logs from running pgAdmin4. I can see that something is wrong here, but I don’t know how to fix this:
Traceback (most recent call last):
File "C:/Program Files/pgAdmin 4/v4/web/pgAdmin4.py", line 217, in <module>
main()
File "C:/Program Files/pgAdmin 4/v4/web/pgAdmin4.py", line 199, in main
app.run(
File "C:/Program Files/pgAdmin 4/v4/venv/Lib/site-packagesflaskapp.py", line 943, in run
run_simple(host, port, self, **options)
File "C:/Program Files/pgAdmin 4/v4/venv/Lib/site-packageswerkzeugserving.py", line 1052, in run_simple
inner()
File "C:/Program Files/pgAdmin 4/v4/venv/Lib/site-packageswerkzeugserving.py", line 996, in inner
srv = make_server(
File "C:/Program Files/pgAdmin 4/v4/venv/Lib/site-packageswerkzeugserving.py", line 847, in make_server
return ThreadedWSGIServer(
File "C:/Program Files/pgAdmin 4/v4/venv/Lib/site-packageswerkzeugserving.py", line 740, in __init__
HTTPServer.__init__(self, server_address, handler)
File "C:/Program Files/pgAdmin 4/v4/venv/Libsocketserver.py", line 452, in __init__
self.server_bind()
File "C:/Program Files/pgAdmin 4/v4/venv/Libhttpserver.py", line 140, in server_bind
self.server_name = socket.getfqdn(host)
File "C:/Program Files/pgAdmin 4/v4/venv/Libsocket.py", line 756, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 5: invalid start byte
Here is another .log file:
2020-08-31 17:15:12: Checking for system tray...
2020-08-31 17:15:12: Starting pgAdmin4 server...
2020-08-31 17:15:12: Creating server object, port:52967, key:459b0c86-b99e-46f0-9070-55554b9621d3, logfile:C:/Users/user/AppData/Local/pgadmin4.d41d8cd98f00b204e9800998ecf8427e.log
2020-08-31 17:15:12: Python Path: C:/Program Files/pgAdmin 4/v4/venv/Lib/site-packages;C:/Program Files/pgAdmin 4/v4/venv/DLLs;C:/Program Files/pgAdmin 4/v4/venv/Lib
2020-08-31 17:15:12: Python Home: C:/Program Files/pgAdmin 4/v4/venv
2020-08-31 17:15:12: Initializing Python...
2020-08-31 17:15:12: Python initialized.
2020-08-31 17:15:12: Adding new additional path elements
2020-08-31 17:15:12: Redirecting stderr...
2020-08-31 17:15:12: stderr redirected successfully.
2020-08-31 17:15:12: Initializing server...
2020-08-31 17:15:12: Webapp Path: C:/Program Files/pgAdmin 4/v4/web/pgAdmin4.py
2020-08-31 17:15:12: Server initialized, starting server thread...
2020-08-31 17:15:12: Open the application code and run it.
2020-08-31 17:15:12: Set the port number, key and force SERVER_MODE off
2020-08-31 17:15:12: PyRun_SimpleFile launching application server...
2020-08-31 17:15:13: Application Server URL: http://127.0.0.1:52967/?key=459b0c86-b99e-46f0-9070-55554b9621d3
2020-08-31 17:15:13: The server should be up. Attempting to connect and get a response.
2020-08-31 17:15:21: Failed to launch the application server, server thread exiting.
If you know what could I do, please help me.
Solution – 1
After dealing with this issue myself, with the exact same error and stacktrace as given, I finally found a solution.
The host name of my pc is what was causing the issue, as it included an ‘æ’ in it which is a non-ASCII character. So the host name, if used for pgadmin, can apparently only include ASCII characters.
The solution was to just change the host name to something without the ‘æ’ (æ -> ae, in my case). The host name is the actual name of the pc, found and edited under system properties (This PC then Properties).
Solution – 2
Download pgAdmin4 at: https://www.postgresql.org/ftp/pgadmin/pgadmin4/v5.2/windows/ Download Sql server at: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads When setting, uncheck install pgAdmin 4 and StackBuilder.
Solution – 3
What you can try is to open your task manager, look for PostgreSQL background processes and End task
them.
Solution – 4
I took Takamura advice, End task the PostgreSQL in the task manager. It works, but I performed an additional step. That is to open pgAdmin 4 as administrator.
Пишет ошибка системы (class oserror), 10013, сделана ошибка доступа к совету методом, запрещённым правами доступа
Добавлено через 20 секунд
Запускаю с админ-правами
Видимо где-то какое-то разрешение не поставлено
Добавлено через 39 минут
Итак решение проблемы было следующим, для тех, кто столкнется:
Заходим в Users/ваш юзер/appdata/roaming/pgadmin, открываем файл логов pgadmin4.txt, смотрим ошибку
У меня была 10013
Причина ошибки либо недостаток прав, либо занятость порта другими процессами
Почистил и поотключал антивирусы, не помогло
Командой netstat -ano узнал id процесса на порту 5432 (порт postgresql), узнал его id (столбец PID)
Дальше ctrl+shift+esc открываем диспетчер задач, вкладка подробности и смотрим, каким процессом занят порт с нужным id (у меня id был 12856), кликаем на процесс и жмём снять задачу
Запускаем заново pgadmin4, у меня все заработало