Member
Posts: 270
Registered: ‎08-14-2015
Kudos: 87
Solutions: 10

Upgrade to 3.10.1 from 3.9.8

I have an existing 3.9.8 install that will not upgrade to 3.9.12 so it can be updated to 3.10.1

 

- This has been reported below with no response, I was hoping the 3.10 release would address the problem, but the release notes say to be at 3.9.12 before upgrading to 3.10.1.

 

Ubuntu 16.04 70 Camera system real server, multiple raid arrays with mirrored array for OS and applications. Striped 32 TB array for video storage.

 

-------------------

[root@MS-UniFi-02 ~] # apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [903 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [795 kB]
Get:4 https://www.ui.com/downloads/unifi/debian stable InRelease [185 B]
Ign:5 https://www.ui.com/downloads/unifi-video/apt-3.x xenial InRelease
Hit:9 https://www.ui.com/downloads/unifi-video/apt-3.x xenial Release
Fetched 2,026 kB in 1s (1,142 kB/s)
Reading package lists... Done

 

[root@MS-UniFi-02 ~] # apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
ubuntu-minimal
The following packages will be upgraded:
libcups2 unifi-video
2 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 197 kB/118 MB of archives.
After this operation, 140 kB of additional disk space will be used.
Do you want to continue? [Y/n]

 

[root@MS-UniFi-02 ~] # apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  ubuntu-minimal
The following packages will be upgraded:
  libcups2 unifi-video
2 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 197 kB/118 MB of archives.
After this operation, 140 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcups2 amd64 2.1.3-4ubuntu0.7 [197 kB]
Fetched 197 kB in 0s (534 kB/s)
Preconfiguring packages ...
Installed Version 3.9.8
(Reading database ... 137131 files and directories currently installed.)
Preparing to unpack .../libcups2_2.1.3-4ubuntu0.7_amd64.deb ...
Unpacking libcups2:amd64 (2.1.3-4ubuntu0.7) over (2.1.3-4ubuntu0.6) ...
Preparing to unpack .../unifi-video_3.9.12_amd64.deb ...
unifi-video: /var/lib/dpkg/info/unifi-video.prerm upgrade 3.9.12
Installed Version 3.9.8
unifi-video: /var/lib/dpkg/tmp.ci/preinst upgrade 3.9.8
..preinst.configure: START
mkdir: cannot create directory ‘/var/log/unifi-video’: File exists
dpkg: error processing archive /var/cache/apt/archives/unifi-video_3.9.12_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
unifi-video: /var/lib/dpkg/tmp.ci/postrm abort-upgrade 3.9.8
Installation Aborted
unifi-video: /var/lib/dpkg/info/unifi-video.postinst abort-upgrade 3.9.12
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 /var/cache/apt/archives/unifi-video_3.9.12_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
[root@MS-UniFi-02 ~] #
Established Member
Posts: 969
Registered: ‎02-12-2013
Kudos: 251
Solutions: 90

Re: Upgrade to 3.10.1 from 3.9.8

What do you get by running this?
ls -ls /var/log/unifi-video
Member
Posts: 270
Registered: ‎08-14-2015
Kudos: 87
Solutions: 10

Re: Upgrade to 3.10.1 from 3.9.8

@flamber 

0 lrwxrwxrwx 1 root root 25 Feb 23 2018 /var/log/unifi-video -> /var/lib/unifi-video/logs

 

Obviously I can post logs or support file as needed. The support file will be very large.

 

Member
Posts: 270
Registered: ‎08-14-2015
Kudos: 87
Solutions: 10

Re: Upgrade to 3.10.1 from 3.9.8

[ Edited ]

went to look in the directory and it did not exist....

Created /var/lib/unifi-video/logs with unifi-video and logs with unifi-video as owner and group for both....

 

Tried apt-get install upgrade again and now there isn an install log:

[root@MS-UniFi-02 /var/lib/unifi-video] # cat unifi-video-update-5Cypqo8Fjk.log
Starting update at Fri Feb 1 18:49:31 CST 2019 ...
(Reading database ... 137131 files and directories currently installed.)
Preparing to unpack unifi-video.Ubuntu16.04_amd64.v3.9.12.deb ...
unifi-video: /var/lib/dpkg/info/unifi-video.prerm upgrade 3.9.12
Installed Version 3.9.8
unifi-video: /var/lib/dpkg/tmp.ci/preinst upgrade 3.9.8
..preinst.configure: START
WARNING: symlink /usr/lib/unifi-video/data -> /var/lib/unifi-video is broken or missing!!!
START repairing...
/var/lib/unifi-video exists re-create the symlink
rm: cannot remove '/usr/lib/unifi-video/data': Is a directory
dpkg: error processing archive unifi-video.Ubuntu16.04_amd64.v3.9.12.deb (--install):
subprocess new pre-installation script returned error exit status 1
unifi-video: /var/lib/dpkg/tmp.ci/postrm abort-upgrade 3.9.8
Installation Aborted
unifi-video: /var/lib/dpkg/info/unifi-video.postinst abort-upgrade 3.9.12
Failed to open /dev/tty: No such device or address
Errors were encountered while processing:
unifi-video.Ubuntu16.04_amd64.v3.9.12.deb
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

 

Note: Recording path is set to: /mnt/video in the gui. (That is the mount point where the large array is).

- I have two other servers configured the same way. (same hardware even).

- I have had upgrade issues on each of them in the past with one version or another, but they currently are both running 3.9.12

 

Member
Posts: 270
Registered: ‎08-14-2015
Kudos: 87
Solutions: 10

Re: Upgrade to 3.10.1 from 3.9.8 (Ubuntu 16.04)

I still can't get this system to upgrade to 3.9.12 so I can upgrade to 3.10.1

@UBNT-Cody  any ideas?

 

 

Ubiquiti Employee
Posts: 4,666
Registered: ‎06-18-2015
Kudos: 1425
Solutions: 436

Re: Upgrade to 3.10.1 from 3.9.8 (Ubuntu 16.04)

@mcheavens,

Could you try removing both /var/log/unifi-video and /var/lib/unifi-video/logs and attempt the dpkg install again?

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Member
Posts: 270
Registered: ‎08-14-2015
Kudos: 87
Solutions: 10

Re: Upgrade to 3.10.1 from 3.9.8 (Ubuntu 16.04)

Still fails

[root@MS-UniFi-02 ~] # rm -f /var/log/unifi-video
[root@MS-UniFi-02 ~] # rm -f /var/lib/unifi-video/logs
rm: cannot remove '/var/lib/unifi-video/logs': Is a directory
[root@MS-UniFi-02 ~] # rm -rf /var/lib/unifi-video/logs
[root@MS-UniFi-02 ~] # ls
dead.letter sent unifi-video.Ubuntu16.04_amd64.v3.9.12.deb unifi-video-update-okv8vjHRYY.log
[root@MS-UniFi-02 ~] # dpkg -i unifi-video.Ubuntu16.04_amd64.v3.9.12.deb
(Reading database ... 137655 files and directories currently installed.)
Preparing to unpack unifi-video.Ubuntu16.04_amd64.v3.9.12.deb ...
unifi-video: /var/lib/dpkg/info/unifi-video.prerm upgrade 3.9.12
Installed Version 3.9.8
unifi-video: /var/lib/dpkg/tmp.ci/preinst upgrade 3.9.8
..preinst.configure: START
WARNING: symlink /usr/lib/unifi-video/data -> /var/lib/unifi-video is broken or missing!!!
START repairing...
/var/lib/unifi-video exists re-create the symlink
rm: cannot remove '/usr/lib/unifi-video/data': Is a directory
dpkg: error processing archive unifi-video.Ubuntu16.04_amd64.v3.9.12.deb (--install):
subprocess new pre-installation script returned error exit status 1
unifi-video: /var/lib/dpkg/tmp.ci/postrm abort-upgrade 3.9.8
Installation Aborted
unifi-video: /var/lib/dpkg/info/unifi-video.postinst abort-upgrade 3.9.12
Errors were encountered while processing:
unifi-video.Ubuntu16.04_amd64.v3.9.12.deb
[root@MS-UniFi-02 ~] #

Ubiquiti Employee
Posts: 4,666
Registered: ‎06-18-2015
Kudos: 1425
Solutions: 436

Re: Upgrade to 3.10.1 from 3.9.8

@mcheavens,

 

Sorry, I missed that in the first post it's stuck on the data symlink.

 

The first step is to generate a configuration backup in case something goes wrong.

 

Can you confirm that your data directory is at /usr/lib/unifi-video/data ?

 

Assuming it is, stop the controller, then move the contents of /usr/lib/unifi-video/data to /var/lib/unifi-video.  Once the move is complete, remove /usr/lib/unifi-video/data then attempt the installer again.

UBNT_Alternate_Logo.png
Ubiquiti Networks Enterprise Support Team


UniFi Protect: UniFi Protect Help Center | Frequently Asked Questions

UniFi Video 3: UniFi Video Help Center | UFV3 User Guide


Member
Posts: 270
Registered: ‎08-14-2015
Kudos: 87
Solutions: 10

Re: Upgrade to 3.10.1 from 3.9.8

Videos are at /mnt/video which is a mount point on a Striped array. (I have 4 other exact server configurations)

(yes I have a backup of the config)

/usr/lib/unifi-video/data

 

BUT that is just a symlink

[root@MS-UniFi-02 /usr/lib] # ls -al un*
lrwxrwxrwx 1 root root 22 Aug 25 13:14 unifi-video -> /mnt/video/unifi-video

 

00-unifi.jpg