从 Linux 服务启动的节点应用程序中使用 VLC

问题描述 投票:0回答:1

我有一个带有节点服务器的树莓派,它应该通过端点启动带有 RC 接口的 vlc。它可以在 Windows 上的开发环境中运行。当我在 Raspberry Linux 上使用控制台启动 Node 服务器时,它就可以工作。由于我希望节点服务器在 Linux 启动时启动,因此我有一个启动节点脚本的服务。然后,VLC 无法再启动,出现错误:

{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":4212}

这是linux上使用的服务

[Unit]
Description=Description

[Service]
User=root (I tried different user without any success)
WorkingDirectory=/var/www/html/screenwise/backend
ExecStart=npm run live-prod (I also tried with absolute path to npm)
StandardOutput=file:/var/www/html/screenwise/backend/node-logs.log
StandardError=file:/var/www/html/screenwise/backend/node-logs.log
Restart=always

[Install]
WantedBy=multi-user.target

感谢您的帮助

node.js linux raspberry-pi vlc
1个回答
0
投票

同时,我想到了另一个解决方案,可能是在 RaspBerry 启动时启动 VLC,但它也不起作用......

© www.soinside.com 2019 - 2024. All rights reserved.