pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.57k stars 661 forks source link

Fatal error: The pgAdmin 4 server could not be contacted: (RM #6499) #4358

Closed dpage closed 2 years ago

dpage commented 3 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/6499 Originally created by Markus Meyer at 2021-05-28 08:43:58 UTC.

I cant start pgAdmin4 because there is always this error. I already added some paths to as system variables and I cleared the Roaming folder as it is recommended in some stackoverflow threads.

Full error message:

pgAdmin Runtime Environment

Python Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe" Runtime Config File: "C:\Users\meyer\AppData\Roaming\pgadmin\runtime_config.json" pgAdmin Config File: "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\config.py" Webapp Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py" pgAdmin Command: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe -s C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py" Environment:

Traceback (most recent call last): File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 2336, in _wrap_pool_connect return fn() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 304, in unique_connection return _ConnectionFairy._checkout(self) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 778, in _checkout fairy = _ConnectionRecord.checkout(pool) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 495, in checkout rec = pool._do_get() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\impl.py", line 241, in _do_get return self._create_connection() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 309, in _create_connection return _ConnectionRecord(self) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 440, in init self.connect(first_connect_check=True) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 661, in connect pool.logger.debug("Error on connect(): %s", e) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit compat.raise( File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise raise exception File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 656, in __connect connection = pool._invoke_creator(self) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect return dialect.connect(*cargs, *cparams) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\default.py", line 508, in connect return self.dbapi.connect(cargs, **cparams) sqlite3.OperationalError: unable to open database file

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgAdmin4.py", line 91, in exec(open(file_quote(setup_py), 'r').read()) File "", line 506, in File "", line 378, in setup_db File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin__init.py", line 351, in create_app db_upgrade(app) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\setup\db_upgrade.py", line 25, in db_upgrade flask_migrate.upgrade(migration_folder) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\flask_migrate__init__.py", line 96, in wrapped f(*args, kwargs) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\flask_migrate__init__.py", line 271, in upgrade command.upgrade(config, revision, sql=sql, tag=tag) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\alembic\command.py", line 294, in upgrade script.run_env() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\alembic\script\base.py", line 490, in run_env util.load_python_file(self.dir, "env.py") File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\alembic\util\pyfiles.py", line 97, in load_python_file module = load_module_py(module_id, path) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\alembic\util\compat.py", line 182, in load_module_py spec.loader.exec_module(module) File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\setup....\migrations\env.py", line 93, in run_migrations_online() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\setup....\migrations\env.py", line 78, in run_migrations_online connection = engine.connect() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 2263, in connect return self._connection_cls(self, kwargs) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 104, in init else engine.raw_connection() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 2369, in raw_connection return self._wrap_pool_connect( File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 2339, in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 1583, in _handle_dbapi_exceptionnoconnection util.raise( File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise_ raise exception File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\base.py", line 2336, in _wrap_pool_connect return fn() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 304, in unique_connection return _ConnectionFairy._checkout(self) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 778, in _checkout fairy = _ConnectionRecord.checkout(pool) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 495, in checkout rec = pool._do_get() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\impl.py", line 241, in _do_get return self._create_connection() File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 309, in _create_connection return _ConnectionRecord(self) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 440, in init self.connect(first_connect_check=True) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 661, in connect pool.logger.debug("Error on connect(): %s", e) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit compat.raise( File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\util\compat.py", line 182, in raise raise exception File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\pool\base.py", line 656, in connect connection = pool._invoke_creator(self) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect return dialect.connect(*cargs, *cparams) File "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\lib\site-packages\sqlalchemy\engine\default.py", line 508, in connect return self.dbapi.connect(cargs, **cparams) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/13/e3q8)

dpage commented 3 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/6499#note-1 Originally created by Akshay Joshi at 2021-05-29 06:50:59 UTC.

Hi Markus

Which version of PostgreSQL 13 have you installed. We have fixed an issue in pgAdmin 4 which is shipped with PostgreSQL 13.3. Please install PostgreSQL 13.3 and before launching pgAdmin 4 remove the "pgadmin4.db" file which you can find at %APPDATA%\Roaming\pgadmin folder.

Redmine ticket header update:

Name Old Value New Value
Assigned To changed Markus Meyer
Due Date changed 2021-05-28
dpage commented 3 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/6499#note-2 Originally created by Rahul Shirsat at 2021-06-04 11:43:04 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (duplicated) changed RM #6488
dpage commented 3 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/6499#note-3 Originally created by Akshay Joshi at 2021-06-11 11:34:24 UTC.

No response from the author, hence rejecting it.

Redmine ticket header update:

Name Old Value New Value
Status changed New Rejected
dpage commented 2 years ago

Issue closed on Redmine.