以下是Ubuntu下pgAdmin故障排查指南:
sudo systemctl status postgresql
检查服务是否运行,未运行则用sudo systemctl start postgresql
启动。sudo ufw status
查看防火墙状态,确保允许PostgreSQL默认端口5432的传入连接,可执行sudo ufw allow 5432/tcp
放行。/var/log/pgadmin/pgadmin4.log
,用cat
或tail -f
查看;PostgreSQL日志在/var/log/postgresql/
目录下,检查是否有错误信息。/etc/pgadmin4/pgadmin4.conf
,确认listen_addresses
包含服务器IP或0.0.0.0
,SSL配置正确。ping
、traceroute
等命令检查网络,确保服务器与客户端能正常通信。sudo apt update
和sudo apt upgrade pgadmin4
更新;若无效,可卸载后从官网下载最新版重装。