简体   繁体   English

连接到Node中的数据库时出错

[英]Error connecting to database in Node

I was working on a project using Node with a PostgresDB. 我当时正在使用将Node与PostgresDB一起使用的项目。 Everything was fine, but then it starts throwing an "Error: connect ECONNREFUSED". 一切都很好,但是随后它开始抛出“错误:连接ECONNREFUSED”。 I didn't change anything regarding my DB connection, so I decided to restart the machine, and the error was gone. 我没有更改有关数据库连接的任何内容,因此我决定重新启动计算机,该错误消失了。 Does anyone knows what can cause this error? 谁知道会导致此错误的原因吗?

the db process wasn't running. 数据库进程未运行。 When you restart the machine the db was restarted as well. 重新启动计算机时,数据库也将重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM