【问题标题】:The pgAdmin 4 server could not be contacted after installing postgresql安装 postgresql 后无法联系 pgAdmin 4 服务器
【发布时间】:2021-05-16 13:41:28
【问题描述】:

安装 postgres 13 后,pgadmin4 无法启动,出现此错误:

无法联系到 pgAdmin 4 服务器:

已经试过了:

  • 以管理员身份运行
  • 将 file://C:\Program Files\PostgreSQL\13\bin 添加到路径变量
  • 清理 Appdata\roaming\pgadmin
  • 重新启动计算机

错误仍然存​​在;这是一些细节:

 pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "C:\Program Files\PostgreSQL\13\pgAdmin 4\python\python.exe"
Runtime Config File: "C:\Users\DZ001160\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: 
  - 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 Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\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\13\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\13\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\13\pgAdmin 4\web\pgAdmin4.py", line 98, in <module>
    app = create_app()
  File "C:\Program Files\PostgreSQL\13\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\13\pgAdmin 4\web\pgadmin\setup\db_version.py", line 19, in get_version
    return version.value
AttributeError: 'NoneType' object has no attribute 'value'

【问题讨论】:

  • 我面临同样的问题,尝试了上面提到的所有方法。仍然是同样的错误。

标签: windows pgadmin-4


【解决方案1】:

解决方案对我有用:

【讨论】:

  • 确实如此。在 postgres 安装中取消选中 Pgadmin 并单独安装它可以解决问题。非常感谢。
  • 我也做了所有这些,并认为 Windows 重新启动最终解决了它,但这只是问题的一部分,而不是答案。也许这很重要,尤其是在更改 PATH 时?
【解决方案2】:

我也有同样的失败。我似乎无法让 pgAdmin 4 工作。我在另一台笔记本电脑上安装了 PostgreSQL,pdAdmin 4 出现了,但随后出现了不同的故障。

【讨论】:

    猜你喜欢
    • 2021-10-22
    • 2022-10-06
    • 2023-01-30
    • 2021-09-17
    • 1970-01-01
    • 2021-08-06
    • 2015-12-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多