node.js - Wolkenkit 无法启动,错误代码为 "Error: Failed to get lowest processed position."

标签 node.js wolkenkit

我目前正在按照 tutorial to create a chat application 来研究 Wolkenkit .

写完代码后,我运行了sudo yarn wolkenkit start。这给了我以下错误消息:

Waiting for https://localhost:3000/ to reply...
(node:11226) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
Error: Failed to get lowest processed position.
  at EventSequencer.getLowestProcessedPosition (/wolkenkit/eventSequencer/EventSequencer.js:71:13)
  at /wolkenkit/app.js:63:41
  at process._tickCallback (internal/process/next_tick.js:68:7)

Application code caused runtime error.
✗ Failed to start the application.

比命令警告的错误稍高一点:

▻ Application certificate is self-signed.

如果您能帮助我解决此问题并让演示应用程序在我的本地计算机上运行,​​我将不胜感激。

我的开发机器正在运行 Debian GNU/Linux 10

  • Node 13.8.0
  • yarn 1.21.1
  • Docker 18.09.1
  • Wolkenkit 3.1.2

由于出现警告,我怀疑这可能与用于 TLS 的 X.509 证书有关。我使用 openssl 创建它,如下所示:

$ openssl req -new -sha256 -nodes -out localhost.csr -newkey rsa:2048 -keyout localhost.key -config <(
cat <<-EOF
[req]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn

[ dn ]
C=US
ST=New York
L=Rochester
O=Somthing
OU=Something Else
emailAddress=test@example.com
CN = localhost

[ req_ext ]
subjectAltName = @alt_names

[ alt_names ]
DNS.1 = localhost
EOF
)


$ openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -sha256 -out localhost.crt

然后我将 localhost.crt 和 localhost.key 移动到以下结构中:

server/keys/localhost
├── certificate.pem
└── privateKey.pem

并设置一个package.json,如下所示:

{
    "name": "chat",
    "version": "0.0.0",
    "wolkenkit": {
        "application": "chat",
        "runtime": {
            "version": "3.1.0"
        },
        "environments": {
            "default": {
                "api": {
                    "address": {
                        "host": "localhost",
                        "port": 3000
                    },
                    "certificate": "/server/keys/localhost",
                    "allowAccessFrom": "*"
                },
                "fileStorage": {
                    "allowAccessFrom": "*"
                },
                "node": {
                    "environment": "development"
                }
            }
        }
    },
    "dependencies": {
        "wolkenkit": "^3.1.2"
    }
}

最佳答案

看起来这可能与描述的问题相同here in this Github issue

The problem is that due to a change in the start command, we now assume that there must be a read model (which has not yet been defined, if you follow the guide).

If you simply ignore this error, and follow on, the next thing is to define the read model. Once you have done that, you can successfully run wolkenkit start.

关于node.js - Wolkenkit 无法启动,错误代码为 "Error: Failed to get lowest processed position.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60374367/

相关文章:

javascript - 是否可以在 postgreSQL 中将表 A ID 索引到表 B userId?

auth0 - 即使用户已登录,wolkenkit 也会重定向到 Auth0

mongodb - wolvenkit:数据库访问和备份

node.js - Wolkenkit 事件采购有调度程序吗?

即使在销毁套接字后,Node.js 内存使用率仍然很高

javascript - 从对象数组 mongoose 中的对象中删除属性

javascript - Nodejs编译流程

javascript - 如何计算带有对象的数组中的特定键?