ZoneMinder with Storage Areas (Hanging)

Forum for questions and support relating to the 1.30.x releases only.
Locked
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

ZoneMinder with Storage Areas (Hanging)

Post by quian »

So when I update from ZoneMinder Master Snapshots 1.30.1-xenial-2017010301 to ZoneMinder with Storage Areas - Ubuntu Xenial 1.30.10-xenial-2017010902


root@zm:~# add-apt-repository ppa:iconnor/zoneminder-storageareas
ZM master snapshots with multi-server support and multiple storage area support to assist in managing storage across machines in a ZM cluster.

This code is very bleeding-edge. It may eat your system.
More info: https://launchpad.net/~iconnor/+archive ... orageareas
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpr2bm9gv0/secring.gpg' created
gpg: keyring `/tmp/tmpr2bm9gv0/pubring.gpg' created
gpg: requesting key 776FFB04 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpr2bm9gv0/trustdb.gpg: trustdb created
gpg: key 776FFB04: public key "Launchpad PPA for Isaac Connor" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
root@zm:~# apt-get update
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://ppa.launchpad.net/iconnor/zonemi ... ter/ubuntu xenial InRelease
Get:3 http://ppa.launchpad.net/iconnor/zonemi ... eas/ubuntu xenial InRelease [17.6 kB]
Get:4 http://ppa.launchpad.net/iconnor/zonemi ... eas/ubuntu xenial/main amd64 Packages [1,612 B]
Get:5 http://ppa.launchpad.net/iconnor/zonemi ... eas/ubuntu xenial/main i386 Packages [1,608 B]
Get:6 http://ppa.launchpad.net/iconnor/zonemi ... eas/ubuntu xenial/main Translation-en [700 B]
Hit:7 http://za.archive.ubuntu.com/ubuntu xenial InRelease
Hit:8 http://za.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:9 http://za.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 21.5 kB in 8s (2,388 B/s)
Reading package lists... Done
root@zm:~# apt-get install zoneminder
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libmp4v2-2 zoneminder-doc
Suggested packages:
fcgiwrap www-browser
The following NEW packages will be installed:
libmp4v2-2
The following packages will be upgraded:
zoneminder zoneminder-doc
2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.5 MB of archives.
After this operation, 2,341 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://za.archive.ubuntu.com/ubuntu xenial/universe amd64 libmp4v2-2 amd64 2.0.0~dfsg0-4 [324 kB]
Get:2 http://ppa.launchpad.net/iconnor/zonemi ... eas/ubuntu xenial/main amd64 zoneminder amd64 1.30.10-xenial-2017010902 [5,942 kB]
Get:3 http://ppa.launchpad.net/iconnor/zonemi ... eas/ubuntu xenial/main amd64 zoneminder-doc all 1.30.10-xenial-2017010902 [5,274 kB]
Fetched 11.5 MB in 42s (270 kB/s)
Selecting previously unselected package libmp4v2-2.
(Reading database ... 109492 files and directories currently installed.)
Preparing to unpack .../libmp4v2-2_2.0.0~dfsg0-4_amd64.deb ...
Unpacking libmp4v2-2 (2.0.0~dfsg0-4) ...
Preparing to unpack .../zoneminder_1.30.10-xenial-2017010902_amd64.deb ...
Unpacking zoneminder (1.30.10-xenial-2017010902) over (1.30.1-xenial-2017010301) ...
Preparing to unpack .../zoneminder-doc_1.30.10-xenial-2017010902_all.deb ...
Unpacking zoneminder-doc (1.30.10-xenial-2017010902) over (1.30.1-xenial-2017010301) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for systemd (229-4ubuntu13) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libmp4v2-2 (2.0.0~dfsg0-4) ...
Setting up zoneminder (1.30.10-xenial-2017010902) ...
Installing new version of config file /etc/logrotate.d/zoneminder ...

Initiating database upgrade to version 1.30.10 from version 1.30.1

Upgrading database to version 1.30.10
Loading config from DB 217 entries
Saving config to DB 220 entries
Upgrading DB to 1.30.2 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.2.
Upgrading DB to 1.30.3 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.3.
Upgrading DB to 1.30.4 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.4.
Upgrading DB to 1.30.5 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.5.
Upgrading DB to 1.30.6 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.6.
Upgrading DB to 1.30.7 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.7.
Upgrading DB to 1.30.8 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.8.
Upgrading DB to 1.30.9 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.9.
Upgrading DB to 1.30.10 from 1.30.1
mysql: [Warning] Using a password on the command line interface can be insecure.


Gets stuck here
Any ideas?
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZoneMinder with Storage Areas (Hanging)

Post by iconnor »

I'm trying to figure this out as well. What it is doing is trying to change the defaultValue on the config table to a TEXT from a TINYTEXT. I think something has the config table locked. Make sure nothing ZM related is running during the upgrade.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZoneMinder with Storage Areas (Hanging)

Post by iconnor »

If this hangs, log into mysql and do a

SHOW PROCESSLIST

it should tell you who has the lock.
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: ZoneMinder with Storage Areas (Hanging)

Post by quian »

Thanks will give it a bash
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: ZoneMinder with Storage Areas (Hanging)

Post by quian »

mysql> show processlist;
+----+--------+-----------+------+---------+------+---------------------------------+---------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+--------+-----------+------+---------+------+---------------------------------+---------------------------------------------+
| 7 | zmuser | localhost | zm | Sleep | 713 | | NULL |
| 8 | zmuser | localhost | zm | Sleep | 711 | | NULL |
| 17 | zmuser | localhost | zm | Query | 711 | Waiting for table metadata lock | ALTER TABLE Config MODIFY DefaultValue TEXT |
| 21 | root | localhost | NULL | Query | 0 | starting | show processlist |
+----+--------+-----------+------+---------+------+---------------------------------+---------------------------------------------+
4 rows in set (0.00 sec)

mysql>
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZoneMinder with Storage Areas (Hanging)

Post by iconnor »

Now I'm curious what a

ps ax | grep zm

shows.

I'm still trying to figure out why any process has a lock on the config table.
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: ZoneMinder with Storage Areas (Hanging)

Post by quian »

root@ubuntu:~# ps ax | grep zm
14566 pts/1 S+ 0:00 /usr/bin/perl -w /usr/bin/zmupdate.pl --nointeractive
14587 pts/1 S+ 0:00 sh -c mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.30.10.sql
14588 pts/1 S+ 0:00 mysql -hlocalhost -uzmuser -px xxxx zm
14890 pts/2 S+ 0:00 grep --color=auto zm
root@ubuntu:~#
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZoneMinder with Storage Areas (Hanging)

Post by iconnor »

I think I have a fix. Turns out zmupdate.pl is holding the lock, and then calling mysql to do the update which it can't.

I am building new packages now.
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: ZoneMinder with Storage Areas (Hanging)

Post by quian »

:mrgreen:

Thanks will check it out..
quian
Posts: 46
Joined: Tue Dec 27, 2016 6:58 am

Re: ZoneMinder with Storage Areas (Hanging)

Post by quian »

I have tested the new package for ZoneMinder with Storage Areas - Ubuntu Xenial1.30.10-xenial-2017011501 and it is working now.
Upgrade from master had no issues.

There are lots of interesting features.
Will check it out...

:)
Locked