老师 部署mediasoup demo时候,遇到一个no fullchain.pem 的问题

来源:13-2 Mediasoup Demo的布署

慕村4592102

2019-11-25

mediasoup-demo-server:INFO running an HTTPS server… +6ms
(node:9531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/build/disk3/tools/mediasoup-demo/server/certs/fullchain.pem’
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at runHttpsServer (/home/build/disk3/tools/mediasoup-demo/server/server.js:363:13)
at run (/home/build/disk3/tools/mediasoup-demo/server/server.js:74:8)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:9531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9531) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

exiting…

写回答

2回答

小江同学4233265

2023-01-21

我想补充一个用OpenSSL在macos本地创建证书的方法,因为我也在这里卡了一下。

https://msol.io/blog/tech/create-a-self-signed-ssl-certificate-with-openssl/

openssl genrsa -out key.pem 2048
openssl req -new -sha256 -key key.pem -out csr.csr
openssl req -x509 -sha256 -days 365 -key key.pem -in csr.csr -out certificate.pem
openssl req -in csr.csr -text -noout | grep -i "Signature.*SHA256" && echo "All is well" || echo "This certificate will stop working in 2017! You must update OpenSSL to generate a widely-compatible certificate"

这四个命令顺序执行一遍,key.pem就是私钥,certificate.pem就是公钥。

1
0

李超

2019-11-26

你的证书是从哪来的?用它自己的就好了

0
2
李超
那就自己生成一个,网上有很多证书生成的方法
2020-02-18
共2条回复

百万级高并发WebRTC流媒体服务器设计与开发

备战5G音视频时代,抢先掌握服务端高级技能

2067 学习 · 375 问题

查看课程