Closed jak closed 2 years ago
Did you check this Common Issues pages ?
We don't support Docker at this time
This isn't Docker specific
This is because Docker implies NAT and the stream is generated with dynamic port which can be guessed
This bug is about file system permissions for temporary files - it is not related to networking at all.
@jak Can you propose a fix?
I have the Same Probleme.
I will be looking at changing the way we livestream in the beta next week. Might solve this issue.
@schliemann, @lenoxys, this has to do with the setup of directories in the docker image. The following code: const osType = os_1.default.type(); if (osType === 'Windows_NT') { path = '\\\\.\\pipe\\stream' + (++counter); this.url = path; }else { path = './' + (++counter) + '.sock' this.url = 'unix:' + path }
tries to create a 1..n.sock file in the directory: homebridge/node_modules/homebridge-eufy-security/dist/accessories (not writeable).
I changed that to the following code (and created the appropriate folder in the volume mounted to the docker container):
const osType = os_1.default.type(); if (osType === 'Windows_NT') { path = '\\\\.\\pipe\\stream' + (++counter); this.url = path; } else { path = '/homebridge/socket/' + (++counter) + '.sock'; this.url = 'unix:' + path; this.log.error('current_path', path); this.log.error('parent_dir',__dirname); }
Resulting in a working stream (that drops after a few seconds but I think that is a known issue, at least I saw that on my RP3).
hey @alternativ thanks for chasing this. I've implemented a more official way using the path provided by Homebridge but can't test it.
Could you test it (beta.26) ?
@lenoxys, tested and stream works (but drops after ~10 seconds).
Error in logs remaining [2/21/2022, 5:53:30 PM] [homebridge-eufy-security] Doorbell Error occurred closing socket: Error [ERR_SOCKET_DGRAM_NOT_RUNNING]: Not running
@lenoxys, tested and stream works (but drops after ~10 seconds).
Error in logs remaining
[2/21/2022, 5:53:30 PM] [homebridge-eufy-security] Doorbell Error occurred closing socket: Error [ERR_SOCKET_DGRAM_NOT_RUNNING]: Not running
Try to enable debug mode in plugin, with it on, it won't crash. I've already reported about the issue, but looks like there is no much progress with it.
@lenoxys, tested and stream works (but drops after ~10 seconds). Error in logs remaining
[2/21/2022, 5:53:30 PM] [homebridge-eufy-security] Doorbell Error occurred closing socket: Error [ERR_SOCKET_DGRAM_NOT_RUNNING]: Not running
Try to enable debug mode in plugin, with it on, it won't crash. I've already reported about the issue, but looks like there is no much progress with it.
This works as expected. @lenoxys, issue can be closed.
thanks for your feedback.
For the issue on stream been stopped earlier when debug disable please use this issue thread #356
What happened?
In the current beta branch,
NamePipeStream
assumes it can write to the current directory.In my dockerised setup, it cannot. My suggestion would be to use
/run
or/var/run
, or use a library to determine a suitable location for writing temporary files/sockets.Device Type
Doorbell (Supported)
Plugin Version
beta (Best Effort)
HomeBridge Version
v1.3.x (Supported)
NodeJS Version
v16 (Supported)
Operating System
Docker
Relevant log output