Upgrade error
Upgrade error
Upgrade error to 1.32.x from iconnor with apt.
onfigurazione di zoneminder (1.32.0-xenial)...
MySQL/MariaDB not found; assuming remote server.
Done Updating; starting ZoneMinder.
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.
zoneminder.service couldn't restart.
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zoneminder, action "start" failed.
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since gio 2018-09-13 20:45:03 CEST; 12ms ago
Process: 29187 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)
Main PID: 2457 (code=exited, status=0/SUCCESS)
set 13 20:45:03 SAGITTSERVER systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
set 13 20:45:03 SAGITTSERVER systemd[1]: zoneminder.service: Unit entered failed state.
set 13 20:45:03 SAGITTSERVER systemd[1]: zoneminder.service: Failed with result 'exit-code'.
dpkg: errore nell'elaborare il pacchetto zoneminder (--configure):
il sottoprocesso installato script di post-installation ha restituito lo stato di errore 1
Si sono verificati degli errori nell'elaborazione:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
onfigurazione di zoneminder (1.32.0-xenial)...
MySQL/MariaDB not found; assuming remote server.
Done Updating; starting ZoneMinder.
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.
zoneminder.service couldn't restart.
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zoneminder, action "start" failed.
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since gio 2018-09-13 20:45:03 CEST; 12ms ago
Process: 29187 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)
Main PID: 2457 (code=exited, status=0/SUCCESS)
set 13 20:45:03 SAGITTSERVER systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
set 13 20:45:03 SAGITTSERVER systemd[1]: zoneminder.service: Unit entered failed state.
set 13 20:45:03 SAGITTSERVER systemd[1]: zoneminder.service: Failed with result 'exit-code'.
dpkg: errore nell'elaborare il pacchetto zoneminder (--configure):
il sottoprocesso installato script di post-installation ha restituito lo stato di errore 1
Si sono verificati degli errori nell'elaborazione:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
Re: Upgrade error
It seems to think you have a remote server. Do the update manually.
sudo zmupdate.pl
sudo zmupdate.pl -f
sudo apt-get -f install
sudo zmupdate.pl
sudo zmupdate.pl -f
sudo apt-get -f install
Re: Upgrade error
I've done an upgrade from. 1.30.4 to 1.32.0 on Ubuntu 16.04 LAMP with MySQL with no problems.
Re: Upgrade error
is local server
trying to do manual update:
Database successfully upgraded to version 1.31.14.
Upgrading DB to 1.31.15 from 1.30.4
Database successfully upgraded to version 1.31.15.
Upgrading DB to 1.31.16 from 1.30.4
Database successfully upgraded to version 1.31.16.
Upgrading DB to 1.31.17 from 1.30.4
Database successfully upgraded to version 1.31.17.
Upgrading DB to 1.31.18 from 1.30.4
Database successfully upgraded to version 1.31.18.
Upgrading DB to 1.31.19 from 1.30.4
ERROR 1370 (42000) at line 1: alter routine command denied to user 'zmuser'@'localhost' for routine 'zm.update_storage_stats'
Output:
Command 'mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.31.19.sql' exited with status: 1
i'm using mariadb and old version works fine.
trying to do manual update:
Database successfully upgraded to version 1.31.14.
Upgrading DB to 1.31.15 from 1.30.4
Database successfully upgraded to version 1.31.15.
Upgrading DB to 1.31.16 from 1.30.4
Database successfully upgraded to version 1.31.16.
Upgrading DB to 1.31.17 from 1.30.4
Database successfully upgraded to version 1.31.17.
Upgrading DB to 1.31.18 from 1.30.4
Database successfully upgraded to version 1.31.18.
Upgrading DB to 1.31.19 from 1.30.4
ERROR 1370 (42000) at line 1: alter routine command denied to user 'zmuser'@'localhost' for routine 'zm.update_storage_stats'
Output:
Command 'mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.31.19.sql' exited with status: 1
i'm using mariadb and old version works fine.
Re: Upgrade error
Hey,
had the same error, my DB Server being MySQL 5.7 and remote, but with sudo zmupdate.pl I was able to finish install.
It works via Web now, but API seems inaccessible: server/zm/api throughs warnings and errors:
Notice (8): Use of undefined constant ZM_OPT_USE_API - assumed 'ZM_OPT_USE_API' [APP/Controller/AppController.php, line 63]
Notice (8): Use of undefined constant ZM_OPT_USE_AUTH - assumed 'ZM_OPT_USE_AUTH' [APP/Controller/AppController.php, line 72]
Warning (2): require_once(../../../includes/auth.php) [<a href='http://php.net/function.require-once'>f ... re-once</a>]: failed to open stream: No such file or directory [APP/Controller/AppController.php, line 73]
Fatal error: require_once() [function.require]: Failed opening required '../../../includes/auth.php' (include_path='.:/usr/share/php') in /usr/share/zoneminder/www/api/app/Controller/AppController.php on line 73
Any ideas?
Thanks!
A.
had the same error, my DB Server being MySQL 5.7 and remote, but with sudo zmupdate.pl I was able to finish install.
It works via Web now, but API seems inaccessible: server/zm/api throughs warnings and errors:
Notice (8): Use of undefined constant ZM_OPT_USE_API - assumed 'ZM_OPT_USE_API' [APP/Controller/AppController.php, line 63]
Notice (8): Use of undefined constant ZM_OPT_USE_AUTH - assumed 'ZM_OPT_USE_AUTH' [APP/Controller/AppController.php, line 72]
Warning (2): require_once(../../../includes/auth.php) [<a href='http://php.net/function.require-once'>f ... re-once</a>]: failed to open stream: No such file or directory [APP/Controller/AppController.php, line 73]
Fatal error: require_once() [function.require]: Failed opening required '../../../includes/auth.php' (include_path='.:/usr/share/php') in /usr/share/zoneminder/www/api/app/Controller/AppController.php on line 73
Any ideas?
Thanks!
A.
Re: Upgrade error
@sagitt this looks to me like a permission error with your DB user, check priveledges for zmuser.sagitt wrote: ↑Fri Sep 14, 2018 11:02 am
Database successfully upgraded to version 1.31.18.
Upgrading DB to 1.31.19 from 1.30.4
ERROR 1370 (42000) at line 1: alter routine command denied to user 'zmuser'@'localhost' for routine 'zm.update_storage_stats'
Output:
Command 'mysql -hlocalhost -uzmuser -p"zmpass" zm < /usr/share/zoneminder/db/zm_update-1.31.19.sql' exited with status: 1
Cheers,
A.
Re: Upgrade error
1.32.0 has some additional permissions requirements for the db user. These would normally have been automatically added.
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost;" | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost;" | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
Re: Upgrade error
BTW this might be fixed in master. You might try adding the master ppa
sudo add-apt-repository ppa:zoneminder-master
and let me know if it works for you. We won't be doing anything too experimental in master for a while, so it's fairly safe to do for now.
sudo add-apt-repository ppa:zoneminder-master
and let me know if it works for you. We won't be doing anything too experimental in master for a while, so it's fairly safe to do for now.
Re: Upgrade error
Would grant all for ZM user be better?iconnor wrote: ↑Sat Sep 15, 2018 3:02 pm 1.32.0 has some additional permissions requirements for the db user. These would normally have been automatically added.
echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost;" | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
(from the command prompt)
mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
mysqladmin -uroot -p reload
Re: Upgrade error
Hi,
I tried fresh UBUNTU SERVER install selecting LAMP server during setup
I'm using 16.04.5 LTS
(Tested on local machine and a lots of VM with different setups)
After a fresh install (no MySQL password setted during setup)
# apt-get update && apt-get dist-upgrade
# add-apt-repository ppa:iconnor/zoneminder
# apt-get update
# sudo apt-get install zoneminder
changed in php.ini:
date.timezone = Europe/Rome
# sudo systemctl enable zoneminder
# sudo service zoneminder start
(commands found here: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way)
the result is:
anyway:
root@SAGITTSERVER:~# sudo add-apt-repository ppa:zoneminder-master
Cannot add PPA: 'ppa:~zoneminder-master/ubuntu/ppa'.
ERROR: '~zoneminder-master' user or team does not exist.
tested with: sudo add-apt-repository ppa:iconnor/zoneminder-master, same DB connect error.
and:
root@SAGITTSERVER:~# echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost;" | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
ERROR 1133 (42000) at line 1: Can't find any matching row in the user table
I tried fresh UBUNTU SERVER install selecting LAMP server during setup
I'm using 16.04.5 LTS
(Tested on local machine and a lots of VM with different setups)
After a fresh install (no MySQL password setted during setup)
# apt-get update && apt-get dist-upgrade
# add-apt-repository ppa:iconnor/zoneminder
# apt-get update
# sudo apt-get install zoneminder
changed in php.ini:
date.timezone = Europe/Rome
# sudo systemctl enable zoneminder
# sudo service zoneminder start
(commands found here: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way)
the result is:
Code: Select all
sudo service zoneminder start
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.
systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since dom 2018-09-16 13:51:32 CEST; 2min 30s ago
Process: 11974 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)
set 16 13:51:32 SAGITTSERVER zmpkg.pl[11974]: Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm lin
set 16 13:51:32 SAGITTSERVER zmpkg.pl[11974]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder
set 16 13:51:32 SAGITTSERVER zmpkg.pl[11974]: Compilation failed in require at /usr/share/perl5/ZoneMinder.pm
set 16 13:51:32 SAGITTSERVER zmpkg.pl[11974]: BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder
set 16 13:51:32 SAGITTSERVER zmpkg.pl[11974]: Compilation failed in require at /usr/bin/zmpkg.pl line 48.
set 16 13:51:32 SAGITTSERVER zmpkg.pl[11974]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 48.
set 16 13:51:32 SAGITTSERVER systemd[1]: zoneminder.service: Control process exited, code=exited status=255
set 16 13:51:32 SAGITTSERVER systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
set 16 13:51:32 SAGITTSERVER systemd[1]: zoneminder.service: Unit entered failed state.
set 16 13:51:32 SAGITTSERVER systemd[1]: zoneminder.service: Failed with result 'exit-code'.
anyway:
root@SAGITTSERVER:~# sudo add-apt-repository ppa:zoneminder-master
Cannot add PPA: 'ppa:~zoneminder-master/ubuntu/ppa'.
ERROR: '~zoneminder-master' user or team does not exist.
tested with: sudo add-apt-repository ppa:iconnor/zoneminder-master, same DB connect error.
and:
root@SAGITTSERVER:~# echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost;" | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
ERROR 1133 (42000) at line 1: Can't find any matching row in the user table
Re: Upgrade error
i finally found a way to install it.
i'm now using default LAMP server (16.04.5 LTS setup)
this is the procedure:
i'm now using default LAMP server (16.04.5 LTS setup)
this is the procedure:
Code: Select all
# sudo add-apt-repository ppa:iconnor/zoneminder-master
# sudo apt-get update
# sudo rm /etc/mysql/my.cnf
# sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
# sudo nano /etc/mysql/my.cnf
add this to [mysqld] in my.cnf
[mysqld]
sql_mode = NO_ENGINE_SUBSTITUTION
# systemctl restart mysql
# sudo nano /etc/php/7.0/apache2/php.ini
Change timezone as below:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Rome
# sudo nano /etc/apache2/apache2.conf
Add this at the end of the file:
# ServerName configuration
ServerName localhost
# sudo reboot
# sudo apt-get install zoneminder php-gd libvlc-dev libav-tools
# mysql -uroot < /usr/share/zoneminder/db/zm_create.sql
# mysql -uroot -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"
# chmod 740 /etc/zm/zm.conf
# chown root:www-data /etc/zm/zm.conf
# chown -R www-data:www-data /usr/share/zoneminder/
# sudo ln -s /usr/share/zoneminder/www/events /zoneminder
# sudo adduser www-data video
# sudo a2enconf zoneminder
# sudo a2enmod cgi
# sudo a2enmod rewrite
# sudo systemctl enable zoneminder
# sudo systemctl start zoneminder
# sudo systemctl reload apache2