Removing permissions/parents doesn't work on MariaDB
Closed this issue ยท 26 comments
Basically, when I try to remove permissions or parent groups, it has no effect.
Logs:
[19:12:16 INFO]: ptrcnull issued server command: /lp user ptrcnull parent info
[19:12:23 INFO]: ptrcnull issued server command: /lp user ptrcnull parent clear
[19:12:23 INFO]: [LP] LOG > (ptrcnull@freebuild) [U] (ptrcnull)
[19:12:23 INFO]: [LP] LOG > parent clear
[19:12:23 INFO]: [LuckPerms] [Messaging] Sending log with id: a4a387f4-e585-4a65-a642-726c4f550c3b
[19:12:23 INFO]: [LuckPerms] [Messaging] Sending user ping for 'ptrcnull' with id: 366b0f88-016e-494a-b4ba-074dc8565cfb
[19:12:24 INFO]: ptrcnull issued server command: /lp user ptrcnull parent info
I'm using LuckPerms with 4 Paper and 1 Waterfall server, all on v5.0.92.
Snippet of config:
server: freebuild
use-server-uuid-cache: false
storage-method: mariadb
data:
address: "333.444.555.666:3306"
database: <db name here>
username: <username here>
password: <password here>
pool-settings:
maximum-pool-size: 10
minimum-idle: 10
maximum-lifetime: 600000
connection-timeout: 5000
properties:
useUnicode: true
characterEncoding: utf8
table_prefix: 'luckperms_'
mongodb_collection_prefix: ''
mongodb_connection_URI: ''
split-storage:
enabled: false
methods:
user: h2
group: h2
track: h2
uuid: h2
log: h2
sync-minutes: -1
watch-files: true
messaging-service: none
auto-push-updates: true
push-log-entries: true
broadcast-received-log-entries: true
messaging-service: none
This should be an actual messaging service, as unlike v4 v5 sees "none" as just that: None (v4 did then auto use sql when database was mysql/mariadb). I suggest setting it to sql.
In addition check the consoles of all your backend servers and the proxy for if they received the update ping send by the LP instance, where you executed the command from.
Oh, I migrated from v4 and there wasn't anything about this in the docs.
Nonetheless, the issue was still present on v4... I'll try setting an actual messaging service.
EDIT: but wouldn't the local server show updated parent groups?
>.... [20:58:19 INFO]: ptrcnull executed command: /lpb user ptrcnull permission info
>.... [20:58:29 INFO]: ptrcnull executed command: /lpb user ptrcnull permission unset test.permission
>.... [20:58:29 INFO] [LuckPerms]: [Messaging] Sending log with id: fb03e08d-da81-4308-a60c-75b1cb2e7952
>.... [20:58:29 INFO]: [LP] LOG > (ptrcnull@bungee) [U] (ptrcnull)
>.... [20:58:29 INFO]: [LP] LOG > permission unset test.permission
>.... [20:58:29 INFO] [LuckPerms]: [Messaging] Sending user ping for 'ptrcnull' with id: f6c18f66-401d-48f6-afef-3433bd97b5c9
>.... [20:58:31 INFO]: ptrcnull executed command: /lpb user ptrcnull permission info
Other servers didn't show anything in the logs.
It did load the messaging service config on all servers though.
Waterfall:
[21:00:18 INFO]: __
[21:00:18 INFO]: | |__) LuckPerms v5.0.92
[21:00:18 INFO]: |___ | Running on BungeeCord - Waterfall
[21:00:18 INFO]:
[21:00:18 INFO] [LuckPerms]: Loading configuration...
[21:00:19 INFO] [LuckPerms]: Loading storage provider... [MARIADB]
[21:00:19 INFO] [me.lucko.luckperms.lib.hikari.HikariDataSource]: luckperms-hikari - Starting...
[21:00:19 INFO] [me.lucko.luckperms.lib.hikari.HikariDataSource]: luckperms-hikari - Start completed.
[21:00:20 INFO] [LuckPerms]: Loading messaging service... [SQL]
[21:00:20 INFO] [LuckPerms]: Loading internal permission managers...
[21:00:20 INFO] [LuckPerms]: Performing initial data load...
[21:00:21 INFO] [LuckPerms]: Successfully enabled. (took 2974ms)
[21:00:21 INFO]: Enabled plugin LuckPerms version 5.0.92 by Luck
Paper
[20:54:23 INFO]: [LuckPerms] Enabling LuckPerms v5.0.92
[20:54:23 INFO]: __
[20:54:23 INFO]: | |__) LuckPerms v5.0.92
[20:54:23 INFO]: |___ | Running on Bukkit - Paper
[20:54:23 INFO]:
[20:54:23 INFO]: [LuckPerms] Loading configuration...
[20:54:24 INFO]: [LuckPerms] Loading storage provider... [MARIADB]
[20:54:24 INFO]: [me.lucko.luckperms.lib.hikari.HikariDataSource] luckperms-hikari - Starting...
[20:54:24 INFO]: [me.lucko.luckperms.lib.hikari.HikariDataSource] luckperms-hikari - Start completed.
[20:54:24 INFO]: [LuckPerms] Loading messaging service... [SQL]
[20:54:24 INFO]: [LuckPerms] Loading internal permission managers...
[20:54:24 INFO]: [LuckPerms] Performing initial data load...
[20:54:25 INFO]: [LuckPerms] Successfully enabled. (took 1502ms)
v5 sees "none" as just that: None
I think you're wrong:
https://github.com/lucko/LuckPerms/blob/8725ace73939c8c16629f35d17e5c7654a5c855a/common/src/main/java/me/lucko/luckperms/common/messaging/MessagingFactory.java#L56-L58
This issue is particularly interesting. If the issue persisted on v4, the only issue I can think of is with your database user lacking permissions to update or delete records from the database.
the only issue I can think of is with your database user lacking permissions to update or delete records from the database
I was thinking the same, that or maybe your database is in some sort of read only mode?
Does updating permissions work ok? Or is is just removing that one group?
maybe your database is in some sort of read only mode?
I don't think so, other plugins work just fine
Does updating permissions work ok?
Yup, setting permissions works
Or is is just removing that one group?
Removing anything doesn't work, no matter if it's a single permission node or a player's parent group
Have you checked your DB server's error logs to see if there's any errors there? Also, could you try making a new user & the same database and see if it persists, then new user + new database, then new database + same user. That way if all except one of those configs work it'll narrow down the issue, if all of them do not work then maybe either a bug with your MySQL version in particular, or something like that.
Trying to remove a test permission:
# tail -f a3db90093614.log | grep test.permission
2617882 Query INSERT INTO `luckperms_messenger` (`time`, `msg`) VALUES(NOW(), '{\"id\":\"<uuid>\",\"type\":\"log\",\"content\":{\"timestamp\":1584314514,\"source\":{\"uniqueId\":\"<uuid>\",\"name\":\"ptrcnull@bungee\"},\"target\":{\"type\":\"USER\",\"uniqueId\":\"<uuid>\",\"name\":\"ptrcnull\"},\"description\":\"permission unset test.permission\"}}')
2617886 Query INSERT INTO `luckperms_actions` (time, actor_uuid, actor_name, type, acted_uuid, acted_name, action) VALUES(1584314514, '<uuid>', 'ptrcnull@bungee', 'U', '<uuid>', 'ptrcnull', 'permission unset test.permission')
It looks like it tries to notify other servers and log the action, but never actually removes the permission.
Also, this is on a new user with current database, same as the old one, it's weird that it works on messenger
and actions
and not user_permissions
though
Just to be 100% sure, the <uuid>
is something you've redacted for this issue, right, not a literal <uuid>
?
Have you been able to come up with any exact steps to reproduce the issue? If you install a fresh server and fresh database of the same version, etc?
root@server:~/ptero/db# du -sh minecraft/
2.3G minecraft/
root@server:~/ptero/db# du -sh luckperms/
768K luckperms/
Can this... cause the issue?
Still not sure what you mean by can that cause an issue, what's the issue? The size?
Well, that's the only thing apart from the amount of tables that differs between databases, so that was my guess.