upgrade to this version: 1.37.10~20220122134417-bionic failed

Current Development version likely to have breaking changes
Post Reply
GaborS
Posts: 3
Joined: Fri May 14, 2021 7:45 pm

upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by GaborS »

Hi,

I tried to update my zm but i got the following error message:
Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Private' in 'field list' in /usr/share/zoneminder/www/includes/config.php:168\nStack trace:\n#0 /usr/share/zoneminder/www/includes/config.php(168): PDO->query()\n#1 /usr/share/zoneminder/www/includes/config.php(142): loadConfig()\n#2 /usr/share/zoneminder/www/index.php(46): require_once('/usr/share/zone...')\n#3 {main}\n thrown in /usr/share/zoneminder/www/includes/config.php on line 168

Please can you help in this case?

BR,
Gábor Strama
rhis
Posts: 3
Joined: Sat Jan 22, 2022 10:24 pm

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by rhis »

I added the missing "private" in data base manually, now it works.
In table config.
private tinyint(4) unsigned No None NULL
Then I ran : sudo zmupdate.pl

I used Webmin, otherwise i should be lost..

After i add this field I got.
Upgrading database to version 1.37.10
Loading config from DB 221 entries
Saving config to DB 221 entries
Upgrading DB to 1.37.10 from 1.37.9

Database successfully upgraded to version 1.37.10.

Database upgrade to version 1.37.10 successful.

So it works now. (I am just a user)
Last edited by rhis on Sat Jan 22, 2022 11:24 pm, edited 1 time in total.
DVB Hardware
Posts: 201
Joined: Thu Jan 01, 2015 5:12 pm
Location: Rhode Island

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by DVB Hardware »

Mee to on 1.37.10~20220122134417-focal

A package failed to install. Trying to recover:
Setting up zoneminder (1.37.10~20220122134417-focal) ...
detected systemd
Detected db service is mariadb.service
Checking for db
Db exists.
Updating permissions for user zmuser@localhost

Initiating database upgrade to version 1.37.10 from version 1.37.9

Upgrading database to version 1.37.10
Loading config from DB 221 entries
Saving config to DB 221 entries
DBD::mysql::st execute failed: Unknown column 'Private' in 'field list' at /usr/share/perl5/ZoneMinder/Config.pm line 245.
Can't execute when updating config entry ZM_SKIN_DEFAULT: Unknown column 'Private' in 'field list' at /usr/bin/zmupdate.pl line 450.
Error updating db.
dpkg: error processing package zoneminder (--configure):
installed zoneminder package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
zoneminder
Linux Mint 21 Cinnamon Mariadb 10.6.x using Master 1.37.x latest always

DVB stands for Digital VIdeo Broadcasting , retired satellite downlink supplier
rhis
Posts: 3
Joined: Sat Jan 22, 2022 10:24 pm

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by rhis »

"Unknown column 'Private' in 'field list' at /usr/share/perl5/ZoneMinder/Config.pm line 245."

You need to add "private" field as in my posting above. Or wait for a new version..
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by lyallp »

1.37.10, just my 2 cents worth....
My zoneminder is more of a hobby, so I don't want to introduce more problems by manually creating the column.
I can wait for the next update.

Code: Select all

root@Lyalls-PC ~
# zmupdate.pl 

Initiating database upgrade to version 1.37.10 from version 1.37.9

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /var/tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.37.10
Loading config from DB 221 entries
Saving config to DB 221 entries
DBD::mysql::st execute failed: Unknown column 'Private' in 'field list' at /usr/lib64/perl5/vendor_perl/5.34/ZoneMinder/Config.pm line 245, <STDIN> line 1.
Can't execute when updating config entry ZM_SKIN_DEFAULT: Unknown column 'Private' in 'field list' at /usr/bin/zmupdate.pl line 450.
root@Lyalls-PC ~
# 
...Lyall
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by Magic919 »

Run the SQL update to the DB manually.
-
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by lyallp »

Ran the sql then ran zmupdate.pl (to update the database version).

Code: Select all

--
-- Update Config table to have Private
--

SELECT 'Checking for Private in Config';
SET @s = (SELECT IF(
  (SELECT COUNT(*)
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE table_name = 'Config'
  AND table_schema = DATABASE()
  AND column_name = 'Private'
  ) > 0,
"SELECT 'Column Private already exists in Config'",
"ALTER TABLE `Config` ADD COLUMN `Private` BOOLEAN NOT NULL DEFAULT FALSE AFTER `Readonly`"
));

PREPARE stmt FROM @s;
EXECUTE stmt;


ZM now starts, but the console has a couple of issues.
Upon login, it gets stuck on logging in... only by removing ? from the end of the URL does the console show.
Next, the Console is slightly wonky, as can be seen here
Selection_005.jpg
Selection_005.jpg (95.59 KiB) Viewed 9717 times
This occurs in Firefox and Chrome on Gentoo Linux.
...Lyall
rhis
Posts: 3
Joined: Sat Jan 22, 2022 10:24 pm

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by rhis »

zmupdate.pl didn't exited with success until I added the "private"-field manually . Missing field is in table "Config"
See my postings above!
TheRoth
Posts: 28
Joined: Tue May 05, 2020 3:57 am

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by TheRoth »

Same Problem for me...
i try to run "sudo zmupdate.pl", but same issue. :?
root@ZoneMinder-Server:~# sudo zmupdate.pl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

Initiating database upgrade to version 1.37.10 from version 1.37.8
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /var/tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : y
Creating backup to /var/tmp/zm/zm-1.37.8.dump. This may take several minutes.
Database successfully backed up to /var/tmp/zm/zm-1.37.8.dump, proceeding to upgrade.

Upgrading database to version 1.37.10
Loading config from DB 221 entries
Saving config to DB 221 entries
DBD::mysql::st execute failed: Unknown column 'Private' in 'field list' at /usr/share/perl5/ZoneMinder/Config.pm line 245, <STDIN> line 1.
Can't execute when updating config entry ZM_SKIN_DEFAULT: Unknown column 'Private' in 'field list' at /usr/bin/zmupdate.pl line 450.
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by lyallp »

I executed the SQL for 1.39.9 to 10 using phpmyadmin and then run zmupdate.pl as root, no errors.
The only issue I have is posted above.
...Lyall
TheRoth
Posts: 28
Joined: Tue May 05, 2020 3:57 am

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by TheRoth »

Ok... Update OK... But ZoneMinder don't start...

Code: Select all

root@ZoneMinder-Server:/etc/zm# mysql --user=root --password=XXXXXXXX zm
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 20517
Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [zm]> SELECT 'Checking for Private in Config';
+--------------------------------+
| Checking for Private in Config |
+--------------------------------+
| Checking for Private in Config |
+--------------------------------+
1 row in set (0.000 sec)

MariaDB [zm]> SET @s = (SELECT IF(
    ->   (SELECT COUNT(*)
    ->   FROM INFORMATION_SCHEMA.COLUMNS
    ->   WHERE table_name = 'Config'
    ->   AND table_schema = DATABASE()
    ->   AND column_name = 'Private'
    ->   ) > 0,
    -> "SELECT 'Column Private already exists in Config'",
    -> "ALTER TABLE `Config` ADD COLUMN `Private` BOOLEAN NOT NULL DEFAULT FALSE AFTER `Readonly`"
    -> ));
Query OK, 0 rows affected (0.001 sec)

MariaDB [zm]> 
MariaDB [zm]> PREPARE stmt FROM @s;
Query OK, 0 rows affected (0.000 sec)
Statement prepared

MariaDB [zm]> EXECUTE stmt;
+-----------------------------------------+
| Column Private already exists in Config |
+-----------------------------------------+
| Column Private already exists in Config |
+-----------------------------------------+
1 row in set (0.000 sec)
MariaDB [zm]> exit
Bye
root@ZoneMinder-Server:/etc/zm# apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                                
Hit:4 https://linux.teamviewer.com/deb stable InRelease                                      
Ign:5 https://zmrepo.zoneminder.com/debian/master bullseye/ InRelease
Hit:6 https://zmrepo.zoneminder.com/debian/master bullseye/ Release
Reading package lists... Done
root@ZoneMinder-Server:/etc/zm# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up zoneminder (1.37.10~20220122.2-bullseye) ...
chown: cannot dereference '/var/cache/zoneminder/js_overlay-dark-1611509356.js': No such file or directory
chown: cannot dereference '/var/cache/zoneminder/skins_classic_js_base-dark-1611509356.js': No such file or directory
chown: cannot dereference '/var/cache/zoneminder/skins_classic_views_js_state-dark-1611509356.js': No such file or directory
detected systemd
Detected db service is mariadb.service
Checking for db
Db exists.
Updating permissions for user zmuser@localhost

Initiating database upgrade to version 1.37.10 from version 1.37.8

Upgrading database to version 1.37.10
Loading config from DB 221 entries
Saving config to DB 221 entries
Upgrading DB to 1.37.9 from 1.37.8

Database successfully upgraded to version 1.37.9.
Upgrading DB to 1.37.10 from 1.37.8

Database successfully upgraded to version 1.37.10.

Database upgrade to version 1.37.10 successful.


Freshening configuration in database
Migratings passwords, if any...
Loading config from DB 221 entries
Saving config to DB 221 entries
Done Updating

In Web
Not Found
The requested URL was not found on this server.

Apache/2.4.52 (Debian) Server at 10.15.67.3 Port 80
TheRoth
Posts: 28
Joined: Tue May 05, 2020 3:57 am

Re: upgrade to this version: 1.37.10~20220122134417-bionic failed

Post by TheRoth »

After remove and install again... It's work Well :) Thanks
Post Reply