Member
Posts: 126
Registered: ‎07-17-2015
Kudos: 47
Solutions: 1

Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

[ Edited ]

Hi,

 

i ended up in a not working unifi-video anymore. 

 

cat /var/log/unifi-video/error.log:

 

1549365287.823 2019-02-05 12:14:47.823/MEZ: ERROR  [uv.db.svc] Failed to acquire client connection Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=127.0.0.1:7441, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Verbindungsaufbau abgelehnt (Connection refused)}}] in MongoDb-Connecting

systemctl status unifi-video:

 

 unifi-video.service - LSB: Ubiquiti unifi-video
   Loaded: loaded (/etc/init.d/unifi-video; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-02-05 12:21:22 CET; 12s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 22752 ExecStart=/etc/init.d/unifi-video start (code=exited, status=2)
    Tasks: 4906 (limit: 4915)
   Memory: 4.1G
      CPU: 91ms
   CGroup: /system.slice/unifi-video.service
           ├─21436 unifi-video -cwd /usr/lib/unifi-video -user unifi-video -home /usr/lib/jvm/java-8-openjdk-amd64/jre -cp /usr/share/java/comm
           └─21437 unifi-video -cwd /usr/lib/unifi-video -user unifi-video -home /usr/lib/jvm/java-8-openjdk-amd64/jre -cp /usr/share/java/comm

Feb 05 12:21:22 Superserver systemd[1]: Starting LSB: Ubiquiti unifi-video...
Feb 05 12:21:22 Superserver unifi-video[22752]: Starting Ubiquiti UniFi Video: unifi-video/etc/init.d/unifi-video: 54: /etc/init.d/unifi-video:
Feb 05 12:21:22 Superserver systemd[1]: unifi-video.service: Control process exited, code=exited status=2
Feb 05 12:21:22 Superserver systemd[1]: Failed to start LSB: Ubiquiti unifi-video.
Feb 05 12:21:22 Superserver systemd[1]: unifi-video.service: Unit entered failed state.
Feb 05 12:21:22 Superserver systemd[1]: unifi-video.service: Failed with result 'exit-code'.

 

mongo --version
MongoDB shell version: 3.2.11

 

So there is a refused connection to the mongodb. I have no idea why and don't know anything about mongodb. 


Can you please advise me? 

 

Regards

Dirk

Member
Posts: 126
Registered: ‎07-17-2015
Kudos: 47
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

Now i've managed to upgrade to:

 

mongo --version
MongoDB shell version v3.4.19
git version: a2d97db8fe449d15eb8e275bbf318491781472bf
OpenSSL version: OpenSSL 1.0.1t  3 May 2016
allocator: tcmalloc
modules: none
build environment:
    distmod: debian81
    distarch: x86_64
    target_arch: x86_64

Because a unifi controller 5.9.29 is running natively on the same host i can't upgrade to a higher mongodb version. 

But the error is still the same with UVC.

Member
Posts: 126
Registered: ‎07-17-2015
Kudos: 47
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

OK, i found that the error is produced by a zombie process of unifi video. 

 

After kill -9 process id i could finally restart the UVC controller. 

 

But now it is still within the update process and i just get this error:

 

1499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.756 2019-02-05 16:44:59.756/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.757 2019-02-05 16:44:59.757/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.757 2019-02-05 16:44:59.757/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting
1549381499.757 2019-02-05 16:44:59.757/MEZ: ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting

Member
Posts: 126
Registered: ‎07-17-2015
Kudos: 47
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

So finally i've fixed that:

 

saved: /var/lib/unifi-video/backup =>> some place


apt remove unifi-video && apt purge unifi-video



dpkg -i unifi-video.Debian7_amd64.v3.10.1.deb

Then unifi video was installed successfully and started in a fresh way. I restored the backup which was from the previous 3.9.12. 

 

Then "systemctl restart unifi-video" and the controller restartet correctly. 

 

The cameras just showed up disconnected. So i connected to each of it and placed the controller IP in the specified field including the adoption key. 

 

The cameras started to upgrade afterwards and connected back. 

 

The recordings where away. So restore recordings and analyze database which was successful. 

 

The map picture is away. So upload a new picutre and place your cams. 

 

The pw of the mail account was away. Just enter it again. 

 

Now the UVC is finally on 3.10.1 and fully restored. 

 

Regards

Dirk

 

 

 

Emerging Member
Posts: 41
Registered: ‎01-18-2015
Kudos: 4
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

[ Edited ]

Same experience for me on Debian 9 (stretch) after just attempting to upgrade to 3.10.1. After upgrading the unifi-video package, the web interface was just sitting at "Updating Unifi Video" for a long time. Then I started investigting and found the same problems as the original poster here. Having to purge unifi-video and start over with everything. Highly irritating.

New Member
Posts: 18
Registered: ‎02-19-2016
Kudos: 8

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

The problem with clean install and using a backup config is that the users, other than the admin account, need to be reinvited.    If anyone has smooth upgrade path for Debian9.7/Mongo 3.2.11 (which comes with debian9 by default), please post the solution. I think this is unsupported, but nevertheless, I think a lot of people must be running with this setup.

Ubiquiti Employee
Posts: 12,156
Registered: ‎02-10-2014
Kudos: 4271
Solutions: 981
Contributions: 17

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

Can you guys sound off on how you upgraded?  Web UI?  Manually with dpkg?


Many Questions are Answered in the KnowledgeBase
Don't forget to kudo helpful posts and mark threads as solved
Forum Rules
Emerging Member
Posts: 41
Registered: ‎01-18-2015
Kudos: 4
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

The normal Debian way (one such way anyway): aptitude upgrade

Same thing would be done by apt upgrade or apt-get upgrade.
New Member
Posts: 23
Registered: ‎08-05-2015
Kudos: 7
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

[ Edited ]

I have the same issues on a clean Debian 9 with only Unifi Video installed.

I updated with the command line commands as listed in the blogpost: 

wget https://dl.ubnt.com/firmwares/unifi-video/v3.10.1/unifi-video.Debian7_amd64.v3.10.1.deb; /usr/lib/unifi-video/bin/ubnt.updater unifi-video.Debian7_amd64.v3.10.1.deb

 

During Unifi Video startup I see constant restarting processes for mongodb --version |grep something ......

After a couple of minutes these restarting processes stop, but the webinterface keeps stuck on the "Updating, please wait" page.

Member
Posts: 126
Registered: ‎07-17-2015
Kudos: 47
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed


@UBNT-Matt_B_ wrote:

Can you guys sound off on how you upgraded?  Web UI?  Manually with dpkg?


I did the upgrade in the manual way with dpkg.

 

Emerging Member
Posts: 55
Registered: ‎04-17-2017
Kudos: 5
Solutions: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

[ Edited ]

Same issue here with Ubuntu 16.04 with Mongo 3.2.22, was running Video Controller 3.9.12 with Unifi Controller 5.10.15 so now have amess to clean up... Thanks Ubnt for not testing this properly.

 

Tried initaly via the WebGUI as it stated there was a upgrade, sat on doing upgrade for 2 hours, so rebooted controller, have thus far tried a APT Remove/Purge of unifi-video and reinstalled via DPKG and still no go. So guess i will have to kill the DB as well but looks like it may of toasted Mongo as well but the Unifi Controller is still working.

New Member
Posts: 6
Registered: ‎06-17-2013
Kudos: 1

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

I experienced the same issue when upgrading from 3.9.9 via dpkg to 3.10.1 last week. I also did a purge and restore.

 

ERROR [uv.db.svc] Failed to acquire client connection Interrupted while waiting to connect in MongoDb-Connecting

Highlighted
New Member
Posts: 2
Registered: ‎02-13-2019
Kudos: 2

Re: Debian 9 - Upgrading from 3.9.12 to 3.10.1 failed

The same thing happened to me last night.  I have 5 NVRs so I sort of had it down to a science by the last one.  I figured I would register and post in the hopes that it helps some other people like me.  The tl;dr is, if you first remove 3.9.12, and then install 3.10.1, everything will work fine.  If you upgrade, you will have problems, but they can be fixed, it just takes longer.

 

My setup

Spoiler
Debian 9
root@video:/var/log/unifi-video# uname -a
Linux video 4.19.0-0.bpo.1-amd64 #1 SMP Debian 4.19.12-1~bpo9+1 (2018-12-30) x86_64 GNU/Linux
root@video:/var/log/unifi-video# apt-cache policy openjdk-8-jre-headless mongodb-server
openjdk-8-jre-headless:
  Installed: 8u181-b13-2~deb9u1
  Candidate: 8u181-b13-2~deb9u1
  Version table:
 *** 8u181-b13-2~deb9u1 500
        500 http://ftp.ca.debian.org/debian stretch/main amd64 Packages
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
        100 /var/lib/dpkg/status
mongodb-server:
  Installed: 1:3.2.11-2+deb9u1
  Candidate: 1:3.2.11-2+deb9u1
  Version table:
 *** 1:3.2.11-2+deb9u1 500
        500 http://ftp.ca.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

Using the repo.  From my sources.list

deb [arch=amd64] http://www.ubnt.com/downloads/unifi-video/apt-3.x wheezy ubiquiti

The ideal procedure. This works flawlessly for me, like any other upgrade

1. "apt remove unifi-video"

2. "apt install unifi-video"

 

The damage control procedure.  Hopefully you have a backup.  You've already run "apt upgrade" (how foolish) and ufv is currently broken ("unifi video is currently upgrading" and the circle spins forever.  Lots of mongo errors in the logs). Steps 6 and 7 may only apply to people using a custom cert.

1. "apt remove unifi-video"

2. reboot your machine

3. "apt install unifi-video"

4. log into web UI. It has been defaulted.  Restore your backup.  If you get a 400 or 404 error, or connection lost error, while trying to restore your backup, refresh the page and try to restore it again.  Keep trying until it lets you restore.

5. wait a few minutes to let the NVR flash your cameras

6. edit /usr/lib/unifi-video/data/system.properties, add the line ufv.custom.certs.enable=true

7. install your custom cert and then "systemctl restart unifi-video"

8. log into web UI.  On the settings tab, enter your email password and save (test if you wish)

9. still on the settings tab, click System Configuration, then Tools in the new sidebar, check Restore Recordings and click Analyze.

 

For me, the 400/404/connection lost errors were resolved once I installed my custom cert and restarted ufv.