安装 postgresql 后无法联系 pgAdmin 4 服务器
The pgAdmin 4 server could not be contacted after installing postgresql
安装 postgres 13 后,pgadmin4 无法启动并出现此错误:
无法联系 pgAdmin 4 服务器:
已经尝试过:
- 运行 作为管理员
- 添加 file://C:\Program Files\PostgreSQL\bin 到路径变量
- 清洁Appdata\roaming\pgadmin
- 正在重启计算机
错误依旧;这是一些细节:
pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "C:\Program Files\PostgreSQL\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\DZ001160\AppData\Roaming\pgadmin\runtime_config.json"
pgAdmin Config File: "C:\Program Files\PostgreSQL\pgAdmin 4\web\config.py"
Webapp Path: "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgAdmin4.py"
pgAdmin Command: "C:\Program Files\PostgreSQL\pgAdmin 4\python\python.exe -s C:\Program Files\PostgreSQL\pgAdmin 4\web\pgAdmin4.py"
Environment:
- ALLUSERSPROFILE: C:\ProgramData
- APPDATA: C:\Users\DZ001160\AppData\Roaming
- ChocolateyInstall: C:\ProgramData\chocolatey
- CHROME_CRASHPAD_PIPE_NAME: \.\pipe\crashpad_4904_QRCYSGHVOIEQKPFC
- CHROME_RESTART: NW.js|NW.js est bloqué. Voulez-vous le relancer maintenant ?|LEFT_TO_RIGHT
- CommonProgramFiles: C:\Program Files\Common Files
- CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
- CommonProgramW6432: C:\Program Files\Common Files
- COMPUTERNAME: W10-PC0L10T3
- ComSpec: C:\WINDOWS\system32\cmd.exe
- DominoAddress: fr-algapppwv001.fr.ema.ad.pwcinternal.com
- DominoName: DZ-ALGAPP000/DZ/Server/PwC
- DriverData: C:\Windows\System32\Drivers\DriverData
- HOMEDRIVE: C:
- HOMEPATH: \Users\DZ001160
- LOCALAPPDATA: C:\Users\DZ001160\AppData\Local
- LOGONSERVER: \FR-PARDIR002
- NUMBER_OF_PROCESSORS: 4
- NVM_HOME: C:\Users\DZ001160-ladm\AppData\Roaming\nvm
- NVM_SYMLINK: C:\Program Files\nodejs
- OneDrive: C:\Users\DZ001160\OneDrive
- OPENSSL_CONF: C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf
- OS: Windows_NT
- Path: C:\Program Files (x86)\Zulu\zulu-8-jre\bin\;C:\Program Files\Zulu\zulu-8-jre\bin\;C:\Python39\Scripts\;C:\Python39\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\IBM\Notes\;C:\Program Files (x86)\ConfigMgr 2012 Toolkit R2\ClientTools;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server0\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC0\Tools\Binn\;C:\Users\DZ001160-ladm\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Users\DZ001160\AppData\Local\Microsoft\WindowsApps;C:\Users\DZ001160\AppData\Local\Programs\Git\cmd;C:\Users\DZ001160\AppData\Local\Gource\cmd;C:\Users\DZ001160\AppData\Roaming\npm
- PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
- PGADMIN_INT_KEY: 446e590b-3ac8-45a1-9d95-611e127071b0
- PGADMIN_INT_PORT: 53846
- PGADMIN_SERVER_MODE: OFF
- POSTGRES: C:\Program Files\PostgreSQL\bin
- PROCESSOR_ARCHITECTURE: AMD64
- PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
- PROCESSOR_LEVEL: 6
- PROCESSOR_REVISION: 4e03
- ProgramData: C:\ProgramData
- ProgramFiles: C:\Program Files
- ProgramFiles(x86): C:\Program Files (x86)
- ProgramW6432: C:\Program Files
- PROJ_LIB: C:\Program Files\PostgreSQL\share\contrib\postgis-3.1\proj
- PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Thycotic\Powershell\
- PUBLIC: C:\Users\Public
- SESSIONNAME: Console
- SystemDrive: C:
- SystemRoot: C:\WINDOWS
- TEMP: C:\Users\DZ001160\AppData\Local\Temp
- TMP: C:\Users\DZ001160\AppData\Local\Temp
- UATDATA: C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
- USERDNSDOMAIN: FR.EMA.AD.PWCINTERNAL.COM
- USERDOMAIN: FR
- USERDOMAIN_ROAMINGPROFILE: FR
- USERNAME: DZ001160
- USERPROFILE: C:\Users\DZ001160
- windir: C:\WINDOWS
--------------------------------------------------------
Traceback (most recent call last):
File "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgAdmin4.py", line 98, in <module>
app = create_app()
File "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgadmin\__init__.py", line 347, in create_app
if not os.path.exists(SQLITE_PATH) or get_version() == -1:
File "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgadmin\setup\db_version.py", line 19, in get_version
return version.value
AttributeError: 'NoneType' object has no attribute 'value'
我也有同样的失败。我似乎无法让 pgAdmin 4 工作。我在另一台笔记本电脑上安装了 PostgreSQL,出现了 pdAdmin 4,但随后出现了不同的故障。
适合我的解决方案:
- 正在删除 C:\Users\{用户名}\AppData\Roaming\pgadmin
- 将C:\Program Files\PostgreSQL\bin加入PATH系统环境变量
- 在以下位置下载 pgAdmin4:https://www.postgresql.org/ftp/pgadmin/pgadmin4/v5.2/windows/
- 下载 Sql 服务器:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads。
设置时,取消选中同时安装 pgAdmin 4 和 StackBuilder。
安装 postgres 13 后,pgadmin4 无法启动并出现此错误:
无法联系 pgAdmin 4 服务器:
已经尝试过:
- 运行 作为管理员
- 添加 file://C:\Program Files\PostgreSQL\bin 到路径变量
- 清洁Appdata\roaming\pgadmin
- 正在重启计算机
错误依旧;这是一些细节:
pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "C:\Program Files\PostgreSQL\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\DZ001160\AppData\Roaming\pgadmin\runtime_config.json"
pgAdmin Config File: "C:\Program Files\PostgreSQL\pgAdmin 4\web\config.py"
Webapp Path: "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgAdmin4.py"
pgAdmin Command: "C:\Program Files\PostgreSQL\pgAdmin 4\python\python.exe -s C:\Program Files\PostgreSQL\pgAdmin 4\web\pgAdmin4.py"
Environment:
- ALLUSERSPROFILE: C:\ProgramData
- APPDATA: C:\Users\DZ001160\AppData\Roaming
- ChocolateyInstall: C:\ProgramData\chocolatey
- CHROME_CRASHPAD_PIPE_NAME: \.\pipe\crashpad_4904_QRCYSGHVOIEQKPFC
- CHROME_RESTART: NW.js|NW.js est bloqué. Voulez-vous le relancer maintenant ?|LEFT_TO_RIGHT
- CommonProgramFiles: C:\Program Files\Common Files
- CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
- CommonProgramW6432: C:\Program Files\Common Files
- COMPUTERNAME: W10-PC0L10T3
- ComSpec: C:\WINDOWS\system32\cmd.exe
- DominoAddress: fr-algapppwv001.fr.ema.ad.pwcinternal.com
- DominoName: DZ-ALGAPP000/DZ/Server/PwC
- DriverData: C:\Windows\System32\Drivers\DriverData
- HOMEDRIVE: C:
- HOMEPATH: \Users\DZ001160
- LOCALAPPDATA: C:\Users\DZ001160\AppData\Local
- LOGONSERVER: \FR-PARDIR002
- NUMBER_OF_PROCESSORS: 4
- NVM_HOME: C:\Users\DZ001160-ladm\AppData\Roaming\nvm
- NVM_SYMLINK: C:\Program Files\nodejs
- OneDrive: C:\Users\DZ001160\OneDrive
- OPENSSL_CONF: C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf
- OS: Windows_NT
- Path: C:\Program Files (x86)\Zulu\zulu-8-jre\bin\;C:\Program Files\Zulu\zulu-8-jre\bin\;C:\Python39\Scripts\;C:\Python39\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\IBM\Notes\;C:\Program Files (x86)\ConfigMgr 2012 Toolkit R2\ClientTools;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server0\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC0\Tools\Binn\;C:\Users\DZ001160-ladm\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Users\DZ001160\AppData\Local\Microsoft\WindowsApps;C:\Users\DZ001160\AppData\Local\Programs\Git\cmd;C:\Users\DZ001160\AppData\Local\Gource\cmd;C:\Users\DZ001160\AppData\Roaming\npm
- PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
- PGADMIN_INT_KEY: 446e590b-3ac8-45a1-9d95-611e127071b0
- PGADMIN_INT_PORT: 53846
- PGADMIN_SERVER_MODE: OFF
- POSTGRES: C:\Program Files\PostgreSQL\bin
- PROCESSOR_ARCHITECTURE: AMD64
- PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
- PROCESSOR_LEVEL: 6
- PROCESSOR_REVISION: 4e03
- ProgramData: C:\ProgramData
- ProgramFiles: C:\Program Files
- ProgramFiles(x86): C:\Program Files (x86)
- ProgramW6432: C:\Program Files
- PROJ_LIB: C:\Program Files\PostgreSQL\share\contrib\postgis-3.1\proj
- PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Thycotic\Powershell\
- PUBLIC: C:\Users\Public
- SESSIONNAME: Console
- SystemDrive: C:
- SystemRoot: C:\WINDOWS
- TEMP: C:\Users\DZ001160\AppData\Local\Temp
- TMP: C:\Users\DZ001160\AppData\Local\Temp
- UATDATA: C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
- USERDNSDOMAIN: FR.EMA.AD.PWCINTERNAL.COM
- USERDOMAIN: FR
- USERDOMAIN_ROAMINGPROFILE: FR
- USERNAME: DZ001160
- USERPROFILE: C:\Users\DZ001160
- windir: C:\WINDOWS
--------------------------------------------------------
Traceback (most recent call last):
File "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgAdmin4.py", line 98, in <module>
app = create_app()
File "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgadmin\__init__.py", line 347, in create_app
if not os.path.exists(SQLITE_PATH) or get_version() == -1:
File "C:\Program Files\PostgreSQL\pgAdmin 4\web\pgadmin\setup\db_version.py", line 19, in get_version
return version.value
AttributeError: 'NoneType' object has no attribute 'value'
我也有同样的失败。我似乎无法让 pgAdmin 4 工作。我在另一台笔记本电脑上安装了 PostgreSQL,出现了 pdAdmin 4,但随后出现了不同的故障。
适合我的解决方案:
- 正在删除 C:\Users\{用户名}\AppData\Roaming\pgadmin
- 将C:\Program Files\PostgreSQL\bin加入PATH系统环境变量
- 在以下位置下载 pgAdmin4:https://www.postgresql.org/ftp/pgadmin/pgadmin4/v5.2/windows/
- 下载 Sql 服务器:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads。 设置时,取消选中同时安装 pgAdmin 4 和 StackBuilder。