Not able to add or remove monitors

Forum for questions and support relating to the 1.30.x releases only.
Locked
JariR
Posts: 26
Joined: Wed Sep 25, 2013 10:22 am

Not able to add or remove monitors

Post by JariR »

I'm having some issue with Zoneminder 1.30.3 on Ubuntu 16.04. I'm not able to add new or remove old monitors. Can't see any error messages given when trying to remove old monitor and those buttons whose used to add or remove monitors are not displayed as disabled for me. Everything seems to be working well, but those removed monitors just do not disappear from main view. Only way to remove monitors seems to be by removing them straight from data base. Also tried to reinstall Zoneminder without removing database, but this didn't fix my issue. What could be causing this issue?
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Not able to add or remove monitors

Post by bbunge »

Is this a fresh install of Zoneminder or an upgrade?

Edit:
Sounds like you have permissions problems with MySQL. Run:

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
JariR
Posts: 26
Joined: Wed Sep 25, 2013 10:22 am

Re: Not able to add or remove monitors

Post by JariR »

bbunge wrote: Mon May 08, 2017 11:33 am Is this a fresh install of Zoneminder or an upgrade?
This is an upgrade installation. Fresh installation has been 1.30.0, one day there was update to 1.30.2 suggested in Ubuntu's update manager which I agreed and after that there has been this issue with adding and removing monitors and also that pinch zoom issue which I explained in separate topic.
JariR
Posts: 26
Joined: Wed Sep 25, 2013 10:22 am

Re: Not able to add or remove monitors

Post by JariR »

bbunge wrote: Mon May 08, 2017 11:33 am Edit:
Sounds like you have permissions problems with MySQL. Run:

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
Tried this, but unfortunately this did not fix the issue. MySql is displaying following:

Code: Select all

mysql> SHOW GRANTS FOR 'zmuser'@'localhost';
+--------------------------------------------------------+
| Grants for zmuser@localhost                            |
+--------------------------------------------------------+
| GRANT USAGE ON *.* TO 'zmuser'@'localhost'             |
| GRANT ALL PRIVILEGES ON `zm`.* TO 'zmuser'@'localhost' |
+--------------------------------------------------------+

bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Not able to add or remove monitors

Post by bbunge »

Ah, desktop install. Really do not recommend doing Zoneminder upgrades with the desktop manager in Ubuntu. Using Webmin to do upgrades seems to work but time and again folks get into trouble using the desktop version.

From a command line:

sudo su

service zoneminder stop

apt remove zoneminder

apt purge zoneminder

apt autoremove

mysql -u root -p

mysql> DROP DATABASE zm;

mysql> \q

Now reinstall Zoneminder:

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
JariR
Posts: 26
Joined: Wed Sep 25, 2013 10:22 am

Re: Not able to add or remove monitors

Post by JariR »

bbunge wrote: Mon May 08, 2017 1:14 pm Ah, desktop install. Really do not recommend doing Zoneminder upgrades with the desktop manager in Ubuntu. Using Webmin to do upgrades seems to work but time and again folks get into trouble using the desktop version.

From a command line:

sudo su

service zoneminder stop

apt remove zoneminder

apt purge zoneminder

apt autoremove

mysql -u root -p

mysql> DROP DATABASE zm;

mysql> \q

Now reinstall Zoneminder:

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
These were steps, which I used to reinstall Zoneminder today BUT i didn't drop the database. Do you think the dropping of database is required? Seems that I'm able to delete events and filters and create new ones normally, but problems appears with monitor related tasks.
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Not able to add or remove monitors

Post by bbunge »

Yes. I suspect your database is at fault. You could backup the zm database to a file, drop it then create a new database to see if it works.

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload

And always stop zoneminder before doing upgrades!!!
JariR
Posts: 26
Joined: Wed Sep 25, 2013 10:22 am

Re: Not able to add or remove monitors

Post by JariR »

This issue is solved now. Fresh installation AND database creation did the trick. I let the old events go but exported values from config, filters, monitors, users and zones table before dropping the database. After re-installation I imported values to those tables from dump files. Noticed that there was some extra messages given when I imported values to users table so I dropped and created the database again and imported all other dump files to database but I left off that dump file from users table and made user definitions manually again. Now I am able to remove and add monitors by user interface.
Locked