[support] pducharme's Dockers support thread


Recommended Posts

15 hours ago, fryfrog said:

-v /data/unifi-video/data:/var/lib/unifi-video \
-v /data/unifi-video/videos:/var/lib/unifi-video/videos \

.......

Can you show your run command? When you `docker exec` into it, you should be looking at `/var/lib/unifi-video` and `/var/lib/unifi-video/videos`.

Run command below:

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='UniFi-Video' --net='bridge' --privileged=true -e TZ="America/Chicago" -e HOST_OS="Unraid" -e 'JVM_MX'='2000M' -p '1935:1935/tcp' -p '6666:6666/tcp' -p '7004:7004/udp' -p '7080:7080/tcp' -p '7442:7442/tcp' -p '7443:7443/tcp' -p '7444:7444/tcp' -p '7445:7445/tcp' -p '7446:7446/tcp' -p '7447:7447/tcp' -v '/mnt/cache/appdata/unifi-video/':'/var/lib/unifi-video':'rw' -v '/mnt/user/UnfiVideoShareForStorage':'/var/lib/unifi-video/videos':'rw' 'pducharme/unifi-video-controller' 

127645ed1ce6085f53198044ec0c5f634b9289fd9f8991c029e5642806cf3384

Log:

2019-03-14 03:13:16.272339 [warn] PUID not defined (via -e PUID), defaulting to '99'
2019-03-14 03:13:16.527023 [warn] PGID not defined (via -e PGID), defaulting to '100'
2019-03-14 03:13:16.628321 [info] Permissions already set for volume mappings
Starting unifi-video... (unifi-video) checking for system.properties and truststore files...
done.
Waiting for mongodb to come online..... done.

I was able to restart without issues. It seems it happens when unraid is restarted.

 

ZziSUNP.png

Edited by bluesky509
add
Link to comment
  • 2 weeks later...

having issues getting the unifi video container working behind nginx reverse proxy. anyone having any luck?

 

getting a 502 bad gateway

 

here's my config

 

map $http_upgrade $connection_upgrade {
  default upgrade;
  ''      close;
}

server {
  listen 80;
  server_name nvr.domain.xyz;

  client_max_body_size 4G;

  location / {
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_pass http://192.168.1.10:7080/;
  }
}

server {
  listen 443 ssl http2;
  server_name nvr.domain.xyz;

  ssl_certificate     /config/keys/letsencrypt/fullchain.pem;
  ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

  ssl on;

  set $upstream 192.168.1.10:7443;

  location / {
    proxy_pass     https://$upstream;
    proxy_redirect https://$upstream https://$server_name;

    proxy_cache off;
    proxy_store off;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_read_timeout 36000s;

    proxy_set_header Host $http_host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Referer "";

    client_max_body_size 0;
  }
}

 

Link to comment
  • 2 weeks later...

if anyone else stumbles across this with the same issue, it's because of the network type on the docker container. at least it was in my case. i had it set to custom with its own IP. needed to set it to Host to allow inbound connections.

 

here's the reddit thread where someone helped me understand this: unifi_video_contrainer_behind_reverse_pr

 

here's my config for the reverse proxy if interested

server {
        listen 443 ssl;
        server_name nvr.redacted.xyz;

        root /config/www;
        index index.html index.htm index.php;

        ###SSL Certificates
        ssl_certificate /config/keys/letsencrypt/fullchain.pem;
        ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

        ###Diffie–Hellman key exchange ###
        ssl_dhparam /config/nginx/dhparams.pem;

        ###SSL Ciphers
        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:$

        ###Extra Settings###
        ssl_prefer_server_ciphers on;
        ssl_session_cache shared:SSL:10m;

        ### Add HTTP Strict Transport Security ###
        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
        add_header Front-End-Https on;

        client_max_body_size 0;
        client_body_buffer_size 400M;

        location / {
                proxy_set_header X-Real_IP $remote_addr;
                proxy_pass https://192.168.1.204:7443/;
                proxy_max_temp_file_size 2048m;
                include /config/nginx/proxy.conf;
        }
}

 

Edited by Debaser
Link to comment

I am very new to dockers. Thanks in advance for pointing me in the correct direction. Below is the configuration I ran, and a screenshot of what I see as I attempt 1st login to Unifi Video. I'm not sure if what I see is correct or not, thus, why I am here. If I'm on the right path, any "next steps" direction would be much appreciated.

 

docker run -d \
        --restart=unless-stopped \
        --network="host" \
        --name unifi-video \
        --security-opt apparmor:unconfined \
        --cap-add SYS_ADMIN \
        --cap-add DAC_READ_SEARCH \
        -v /sharedfolders/Security/unifi-video/data:/var/lib/unifi-video \
        -v /sharedfolders/Security/unifi-video/videos:/var/lib/unifi-video/videos \
        -v /sharedfolders/Security/unifi-video/logs:/var/log/unifi-video \
        -e TZ=America/Chicago \
        -e PUID=1001 \
        -e PGID=100 \
        -e DEBUG=1 \
        pducharme/unifi-video-controller

logs: logs and latest logs: Latest_logs

 

unifi.png

Edited by Ryandm
added one additional log note...
Link to comment
15 hours ago, Ryandm said:

I am very new to dockers. Thanks in advance for pointing me in the correct direction. Below is the configuration I ran, and a screenshot of what I see as I attempt 1st login to Unifi Video. I'm not sure if what I see is correct or not, thus, why I am here. If I'm on the right path, any "next steps" direction would be much appreciated.

 


docker run -d \
        --restart=unless-stopped \
        --network="host" \
        --name unifi-video \
        --security-opt apparmor:unconfined \
        --cap-add SYS_ADMIN \
        --cap-add DAC_READ_SEARCH \
        -v /sharedfolders/Security/unifi-video/data:/var/lib/unifi-video \
        -v /sharedfolders/Security/unifi-video/videos:/var/lib/unifi-video/videos \
        -v /sharedfolders/Security/unifi-video/logs:/var/log/unifi-video \
        -e TZ=America/Chicago \
        -e PUID=1001 \
        -e PGID=100 \
        -e DEBUG=1 \
        pducharme/unifi-video-controller

logs: logs and latest logs: Latest_logs

 

unifi.png

Whatever the above is, it essentially crashed my docker. I attempted to run similarly to the docker hub layout and I see mongodb doesn't start in the logs..

docker run -d \
        --restart=unless-stopped \
        --name unifi-video \
        --cap-add SYS_ADMIN \
        --cap-add DAC_READ_SEARCH \
        -p 10001:10001 \
        -p 1935:1935 \
        -p 6666:6666 \
        -p 7080:7080 \
        -p 7442:7442 \
        -p 7443:7443 \
        -p 7444:7444 \
        -p 7445:7445 \
        -p 7446:7446 \
        -p 7447:7447 \
        -v /sharedfolders/Security/unifi-video/data:/var/lib/unifi-video \
        -v /sharedfolders/Security/unifi-video/videos:/var/lib/unifi-video/videos \
        -v /sharedfolders/Security/unifi-video/logs:/var/log/unifi-video \
        -e TZ=America/Chicago \
        -e PUID=99 \
        -e PGID=100 \
        -e DEBUG=1 \
        pducharme/unifi-video-controller

logs: https://pastebin.com/aWhf7yKS . and here https://pastebin.com/K5Sy7V0f

Edited by Ryandm
Link to comment
  • 2 weeks later...
On 4/17/2019 at 8:08 PM, IamSpartacus said:

Any plans to update the docker hub dockerfile for 3.10.2 @fryfrog @Pducharme?

On 4/17/2019 at 8:31 PM, fryfrog said:

Last I looked, it was withdrawn... is it good now?

Edit: Now I don't see any trace of it having been withdrawn... :/

 

I too would be very grateful to see it updated :). Thanks for all the work with the dockers.

 

Link to comment
On 3/14/2019 at 3:15 AM, bluesky509 said:

Run command below:


root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='UniFi-Video' --net='bridge' --privileged=true -e TZ="America/Chicago" -e HOST_OS="Unraid" -e 'JVM_MX'='2000M' -p '1935:1935/tcp' -p '6666:6666/tcp' -p '7004:7004/udp' -p '7080:7080/tcp' -p '7442:7442/tcp' -p '7443:7443/tcp' -p '7444:7444/tcp' -p '7445:7445/tcp' -p '7446:7446/tcp' -p '7447:7447/tcp' -v '/mnt/cache/appdata/unifi-video/':'/var/lib/unifi-video':'rw' -v '/mnt/user/UnfiVideoShareForStorage':'/var/lib/unifi-video/videos':'rw' 'pducharme/unifi-video-controller' 

127645ed1ce6085f53198044ec0c5f634b9289fd9f8991c029e5642806cf3384

Log:


2019-03-14 03:13:16.272339 [warn] PUID not defined (via -e PUID), defaulting to '99'
2019-03-14 03:13:16.527023 [warn] PGID not defined (via -e PGID), defaulting to '100'
2019-03-14 03:13:16.628321 [info] Permissions already set for volume mappings
Starting unifi-video... (unifi-video) checking for system.properties and truststore files...
done.
Waiting for mongodb to come online..... done.

I was able to restart without issues. It seems it happens when unraid is restarted.

 

....

Just wondering if anyone noticed anything wrong with my setup? I had a power outage and on restart it couldn't find system.properties so I eneded up reinstalling from backup.

Link to comment
4 hours ago, fryfrog said:

Try the `:latest` tag, I think it should be 3.10.1. I don't see an actual 3.10.1 tag, so I'll push that now-ish too.

I can switch back and forth between 3.10.1 and 3.10.2 just fine, .1 works and .2 doesn't w/ an error about the user table being corrupt.

I don't know much about the docker, but i found this information about upgrading and some Mongol changes...scroll down to the update to 3.10.2 instructions. Might not mean anything though.

 

https://github.com/exsilium/docker-unifi-video

 

 

Link to comment

So I had the docker working on 3.10.1 then it started going to the Upgrading Unifi-Video screen and seems to be stuck there.  I have deleted the docker completely and when I reinstall it, it does the same thing.  How do you fix this issue?

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='UniFi-Video' --net='host' --privileged=true -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'TCP_PORT_1935'='1935' -e 'TCP_PORT_6666'='6666' -e 'UDP_PORT_7004'='7004' -e 'TCP_PORT_7080'='7080' -e 'TCP_PORT_7442'='7442' -e 'TCP_PORT_7443'='7443' -e 'TCP_PORT_7444'='7444' -e 'TCP_PORT_7445'='7445' -e 'TCP_PORT_7446'='7446' -e 'TCP_PORT_7447'='7447' -v '/mnt/cache/appdata/unifi-video/':'/var/lib/unifi-video':'rw' -v '/mnt/user/UnifiVideoStorage':'/var/lib/unifi-video/videos':'rw' -v '/mnt/user':'/unraid':'rw' 'pducharme/unifi-video-controller' 

 

So I managed to get mongo working but now when I login, it will not take me past the login screen.
 

UPDATE:  I had to use https://[IP]:7443 to login and get to the management interface.  http://[IP]:7080 will not take you to the management interface.

Edited by csmccarron
Link to comment

There are 3.9.x -> 3.10.x and 3.10.1 -> 3.10.2 issues, but they're all self inflicted by Unifi Video itself.

For example, I *just* finally figured out why my 3.10.1 -> 3.10.2 upgrade resulted in an empty setup... they switched to the wiredTiger db engine by pointing at a new, empty db dir! My db was *already* wiredTiger, so I just moved my db into the new folder and it was all fine. They just keep screwing around w/ stuff. :/

There are tags for every version in there now, so you can flip between them as needed and while you troubleshoot. Good luck. :/

Link to comment

I upgraded from 3.10.1 to 3.10.2 today and it was completely seamless.  I had reinstalled 3.10.1 from scratch after the upgrade issues from 3.9, so perhaps that set me up for this easy upgrade?  In any case, I am happy.  

 

I still have the JVM heap settings limited to 4GB.  Has anyone that had the memory leak in 3.10.1 been able to remove this setting yet?

Link to comment
  • 2 weeks later...
  • 4 weeks later...
On 5/11/2019 at 3:48 PM, sunnyd425 said:

I am unable to record, to the share I have created "/mnt/user/unify-video/video".  I tried to change the recording path in web ui to /mnt/user/unify-video/videos, but it says that the path does not exist.  Any tips would be greatly appreciated

I had the same issue. Set your host path to whatever you want but in the UniFi Video system config use the container path as: /var/lib/unifi-video/videos

 

This is how I have mine configured:

image.thumb.png.9f17b0302cc93ac3025b1032baafc81f.png


image.thumb.png.de817c92f8b52980972264441263f5a7.png

 

image.png.14c2ab0d6d3fda0be394cf92dcad8d95.png

Edited by Riotz
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.