" An error occurred initiating application server. Failed to launch application server" for PgAdmin 4 on WIndows 7

Viewed 1566

I have tried all possible solutions suggested on Stackoverflow for the above Error message received while trying to launch PgAdmin4 on Windows 7.

For e.g. Running as Administrator, changing default browser to chrome/firefox/internet explorer, clearing all temp and dump files, ensured no other version of PgAdmin pre-installed, no PYTHONPATH environment variable in system environment variables, restarted postgresql service in services.msc etc

I have successfully installed PgAdmin several times on different PCs and never faced any issue. I am attaching the dump of PgAdmin4 also

PgAdmin4 Startup Log

2020-09-07 14:17:49: Checking for system tray...
2020-09-07 14:17:49: Starting pgAdmin4 server...
2020-09-07 14:17:49: Creating server object, port:49286, key:cb8137d0-2493-4750-9cfe-bb4222f103b9, 
logfile:E:/Users/RCCU/AppData/Local/pgadmin/pgadmin4/.pgAdmin4.2493675106.log
2020-09-07 14:17:49: Python Path: E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site- 
packages;E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/DLLs;E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib
2020-09-07 14:17:49: Python Home: E:/Program Files/PostgreSQL/10/pgAdmin 4/venv
2020-09-07 14:17:49: Initializing Python...
2020-09-07 14:17:49: Python initialized.
2020-09-07 14:17:49: Adding new additional path elements
2020-09-07 14:17:49: Redirecting stderr...
2020-09-07 14:17:49: stderr redirected successfully.
2020-09-07 14:17:49: Initializing server...
2020-09-07 14:17:49: Webapp Path: E:/Program Files/PostgreSQL/10/pgAdmin 4/web/pgAdmin4.py
2020-09-07 14:17:49: Server initialized.
2020-09-07 14:17:49: Starting Server Thread...
2020-09-07 14:17:49: Open the application code and run it.
2020-09-07 14:17:49: Set the port number, key and force SERVER_MODE off
2020-09-07 14:17:49: PyRun_SimpleFile launching application server...
2020-09-07 14:17:49: Failed to launch the application server, server thread exiting.
2020-09-07 14:17:51: An error occurred initialising the application server:

Failed to launch the application server, server thread exiting.

**PgAdmin 4 Log**
Traceback (most recent call last):
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/web/pgAdmin4.py", line 34, in <module>
import config
File "E:\Program Files\PostgreSQL\10\pgAdmin 4\web\config.py", line 25, in <module>
from pgadmin.utils import env, IS_WIN, fs_short_path
File "E:\Program Files\PostgreSQL\10\pgAdmin 4\web\pgadmin\__init__.py", line 19, in <module>
from flask import Flask, abort, request, current_app, session, url_for
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site-packages\flask\__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site-packages\werkzeug\__init__.py", line 15, in <module>
from .serving import run_simple
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib/site-packages\werkzeug\serving.py", line 41, in <module>
import socket
File "E:/Program Files/PostgreSQL/10/pgAdmin 4/venv/Lib\socket.py", line 49, in <module>
import _socket
ImportError: DLL load failed while importing _socket: The parameter is incorrect.
1 Answers

The problem is solved now. I installed windows 10 and everything started working seamlessly. I don't know what was causing the problem though.

Related