postgresql on centos (sequelize+pg+nodejs):Failed to find PostgresSQL server.Pleast double check your settings
公司的一个项目,使用的nodejs做服务端,数据库是postgresql,在本地时一切ok,放在centos时,postgresql配置ok,可以远程访问,但是nodejs在centos启动时,就会报错,找不到postgresql服务,Error Msg如下:
09/14 10:00:27 - info: Error: Failed to find PostgresSQL server. Please double check your settings.
at connectCallback (/home/sm_dir/CenterAPI/node_modules/sequelize/lib/dialects/postgres/connector-manager.js:112:35)
at /home/sm_dir/CenterAPI/node_modules/pg/lib/pool.js:54:25
at /home/sm_dir/CenterAPI/node_modules/pg/node_modules/generic-pool/lib/generic-pool.js:271:11
at /home/sm_dir/CenterAPI/node_modules/pg/lib/pool.js:27:26
at null.<anonymous> (/home/sm_dir/CenterAPI/node_modules/pg/lib/client.js:172:5)
at emit (events.js:95:17)
at Socket.<anonymous> (/home/sm_dir/CenterAPI/node_modules/pg/lib/connection.js:56:10)
at Socket.emit (events.js:95:17)
at net.js:834:16
at process._tickDomainCallback (node.js:502:13)
远程访问都可以,结果本地却不行,一直没有头绪。几经周折,在一个stack overflow的帖子中找到了灵感,帖子的链接如下:http://stackoverflow.com/questions/21740560/node-server-cant-connect-to-postgres-db
node-modules=>pg对password,不支持一些特殊字符,其中就有#,而我的数据库密码是:local#123. 于是,移除#,改为local123,之后=》“Init => db success...”,终于成功连接上了。
总结:事后分析,远程连接ok,是postgresql配置的问题,远程和本地连接走的验证方式不一样.
postgresql on centos (sequelize+pg+nodejs):Failed to find PostgresSQL server.Pleast double check your settings的更多相关文章
- CentOS编译安装NodeJS+Express
NodeJS是基于Chrome’s Javascript runtime,也就是Google V8引擎执行Javascript的快速构建网络服务及应用的平台,其优点有: 在CentOS编译安装Node ...
- CentOS 编译安装 Nodejs (实测 笔记 Centos 7.3 + node 6.9.5)
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.准备 1.1 显示系统版 ...
- centos下安装nodejs及websocket
软件环境: VMware Workstation CentOS 6.5 NodeJS v0.12.5 安装过程: Step 1.确认服务器有nodejs编译及依赖相关软件,如果没有可通过运行以下命令安 ...
- phpmailer的SMTP ERROR: Failed to connect to server: 10
请问,我在win7上学习使用phpmailer时,出现这种错误怎么处理啊? SMTP ERROR: Failed to connect to server: (0) SMTP connect() fa ...
- (onlyoffice)在CentOS及其衍生产品上安装Linux的Document Server
介绍 Document Server是一个在线办公套件,包括用于文本,电子表格和演示文稿的查看器和编辑器,与Office Open XML格式完全兼容:.docx,.xlsx,.pptx,并支持实时协 ...
- GConf error:Failed to contact configuration server
Linux系统运行一直正常,但是图形界面使用root账号登录时遇到下面错误,第一次遇到这么怪异的状况 具体错误信息如下所示: GConf error:Failed to contact configu ...
- SSH登录之后运行命令报错的解决办法-- Failed to connect to Mir: Failed to connect to server socket: No such file or directory
问题描述: Failed to connect to Mir: Failed to connect to server socket: No such file or directory 解决方案: ...
- LoadRunner执行过程报错“Failed to connect to server "xxx.xxx.xxx.xxx:xx":[10060] connetion time out”
执行性能测试过程中,LR报错: Action.c(6):Error -27796: Failed to connect to server "xxx.xxx.xxx.xxx:xx" ...
- 【LR11】Error -27796: Failed to connect to server"server:port": [10060] Connection timed out错误解决办法
场景描述:被测系统是发布在远程服务器上的,假设IP是10.10.10.10,端口是8066,那么访问地址是http://10.10.10.10:8066/,在control机器上我设置了IP欺骗. ...
随机推荐
- How to enable Hibernate option in windows 2008 R2 server?
http://velshare.blogspot.com/2013/02/how-to-enable-hibernate-option-in.html 1) To enable the Hiberna ...
- CentOS6 安装golang
CentOS6 安装golang 下载 wget http://golangtc.com/static/go/1.8/go1.8.linux-amd64.tar.gz 1 1 1 解压 tar -xz ...
- springBoot框架的一些概念
Spring的发展史1. Spring1.x 时代 在Spring1.x时代,都是通过xml文件配置bean,随着项目的不断扩大,需要将xml配置分放到不同的配置文件中,需要频繁的在java类和xml ...
- UVA-10603-Fill(BFS+优先队列)
There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not grea ...
- IP windows相关
nbtstat: 假设 我们 通过net view 获取了 局域网内一些计算机名 如上标红的计算机名称 如何 才能获取计算机的ip呢? 接下来使用 nbtstat -a 列出远程机器的名称表: ...
- Centos6.5搭建RHCS集群-实现GFS+iSCSI网络共享存储
RHCS集群配置 需要用到的各组件功能:RHCS(Red Hat Cluster Suite):能够提供高可用性.高可靠性.负载均衡.存储共享且经济廉价的集群工具集合.LUCI:是一个基于web的集群 ...
- 项目笔记:导出Excel功能
1.前台这块: var ids=""; $.post("${basePath}/assets/unRegDeviceAction_getDeviceIds.do" ...
- Java笔记1:IntelliJ IDEA详细安装步骤
安装IntelliJ IDEA 一.安装JDK 1 下载最新的jdk,这里下的是jdk-8u66 2 将jdk安装到默认的路径C:\Program Files\Java目录下 二.安装IntelliJ ...
- k8s debug记录之kubelet user.slice container monitor failure
在kubernetes中,如果使用其自带的单机启动脚本./hack/local-up-cluster.sh来启动一个本地集群的话,会在kubelet的日志中观察到类似以下内容的日志: Failed t ...
- phpunit与xdebug的使用
基本说明: 1.xdebug是程序猿在调试程序过程中使用的bug调试暴露工具 windows下安装: 1)下载php对应的dll文件,下载地址:https://xdebug.org/download. ...