psql: could not connect to server: No such file or directory
psql: could not connect to server: No such file or directory
SOLUTION 已验证 - 已更新 2015年三月27日19:52 -
English
环境
- Red Hat Enterprise Linux 6 (RHEL)
- PostgreSQL database
问题
- We are unable to login the PostgreSQL database of Jon server application using the command psql. Tried to login as postgres and root user, but getting the same error. Please see the error details below and guide us fix this error ASAP.
Raw
bash-4.3$ psql
psql: could not connect to server: No such file or directoryIs the server running locally and acceptingconnections on Unix domain socket "/tmp/.s.PGSQL.5432"?
决议
- The error message indicates that
postgresql
service is not running and listening to default tcp port 5432. Use the below command and confirm tcp port used bypostgresql
service. Then use correct command to connect it. For example :
Raw
# ps -ef | grep postgrespostgres 6043 1 0 16:20 ? 00:00:00 /usr/bin/postgres -D /var/lib/pgsql/data -p 5454
postgres 6044 6043 0 16:20 ? 00:00:00 postgres: logger process
postgres 6046 6043 0 16:20 ? 00:00:00 postgres: checkpointer process
postgres 6047 6043 0 16:20 ? 00:00:00 postgres: writer process
postgres 6048 6043 0 16:20 ? 00:00:00 postgres: wal writer process
postgres 6049 6043 0 16:20 ? 00:00:00 postgres: autovacuum launcher process # bash-4.3$ psql rhq --host=localhost --port=5454 --username=rhqadmin --password
Password for user rhqadmin:
psql (9.2.0)
Type "help" for help.
rhq=>
根源
- The
postgresql
service was running on port 5454 instead of default port 5432.
诊断步骤
- Collect the following commands output and check tcp port used by
postgresql
service
Raw
# ps -ef | grep postgres
# netstat -tulnp | grep postgres
psql: could not connect to server: No such file or directory相关推荐
- The server is invalid. Error occurred reading server credential. Required file or directory ‘serverO
错误提示 改正 可以看到检测报错: The server is invalid. Error occurred reading server credential. Required file or ...
- 下载Python类库Server Error 404 - File
Server Error 404 - File or directory not found. The resource you are looking for might have been rem ...
- Navicat客户端PostgreSQL连接报错:Could not connect to server:Connection refused(0x00002740/10061)
Navicat客户端PostgreSQL连接报错:Could not connect to server:Connection refused(0x00002740/10061) 遇到这样的问题应该怎 ...
- org.apache.hadoop.ipc.Client: Retrying connect to server异常的解决
org.apache.hadoop.ipc.Client: Retrying connect to server异常的解决 参考文章: (1)org.apache.hadoop.ipc.Client: ...
- INFO ipc.Client:Retrying connect to server 9000
hadoop使用bin/start_all.sh命令之后,使用jps发现datanode无法启动 This problem comes when Datanode daemon on the syst ...
- Ubuntu中清理Network下Connect to Server的入口
转自:http://blog.csdn.net/maxilbert/article/details/51126467 connect to server入口列表文件以xml格式存放在 ~/.confi ...
- couldn't connect to server 127.0.0.1:27017 src/mongo/
couldn't connect to server 127.0.0.1:27017 src/mongo/ 一般这种情况就是:自己指定的数据库,所以不能.自动加载服务.第二次就不能连接了 每次启动前, ...
- Error: Network is unreachable. Reason: couldn‘t connect to server localhost:27017(连接mongodb数据库失败)
1.问题连接mogodb失败 MongoDB shell version v4.2.3 connecting to: mongodb://127.0.0.1:27017/?compressors=di ...
- WARN RestSubmissionClient: Unable to connect to server spark://master:
完整报错如下: $ spark-submit --class WordCountLocal --deploy-mode cluster --driver-memory 1g --executor-m ...
- Php错误邮件提示linux,linux下phpmailer发送邮件出现SMTP ERROR: Failed to connect to server: (0)错误...
在作项目的过程当中,后期客户提出了发送邮件的需求,既然客户有需求,那么没啥说的,上呗.php 通过网上的通常资料查找,PHPMailer这个插件貌似用起来不错,那就从github clone一份下来, ...
最新文章
- 由右移运算符引发的思考(计算机原理)
- 上海交大、华为海思提出X-volution,发力网络核心基础架构创新
- 卧槽?用 Python 还能玩 Git?
- verilog数字跑表设计实现与仿真
- 求n的阶乘的算法框图_单片机常用的14个C语言算法
- 最新任务型对话数据集大全
- 亚马逊推荐python_使用python查找amazon类别
- 面试算法基础及编程 第四弹 (字符串、数值类、或其他常见相关)
- DeFIL.org的资金池规模达168万枚FIL 已借出105万枚FIL
- python字符串一(字符串的书写输入输出)
- android 丢包率测试工具,android的ping的实现丢包率的获取
- (转)如何看待IT对于证券行业的价值
- CNN训练Cifar-10技巧
- c语言实现万年历程序
- 背景颜色、字体等的不透明区别 (opacity、transparent以及rgba的区别)
- 拍乐云创始人CEO赵加雨:深耕18载,打造全景式音视频服务
- linux 设置用户有效天数,Linux用户管理:设置用户口令的使用期限
- 虚拟机ubuntu系统鼠标移动消失
- 关于Angular 4 + ng-zorro 使用过程中遇到的问题
- Java基础之泛型反射