- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
大家好,我一直在为我的树莓派设置对 node-red 的远程访问。我已经修改了 settings.js 并安装了 node-red-admin 但是当我去启动 node-red 时我收到以下错误:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1030:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at Object.<anonymous> (/usr/lib/node_modules/node-red/red.js:141:20)
at Module._compile (internal/modules/cjs/loader.js:945:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12) {
library: 'SSL routines',
function: 'SSL_CTX_use_certificate',
reason: 'ee key too small',
code: 'ERR_SSL_EE_KEY_TOO_SMALL'
}
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=100ms expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 1.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
_tls_common.js:131
c.context.setCert(cert);
这发生在我成功创建 privatekey.pem 和 certificate.pem 之后。为了创建这些文件,我使用了:
openssl genrsa -out privatekey.pem 1024
然后用
openssl req -new -key privatekey.pem -out private-csr.pem
之后我输入了相关信息,然后收到验证“signature is ok”
openssl x509 -req -days 365 -in private-csr.pem -signkey privatekey.pem -out certificate.pem
由于上面在 ls -la 下返回了 privatekey.pem 和 certificate.pem 文件,我移动到取消注释以下内容:
// The `https` setting requires the `fs` module. Uncomment the
following
// to make it available:
var fs = require("fs");
module.exports = {
// the tcp port that the Node-RED web server is listening on
uiPort: process.env.PORT || 1880,
还有
adminAuth: {
type: "credentials",
users: [
{
username: "admin",
password: "$2a$08$9Miva2AQEFlXQ3S7emXlIuLkLzNzi9yzgqxGYMY5dzK4FzNQa7dCu",
permissions: "*"
}
]
},
加载fs模块
https: {
key: fs.readFileSync('/home/pi/.node-red/privatekey.pem'),
cert: fs.readFileSync('/home/pi/.node-red/certificate.pem')
},
完成此配置后,我收到开头所述的错误消息。更新:我确实删除了 .node-red/settings.js 的内容并替换为 https://github.com/node-red/node-red/blob/master/packages/node_modules/node-red/settings.js节点红色开始了!哇哦!但是,当再次尝试重新配置 settings.js 文件时,它会遇到同样的错误。仅供引用,我正在小心地取消注释行,但是问题可能出在我从 node-red-admin 收到的哈希密码中吗?因为当我在通过“su”以 root 身份登录后尝试使用“npm install -g node-red-admin”安装 node-red-admin 时,它会出现以下内容:
pi@padrejuan:~ $ su
Password:
root@padrejuan:/home/pi# npm install -g node-red-admin
/usr/local/bin/node-red-admin -> /usr/local/lib/node_modules/node-red-
admin/node-red-admin.js
> bcrypt@3.0.6 install /usr/local/lib/node_modules/node-red-
admin/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.6
and node@12.11.1 (node-v72 ABI, glibc) (falling back to source compile
with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir
'/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/lib'
gyp WARN EACCES user "nobody" does not have permission to access the
dev dir "/root/.cache/node-gyp/12.11.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir
"/usr/local/lib/node_modules/node-red-admin/node_modules/bcrypt/.node-
gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
等等。
任何帮助将不胜感激
最佳答案
问题是最新版本的 openssl 现在认为位长为 1024 的 key 是不安全的。
重新生成大小为2048的私钥,然后重新创建证书。
openssl genrsa -out privatekey.pem 2048
关于ssl - 尝试创建 HTTPS 后运行 node-red-start "Error 140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58263106/
如果你有一个字符串,假设:AB--AB .我想寻找带有 xpath 的节点,它可以是 AB??AB , 这意味着节点属性中的问号是某种占位符 - 它们的出现次数可能会有所不同,因此它也应该匹配到 AB
我的python版本是2.7.6 我知道 +? 是 + 的非贪婪版本。 这样 re.findall('(ab)+?', 'abab') 将匹配尽可能少的 ab。 结果 ['ab', 'ab'] 因此有
typedef struct unit { struct unit * next; int year; int month; int day; struct unit revisions[3]; ch
特别是 Sql Server 2005/T-Sql。我有一个主要由两个字符组成的字段,它们都应该是大写的,但是有一些遗留数据早于当前的数据库/系统,我需要弄清楚哪些记录违反了大写套管契约。 我认为这会
在 python 中有什么区别: abs(a) 和 operator.abs(a) 它们非常相似,工作方式也相似。如果它们完全相同,那么为什么要制作两个独立的函数来做同样的事情? 如果其中任何一个有一
小心,我说的是::abs() ,而不是 std::abs() 根据cplusplus.com website , abs stdlib. 的行为应该不同h C 版本,如果包含 这是此页面的摘录(涉及
假设我们有数字 81,我们将它分开:8 和 1。如果我们得到这个数字的总和,它将是 9,对吧?让我们检查一下 9 的任意幂是否为 81。是的,9 的平方为 81。 我想找到所有这些数字,直到达到 10
我在postgresql有点情况 我有两个表 t1 和 t2,并且都有一个列具有相同类型的数据“col_data”,col_data 可能只有以下数据 ('ab', 'cd', 'ab,cd', 'c
这个问题在这里已经有了答案: Can we instantiate an abstract class? (16 个答案) 关闭 9 年前。 我有一个关于抽象类的问题。 首先......我正在使用谷
我的问题听起来可能很愚蠢,但我必须在准备学士考试时回答这个问题。 那么,您如何看待 C++ 中的表达式 'ab' == "ab"?这不是真的还是根本不合法和编译错误?我在谷歌上搜索了一下,了解到“ab
我有一个表格,其中填充了某些值,例如 | CODE | NAME | NB: THIS IS A VERY BASIC EXAMPLE | zygnc | oscar alpha |
This question already has answers here: Reference - What does this regex mean?
我正在检查 TypeScript 规范并在某个时间点查看 3.4 Union Types它使用 AB 如下: 一个 |如果 B 是 A 的子类型,则 B 等同于 A。 一个 | B 等同于 B | A
这个问题在这里已经有了答案: What is the difference between .*? and .* regular expressions? (3 个答案) 关闭 7 年前。 +? 匹
下面是我遇到问题的代码。 avg += abs(num) 行有错误,但我无法解决。错误代码: error: call of overloaded 'abs(double&)' is ambigous
我有一个 Java 方法,它在一个非常紧凑的循环中重复计算以下表达式,并有大量重复: Math.abs(a - b) - Math.abs(c - d) a、b、c 和 d 是 long 值,可以跨越
我有一个 .bin 文件,我想对十六进制数据进行简单的字节反转。例如说 @ 0x10 它读取 AD DE DE C0,希望它读取 DE AD C0 DE。 我知道有一种简单的方法可以做到这一点,但我是
我目前正在用 C++ 编写一些类似于 vector 数学类的 glsl,并且我刚刚实现了一个 abs() 函数,如下所示: template static inline T abs(T _a) {
我正在尝试 ab 测试旋风。 当我跑 ab -n 2000 -c 25 http://127.0.0.1 我得到 ab:无效的 URL。 嗯...当我在我的开发机器上访问 ff 时,该站点就在那里。
我有一个 Swift 文件,我在其中导入了 Foundation 和 CoreGraphics,但是在我调用 abs(x) 的地方,其中 x 是一个 CGFloat,我收到此警告: abs is de
我是一名优秀的程序员,十分优秀!