Highlighted
New Member
Posts: 20
Registered: ‎08-26-2018
Kudos: 86
Solutions: 1
Accepted Solution

Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

I used the commands listed in the release notes to update. I got no error message, however, when i try to login into my cameras i get a screen that says "Updating UniFi Video" with a circle spinning. I cannot get further than this. Any help would be appreciated.

 

doing tail -f * in /var/log/unifi-video I see the following and it repeats endlessly:

 

==> db.log <==

1550082748.127 2019-02-13 13:32:28.127/EST: 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: Connection refused (Connection refused)}}] in MongoDb-Connecting

 

==> error.log <==

1550082748.127 2019-02-13 13:32:28.127/EST: 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: Connection refused (Connection refused)}}] in MongoDb-Connecting

 

==> connection.log <==

1550082750.309 2019-02-13 13:32:30.309/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request URI /camera/1.0/ws  in tomcat-HTTPS-cam-exec-4

1550082750.309 2019-02-13 13:32:30.309/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request HOST:[192.168.2.247, 192.168.2.69] SERVER NAME: in tomcat-HTTPS-cam-exec-4

1550082750.309 2019-02-13 13:32:30.309/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() RESPONSE headers:{} in tomcat-HTTPS-cam-exec-4

1550082750.309 2019-02-13 13:32:30.309/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() REQUEST headers:{pragma=no-cache, cache-control=no-cache, host=192.168.2.69, origin=http://ws_camera_proto_secure_transfer, upgrade=websocket, connection=Upgrade, sec-websocket-key=JxCGfsOjFwI5+zM1wK2rHQ==, sec-websocket-protocol=secure_transfer, sec-websocket-version=13, camera-mac=FCECDA8FC8C9} in tomcat-HTTPS-cam-exec-4

1550082750.309 2019-02-13 13:32:30.309/EST: WARN   [uv.camera.connection] CameraWsConnection: checkOrigin failed. System is not ready) in tomcat-HTTPS-cam-exec-4

1550082751.343 2019-02-13 13:32:31.343/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request URI /camera/1.0/ws  in tomcat-HTTPS-cam-exec-5

1550082751.343 2019-02-13 13:32:31.343/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request HOST:[192.168.2.251, 192.168.2.69] SERVER NAME: in tomcat-HTTPS-cam-exec-5

1550082751.344 2019-02-13 13:32:31.344/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() RESPONSE headers:{} in tomcat-HTTPS-cam-exec-5

1550082751.344 2019-02-13 13:32:31.344/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() REQUEST headers:{pragma=no-cache, cache-control=no-cache, host=192.168.2.69, origin=http://ws_camera_proto_secure_transfer, upgrade=websocket, connection=Upgrade, sec-websocket-key=2WPkxIvbf7g52jcsa6yOEw==, sec-websocket-protocol=secure_transfer, sec-websocket-version=13, camera-mac=FCECDAD86616} in tomcat-HTTPS-cam-exec-5

1550082751.344 2019-02-13 13:32:31.344/EST: WARN   [uv.camera.connection] CameraWsConnection: checkOrigin failed. System is not ready) in tomcat-HTTPS-cam-exec-5

1550082755.489 2019-02-13 13:32:35.489/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request URI /camera/1.0/ws  in tomcat-HTTPS-cam-exec-3

1550082755.489 2019-02-13 13:32:35.489/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request HOST:[192.168.2.247, 192.168.2.69] SERVER NAME: in tomcat-HTTPS-cam-exec-3

1550082755.489 2019-02-13 13:32:35.489/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() RESPONSE headers:{} in tomcat-HTTPS-cam-exec-3

1550082755.489 2019-02-13 13:32:35.489/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() REQUEST headers:{pragma=no-cache, cache-control=no-cache, host=192.168.2.69, origin=http://ws_camera_proto_secure_transfer, upgrade=websocket, connection=Upgrade, sec-websocket-key=LT99wBESvhhHQUN9oufbZw==, sec-websocket-protocol=secure_transfer, sec-websocket-version=13, camera-mac=FCECDA8FC8C9} in tomcat-HTTPS-cam-exec-3

1550082755.489 2019-02-13 13:32:35.489/EST: WARN   [uv.camera.connection] CameraWsConnection: checkOrigin failed. System is not ready) in tomcat-HTTPS-cam-exec-3

1550082756.551 2019-02-13 13:32:36.551/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request URI /camera/1.0/ws  in tomcat-HTTPS-cam-exec-2

1550082756.552 2019-02-13 13:32:36.552/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter()  request HOST:[192.168.2.251, 192.168.2.69] SERVER NAME: in tomcat-HTTPS-cam-exec-2

1550082756.552 2019-02-13 13:32:36.552/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() RESPONSE headers:{} in tomcat-HTTPS-cam-exec-2

1550082756.552 2019-02-13 13:32:36.552/EST: INFO   [uv.camera.connection] CameraWsConnectFilter: doFilter() REQUEST headers:{pragma=no-cache, cache-control=no-cache, host=192.168.2.69, origin=http://ws_camera_proto_secure_transfer, upgrade=websocket, connection=Upgrade, sec-websocket-key=Y7NmLZyXLbXfFq9rf/rYIA==, sec-websocket-protocol=secure_transfer, sec-websocket-version=13, camera-mac=FCECDAD86616} in tomcat-HTTPS-cam-exec-2

1550082756.552 2019-02-13 13:32:36.552/EST: WARN   [uv.camera.connection] CameraWsConnection: checkOrigin failed. System is not ready) in tomcat-HTTPS-cam-exec-2

 

==> db.log <==

1550082758.127 2019-02-13 13:32:38.127/EST: 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: Connection refused (Connection refused)}}] in MongoDb-Connecting

 

==> error.log <==

1550082758.127 2019-02-13 13:32:38.127/EST: 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: Connection refused (Connection refused)}}] in MongoDb-Connecting

 

 

 


Accepted Solutions
Established Member
Posts: 995
Registered: ‎09-25-2014
Kudos: 313
Solutions: 60

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

A clean install would work with UniFi Video, I don't know how UniFi Wireless affects it as I have mine on 2 seperate VM's.

I believe that other post talks about adjusting the Mongod config file to get it working on your current system. You shouldn't have to do a new build.

View solution in original post


All Replies
Established Member
Posts: 995
Registered: ‎09-25-2014
Kudos: 313
Solutions: 60

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

You had 3.9.12 running on 18.04? I’m guessing the issue started there. What did you have to modify to get that going?

New Member
Posts: 20
Registered: ‎08-26-2018
Kudos: 86
Solutions: 1

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

3.9.12 worked great. I downloaded the package file and installed using Doug. I believe I used the package for 16.04 and it worked. It was sometime ago now.

New Member
Posts: 20
Registered: ‎08-26-2018
Kudos: 86
Solutions: 1

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

I also have UniFi controller running in the same box. Not sure if that’s relevant or not. 

Regular Member
Posts: 348
Registered: ‎01-03-2017
Kudos: 143
Solutions: 15

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

Yeah, many (well, all) of the methods floating around the forums for shoehorning 3.9.x onto Ubuntu 18.04 cause issues when upgrading to 3.10. I ran into a few issues, too.
Established Member
Posts: 995
Registered: ‎09-25-2014
Kudos: 313
Solutions: 60

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

https://community.ubnt.com/t5/UniFi-Video/UniFi-Video-3-10-0-MongoDB-fails-to-start/m-p/2656953#M116...

 

Read through that. Maybe something in there can help you. Sounds like the same issue.

New Member
Posts: 20
Registered: ‎08-26-2018
Kudos: 86
Solutions: 1

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

Any tips? I’m okay with completely deleting UniFi video and trying to start with 3.10.1 without 3.9.12 installed. I have two cameras so far so to reconfigure takes minutes.

 

that aside any tips to resolve this would be greatly appreciated!

New Member
Posts: 15
Registered: ‎03-23-2017
Kudos: 1
Solutions: 2

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

Same circumstances and issue here. It has been "updating" for around 3 hours now. If a clean install is the way to go, thats cool. I just don't want to go down that route if I will be in the same boat.

Established Member
Posts: 995
Registered: ‎09-25-2014
Kudos: 313
Solutions: 60

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

A clean install would work with UniFi Video, I don't know how UniFi Wireless affects it as I have mine on 2 seperate VM's.

I believe that other post talks about adjusting the Mongod config file to get it working on your current system. You shouldn't have to do a new build.

New Member
Posts: 20
Registered: ‎08-26-2018
Kudos: 86
Solutions: 1

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

Thank you. To fix I did the following:

 

sudo apt remove unifi-video

rm -rf /var/lib/unifi-video

dpkg -i unifi-video.Ubuntu18.04_amd64.v3.10.1.deb

 

Works great now! Cameras had to be re-managed.

 

Thanks for your help!

New Member
Posts: 26
Registered: ‎05-25-2018

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

[ Edited ]

Make sure there is enough free space in your partition to update the databases. We're running on a VM in a server rack --> large database and small disk image. We halted all the unifi-video and mongo tasks, then tried to repair the database with:
# mongod --smallfiles --journal --dbpath /var/lib/unifi-video/db/
# mongod --smallfiles --repair --dbpath /var/lib/unifi-video/db/

Mongo reported the 5GB free on the disk wasn't enough to repair the 8GB database. After we resized the VM from 24GB to 32GB, the above commands succeeded, after which unifi-video only took a couple seconds to launch.

If this is the problem in your case, you will have to make some room in the partition containing your DB; maybe by copying out stored videos, then copying them back in after the DB operation is done.

New Member
Posts: 15
Registered: ‎03-23-2017
Kudos: 1
Solutions: 2

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

[ Edited ]

I have 200+ GB free space, so space was not an issue. I could not get the fix supplied a post after mine to work. Reloaded the OS, and reinstalled Unifi clean. Everything went fine. Restored from backup and my credentials no longer worked. finally gave up on that. Reloaded the OS and Unifi again. Setting it all back up as new, so I will have to go out to the cameras tomorrow during daylight and reset them as I cannot manage them now.

 

I had to bring my G3 inside to reset back to factory so i could manage it again. I noticed that it would not work on my switch on any ports that weren't already set to 24v. It actually disconnected my switch from my controller when i plugged the camera. Luckily I had a G4 running inside for testting and just used that port. Had the annoying issue where the camera went basck to 3.2.0 firmware and got stuck in the upgrade loop. Finally got that fixed and one camera is back online and seems to be working fine. The controller has been stable thus far as well. I was also able to finally adopt the G4 which was the biggest perk to me.

Regular Member
Posts: 348
Registered: ‎01-03-2017
Kudos: 143
Solutions: 15

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

For future reference, if you save the camera password (from the NVR settings screen) you can use ubnt/[camera password] to manage the cameras on a fresh NVR without resetting them.
New Member
Posts: 3
Registered: ‎02-13-2019

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

I have totay made an apt-get upgrade and now my nvr isnt' working anymore. same db errors as elmodio has. I have also tried a Downgrad, simple Reinstallation and an reinstallation including a prune and mongo-server. Unifi-Video will not Start. Now it isn't even writing logs anymore.

* unifi-video.service - LSB: Ubiquiti unifi-video
   Loaded: loaded (/etc/init.d/unifi-video; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-02-14 17:54:53 CET; 9s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 16052 ExecStart=/etc/init.d/unifi-video start (code=exited, status=2)
    Tasks: 4913 (limit: 4915)
   CGroup: /system.slice/unifi-video.service
           |-9709 unifi-video -cwd /usr/lib/unifi-video -user unifi-video -home /usr/lib/jvm/java-8-openjdk-amd64/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi-video/lib/airvision.jar -pidfile /var/run/unifi-video/unifi-video.pid -procname unifi-video -Dav.te
           `-9710 unifi-video -cwd /usr/lib/unifi-video -user unifi-video -home /usr/lib/jvm/java-8-openjdk-amd64/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi-video/lib/airvision.jar -pidfile /var/run/unifi-video/unifi-video.pid -procname unifi-video -Dav.te

Feb 14 17:54:53 *******.de systemd[1]: Starting LSB: Ubiquiti unifi-video...
Feb 14 17:54:53 *******.de unifi-video[16052]: /etc/init.d/unifi-video: 12: /lib/lsb/init-functions.d/40-systemd: Cannot fork
Feb 14 17:54:53 *******.de systemd[1]: unifi-video.service: Control process exited, code=exited status=2
Feb 14 17:54:53 *******.de systemd[1]: Failed to start LSB: Ubiquiti unifi-video.
Feb 14 17:54:53 *******.de systemd[1]: unifi-video.service: Unit entered failed state.
Feb 14 17:54:53 *******.de systemd[1]: unifi-video.service: Failed with result 'exit-code'.
New Member
Posts: 20
Registered: ‎08-26-2018
Kudos: 86
Solutions: 1

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

Check that unifi-video isn't still running (even though you removed it)..

 

ps aux|grep unifi should show if it is.. if you see processes kill -9 them and then retry apt. 

New Member
Posts: 15
Registered: ‎03-23-2017
Kudos: 1
Solutions: 2

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

I have the camera password saved. Do I use that with the username i used, or does that get used in conjunction with ubnt, or no username. I tried what i thought was every combination of username, ubnt password, and camera password I could think of, and nothing let me unmanage that camera. Granted I might have been doing it wrong altogether. Do I need to sign into the camera via IP, or use it via the GUI on the actual controller? I might put a little effort into it tonight, or i might just nuke my remaining G3 dome since I now jogged my memory on how to manually upgrade firmware via ssh and winscp.
Established Member
Posts: 995
Registered: ‎09-25-2014
Kudos: 313
Solutions: 60

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

You use ubnt and your camera password. Since your old system is down, so you can't unmanage them I would login to the camera directly via the web browser and reset it there.

Regular Member
Posts: 348
Registered: ‎01-03-2017
Kudos: 143
Solutions: 15

Re: Ubuntu 18.04 - Updating from 3.9.12 -> 3.10.1

I think you just use ubnt as the username and then the camera password. If all else fails, you can log into the camera directly with those credentials and factory reset it that way. That would at least save getting out the ladder!