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欺骗. ...
随机推荐
- [Git] Git 的origin和master分析
转载: http://lishicongli.blog.163.com/blog/static/1468259020132125247302/ 首先要明确一点,对git的操作是围绕3个大的步骤来展开的 ...
- [Android Memory] Android内存管理、监测剖析
转载自:http://blog.csdn.net/anlegor/article/details/23398785 Android内存管理机制: Android内存管理主要有:LowMemory Ki ...
- HTTP—缓存
1. ETag HTTP 1.1中引入了ETag来解决缓存的问题.ETag全称是Entity Tag,由服务端生成,服务端可以决定它的生成规则.如果根据文件内容生成散列值.那么条件请求将不会受到时间戳 ...
- Redis 命令一
Redis 命令用于在 redis 服务上执行操作. 要在 redis 服务上执行命令需要一个 redis 客户端.Redis 客户端在我们之前下载的的 redis 的安装包中. 1.Redis 客户 ...
- Druid对比Vertica
怎么比较Druid和Vertica? Vertica 类似与之前介绍的ParAccel/Redshift(Druid-vs-Redshift). 不是实时注入数据: 提供SQL的全部语法支持 另外一个 ...
- java动态载入指定的类或者jar包反射调用其方法
序言 有时候.项目中会用到java动态载入指定的类或者jar包反射调用其方法来达到模块的分离,使各个功能之间耦合性大大减少,更加的模块化.代码利用率更高.模式中的代理模式就用到java的这一机制. 下 ...
- UIScreenAdaptive
using UnityEngine; namespace Com.Xyz.UI { [ExecuteInEditMode] [RequireComponent(typeof(UIRoot))] pub ...
- ES标准中的相等比较算法 SameValue SameValueZero
1.相等比较算法 The Abstract Equality Comparison Algorithm (==) The Strict Equality Comparison Algorithm (= ...
- ubuntu挂载3T新硬盘并更换home分区
ubuntu添加一块新的硬盘,并更换home分区 1.将硬盘接入机箱,开机,查看是否现有的硬盘信息 从这里可以看出,共有两块硬盘,分别是sda和sdb 2.执行fdisk -l,确保我们要添加的就是s ...
- UVA 6475 Effective Infection Time
You are estimating the threat level of quarantined zones that have been abandoned to the infection. ...