Tree locked?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Tree locked?

Post by knebb »

Hi,

I upgrade from 0.8veryold :lol: to packet-based 1.0.4 (CentOS7).

I am logged in as admin (Sure? How to verify? How to logout an re-login?) but I can not edit my tree. I always get told: "is locked for Editing on 2017-04-08 10:59:04 by .To edit..."

But where do I unlock my tree?

Thanks!

/KNEBB
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Tree locked?

Post by Osiris »

I think you need to have the permission.
Before history, there was a paradise, now dust.
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: Tree locked?

Post by knebb »

Osiris wrote:I think you need to have the permission.
Thnaks. This helps a lot. :evil:

As I wrote:
admin (Sure? How to verify? How to logout an re-login?)
it appears I am logged in as admin. Who has full rights (as far as I can see).

I still can not edit my tree due to the above issue.

So being more precise:
How can I logout from Cacti?
I already removed al Cookies and restarted my browser. No help.

But the original question remains:
How can I reset the "locked" state on my tree?
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: Tree locked?

Post by tertius »

You unlock a tree by clicking the "Finish editing tree" button you see above the Tree items column of the edit view of the tree. I don't know if the account that locked the tree is the only one who is allowed to unlock, or if everyone is allowed, though.
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: Tree locked?

Post by knebb »

Well,

this button is greyed out! :oops:
Otherwise I guess I would have clicked on it :lol:
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Tree locked?

Post by Osiris »

are you logged in as admin? Look into the table graph_trees. You can always hack unlocking by updating one of its columns.
Before history, there was a paradise, now dust.
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: Tree locked?

Post by tertius »

If you are familiar with some kind of mysql admin tool, for example MySQL Workbench or phpmyadmin, open the table graph_tree and look into the column "locked". It contains a 1 for locked trees. Change this to 0 to unlock the corresponding tree.
shadv
Posts: 30
Joined: Fri Mar 17, 2017 11:22 pm

Re: Tree locked?

Post by shadv »

I know this is a few months old, but just in case anybody else is having issues with this, I found a solution that worked for me.

Under trees (before you open the tree you want to edit) put a check for "Choose an action" for the tree you need access to and in the "Choose an action" dorpdown, select Un Publish and click Go. After that you should be able to select and edit your tree.
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: Tree locked?

Post by knebb »

As I am having this issue reglarly and even the last post did not help I will show how to fix it to have it documented for the next times.


Go to your mysql host

Code: Select all

# You might be able to use a different user with permissions for cacti database
$>mysql -u root -p
Enter password:
# open the Cacti databse (identified by show databases;)
>use cacti;
Database changed
# Show the entries in database. You will notice the "1" for locked.
> SELECT * from graph_Tree;
+----+---------+--------+---------------------+-----------+-------+----------+---------+---------------------+-------------+
| id | enabled | locked | locked_date         | sort_type | name  | sequence | user_id | last_modified       | modified_by |
+----+---------+--------+---------------------+-----------+-------+----------+---------+---------------------+-------------+
|  1 | on      |      1 | 2018-04-01 23:37:33 |         1 | admin |        1 |       1 | 2018-04-01 23:37:52 |           0 |
+----+---------+--------+---------------------+-----------+-------+----------+---------+---------------------+-------------+
1 row in set (0.00 sec)
# Now set the locked field to "0" to unlock it
> update graph_tree set locked = 0 where locked=1;
Query OK, 1 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0
# Done and exit.
>exit;
After this, everything works as expected.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Tree locked?

Post by netniV »

This means that you have not finished editing the tree manually. This is done by clicking on "Finished Editing" which is just above the tree branches when you are editing it. I'm not sure what circumstances would make the button greyed out unless it thinks a different person was editing the tree.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
User avatar
knebb
Cacti User
Posts: 138
Joined: Tue Sep 19, 2006 11:29 am

Re: Tree locked?

Post by knebb »

As I mentioned- I can not finish editing as the button was greyed out. Wiht newer versions currently it is not greyed out, but simply does nothing.

The only way is to edit the database directly.

For whatever reason.... :cry:
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Tree locked?

Post by netniV »

What version are you running and what browser?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mitan
Posts: 1
Joined: Mon Jan 20, 2025 1:06 pm

Re: Tree locked?

Post by mitan »

Thanks knebb, problem is solved...
knebb wrote: Mon Apr 02, 2018 12:35 am As I am having this issue reglarly and even the last post did not help I will show how to fix it to have it documented for the next times.


Go to your mysql host

Code: Select all

# You might be able to use a different user with permissions for cacti database
$>mysql -u root -p
Enter password:
# open the Cacti databse (identified by show databases;)
>use cacti;
Database changed
# Show the entries in database. You will notice the "1" for locked.
> SELECT * from graph_Tree;
+----+---------+--------+---------------------+-----------+-------+----------+---------+---------------------+-------------+
| id | enabled | locked | locked_date         | sort_type | name  | sequence | user_id | last_modified       | modified_by |
+----+---------+--------+---------------------+-----------+-------+----------+---------+---------------------+-------------+
|  1 | on      |      1 | 2018-04-01 23:37:33 |         1 | admin |        1 |       1 | 2018-04-01 23:37:52 |           0 |
+----+---------+--------+---------------------+-----------+-------+----------+---------+---------------------+-------------+
1 row in set (0.00 sec)
# Now set the locked field to "0" to unlock it
> update graph_tree set locked = 0 where locked=1;
Query OK, 1 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0
# Done and exit.
>exit;
After this, everything works as expected.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests