keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.68k stars 235 forks source link

Issues starting docker on unraid #54

Closed Praetorian-hub closed 3 years ago

Praetorian-hub commented 3 years ago

I believe I've configured the docker correctly, I'm attempting to start it with the test RTSP stream, I'm getting the below errors in the logs, any pointers as to what I might be doing wrong? Do I need to set some additional Network settings (ports?) for the docker container?

log: 2021-07-16 14:32:58 78519db87c4f RTSPCam[1] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov" -vf fps=1 -update 1 /tmp/tmpkvn6fj5o/screen.jpg 2021-07-16 14:32:58 78519db87c4f Core[1] INFO Creating ws connection to wss://192.1681.1:7442/camera/1.0/ws?token=ueTHW7Wxenx69CUhL0qV7qswLoUSzpxP Traceback (most recent call last): File "/usr/local/bin/unifi-cam-proxy", line 8, in sys.exit(main()) File "/usr/local/lib/python3.7/site-packages/unifi/main.py", line 104, in main loop.run_until_complete(c.run()) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete return future.result() File "/usr/local/lib/python3.7/site-packages/unifi/core.py", line 67, in run await connect() File "/usr/local/lib/python3.7/site-packages/backoff/_async.py", line 66, in retry ret = await target(*args, *kwargs) File "/usr/local/lib/python3.7/site-packages/unifi/core.py", line 47, in connect subprotocols=["secure_transfer"], File "/usr/local/lib/python3.7/site-packages/websockets/legacy/client.py", line 622, in __await_impl__ transport, protocol = await self._create_connection() File "/usr/local/lib/python3.7/asyncio/base_events.py", line 913, in create_connection type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1290, in _ensure_resolved proto=proto, flags=flags) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 792, in getaddrinfo None, getaddr_func, host, port, family, type, proto, flags) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, **self.kwargs) File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

Praetorian-hub commented 3 years ago

I've resolved the issue. The host IP address was incorrect in the settings above. For anyone wanting to run the docker in Unraid these are the settings I used:

Created a new appdata folder called "camproxy" and pasted the client.pem cert in there

Name: unifi-cam-proxy Repository: keshavdv/unifi-cam-proxy:latest Docker Hub URL: https://hub.docker.com/r/keshavdv/unifi-cam-proxy Extra Parameters: -v "/mnt/user/appdata/camproxy/client.pem:/client.pem" Post Arguements: unifi-cam-proxy --host 192.168.1.1 --mac 'AA:BB:CC:00:11:22' --cert /client.pem --token 3kMR8ijmLJa9wDAXu35N4HM85cezoli0 rtsp -s rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov

synssins commented 3 years ago

So you added a variable named "Extra Parameters" and added the value you posted above, and you added a second variable for the "Post Arguments"? Can you post a sanitized screenshot?

Praetorian-hub commented 3 years ago

Within the Unraid OS these fields are already there. you may need to turn on the advanced view slider in the top right corner

See the 2 screen shots below, when you click apply it more or less passes these fields to a command line anyway. as you can see the Extra Parameters field is just applied before the repository field and the Post Arguments are afterwards.

Docker Fields docker run

synssins commented 3 years ago

You are correct. My view switched from Advanced back to Basic, and I haven't done a manual Docker deploy in UnRaid in about a year or so. My bad.

Thank you for the screenshots! It adds a lot of extra detail that will be helpful for many others.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.