gpt4 book ai didi

postgresql - Wiki.js 未运行。数据库连接错误

转载 作者:行者123 更新时间:2023-12-04 12:16:03 42 4
gpt4 key购买 nike

Windows Enterprise 2016 LTSB 版本 1607。安装了 Wiki.js 和 PostgreSQL。之前安装了 Node.js (v12.16.2)。
step 8使用 Powershell 的 wiki.js 安装过程:

node server
我收到此错误:
PS C:\wiki> node server
Loading configuration from C:\wiki\config.yml... OK
2021-01-03T23:06:14.299Z [MASTER] info: =======================================
2021-01-03T23:06:14.300Z [MASTER] info: = Wiki.js 2.5.170 =====================
2021-01-03T23:06:14.301Z [MASTER] info: =======================================
2021-01-03T23:06:14.301Z [MASTER] info: Initializing...
2021-01-03T23:06:14.688Z [MASTER] info: Using database driver pg for postgres [ OK ]
2021-01-03T23:06:14.690Z [MASTER] info: Connecting to database...
2021-01-03T23:06:15.698Z [MASTER] error: Database Connection Error: ECONNREFUSED 127.0.0.1:5432
2021-01-03T23:06:15.698Z [MASTER] warn: Will retry in 3 seconds... [Attempt 1 of 10]
2021-01-03T23:06:18.700Z [MASTER] info: Connecting to database...
2021-01-03T23:06:19.703Z [MASTER] error: Database Connection Error: ECONNREFUSED 127.0.0.1:5432
2021-01-03T23:06:19.703Z [MASTER] warn: Will retry in 3 seconds... [Attempt 2 of 10]
... (you get the point)
2021-01-03T23:06:51.728Z [MASTER] error: Database Connection Error: ECONNREFUSED 127.0.0.1:5432
2021-01-03T23:06:51.729Z [MASTER] warn: Will retry in 3 seconds... [Attempt 10 of 10]
2021-01-03T23:06:54.730Z [MASTER] info: Connecting to database...
2021-01-03T23:06:55.733Z [MASTER] error: Database Initialization Error: connect ECONNREFUSED 127.0.0.1:5432
我意识到我忘记创建一个 PostgreSQL,所以我使用 pgAdmin4.28 创建了一个“wiki”数据库。错误现在更改为:
PS C:\wiki> node server
Loading configuration from C:\wiki\config.yml... OK
2021-01-04T00:27:21.979Z [MASTER] info: =======================================
2021-01-04T00:27:21.980Z [MASTER] info: = Wiki.js 2.5.170 =====================
2021-01-04T00:27:21.981Z [MASTER] info: =======================================
2021-01-04T00:27:21.982Z [MASTER] info: Initializing...
2021-01-04T00:27:22.363Z [MASTER] info: Using database driver pg for postgres [ OK ]
2021-01-04T00:27:22.365Z [MASTER] info: Connecting to database...
2021-01-04T00:27:22.428Z [MASTER] error: Database Connection Error: 28P01 undefined:undefined
2021-01-04T00:27:22.429Z [MASTER] warn: Will retry in 3 seconds... [Attempt 1 of 10]
2021-01-04T00:27:25.431Z [MASTER] info: Connecting to database...
2021-01-04T00:27:25.501Z [MASTER] error: Database Connection Error: 28P01 undefined:undefined
2021-01-04T00:27:25.501Z [MASTER] warn: Will retry in 3 seconds... [Attempt 2 of 10]
2021-01-04T00:27:28.503Z [MASTER] info: Connecting to database...
2021-01-04T00:27:28.545Z [MASTER] error: Database Connection Error: 28P01 undefined:undefined
2021-01-04T00:27:28.546Z [MASTER] warn: Will retry in 3 seconds... [Attempt 3 of 10]
请发送帮助!我感谢所有评论。谢谢!

最佳答案

我对 postgres 和 wiki.js 有类似的问题。
解决方案是在 postgres 中手动创建数据库,然后再运行 node server :

CREATE DATABASE wiki
希望这可以为您节省我不得不花费的时间来解决这个问题。

关于postgresql - Wiki.js 未运行。数据库连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65558453/

42 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com