LuckPerms

LuckPerms

41.4k Downloads

[LuckPerms] Failed to init storage implementation

blueawp opened this issue · 26 comments

commented

I keep on getting this when I try joining my server, Kicked whilst connecting to hub: [LP] database error occurred whilst loading permissions data. Please try again later. If you are a server admin, please check the console for any errors. ive tried everything to fix it but I can't seem fix it

here is the logs: https://hastebin.com/suyazenudi.shell

commented

Look like luckperms cannot connect to your database. See this https://github.com/lucko/LuckPerms/wiki/Storage-system-errors for possible errors and a checklist is given as well.

commented

Okay, ill look at and see if I can fix that.

commented

Same error here. Any updates ?

commented

@Efk0 the causes for this error are documented here https://github.com/lucko/LuckPerms/wiki/Storage-system-errors
If you ensure none of them are the case, the error will go away.

commented

i tried everything on https://github.com/lucko/LuckPerms/wiki/Storage-system-errors but im still getting the error i dont know what to do?

commented

Pastebin the entire log with the error you are currently getting. While they can look similar, it is often the case that one is fixed and another pops up.

commented

https://pastebin.com/aeErA0bX

I've checked all the credentials. Also other plugins don't have any problems connecting to database.

commented

@Efk0

Caused by: java.sql.SQLInvalidAuthorizationSpecException: Could not connect to address=(host=localhost)(port=3306)(type=master) : (conn=61356) Access denied for user 'rhs'@'185.91.116.237' (using password: YES)

This error means that the database did not accept the credentials, be it due to a formatting error in your password (make sure 'wrap in single quotes') or something else. The wiki page linked above details how to grant full permissions.

@blueawp

Caused by: java.net.ConnectException: Connection refused (Connection refused)

This error means that a firewall or closed port or something in the connection between your minecraft server's machine and your database server's machine has stopped/prevented the connection. Check that ports (including 3306 especially) are open and disable firewalls to try connecting.

commented

Thank you!

I've managed to fixed this by setting host to 127.0.0.1

commented

@Efk0 FYI, I am the father of @blueawp
I've been using MySQL since 1998 (when I was using Slackware and compiling from source code with gcc) and have been building and deploying server hardware for about the same time. Here's the server he has built. Everything here is from localhost, although I just tried the same from another MySQL on our LAN that is a much older version. Whether localhost (127.0.0.1) or from the older MySQL server on 192.168.1.26, we can connect via CLI just fine, but with the same login credentials in the luckerperms yml file, it's always a no go:

jk@bunny:~$ uname -a
Linux bunny 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
jk@bunny:~$ ifconfig eno1
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.60  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::d65d:64ff:fe27:597c  prefixlen 64  scopeid 0x20<link>
        ether d4:5d:64:27:59:7c  txqueuelen 1000  (Ethernet)
        RX packets 18278747  bytes 4144354562 (4.1 GB)
        RX errors 0  dropped 4206  overruns 0  frame 0
        TX packets 31770749  bytes 4825485051 (4.8 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0x9f800000-9f820000  

jk@bunny:~$ netstat -an | grep 3306
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:48454         127.0.0.1:3306          TIME_WAIT  
tcp        0      0 127.0.0.1:48458         127.0.0.1:3306          TIME_WAIT  
jk@bunny:~$ mysql -u luckperms -p luckperms < create_tasks_table.sql 
Enter password: 
jk@bunny:~$ mysql -u luckperms -p 
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 14911
Server version: 10.5.4-MariaDB-1:10.5.4+maria~focal mariadb.org binary distribution

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 [(none)]> use luckperms;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [luckperms]> show tables;
+---------------------+
| Tables_in_luckperms |
+---------------------+
| tasks               |
+---------------------+
1 row in set (0.001 sec)

MariaDB [luckperms]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| luckperms          |
+--------------------+
2 rows in set (0.001 sec)

MariaDB [luckperms]> exit
Bye
jk@bunny:~$
commented

Sorry @Efk0 , I guess I should have tagged @Laarryy instead. My bad!

commented

Do you use a webpanel like pterodactyl or virtualization software like Docker or KVM?

commented

@Laarryy Yes, we started out doing that. But I have since deleted the luckperms db and user.
I am a CLI-oriented person. I like to see which ports are open and what is happening at the lower levels in instead of having other peoples code masking what is really happening.
Here is that other remote MySQL DB server on our LAN that we tested today, with the same disappointing results:

john@asus-un62 ~ $ mysql -p -u luckperms -h 192.168.1.26  luckperms
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 48325
Server version: 5.5.57-MariaDB MariaDB Server

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> show tables;
Empty set (0.00 sec)

mysql> CREATE TABLE IF NOT EXISTS tasks (
    ->     task_id INT AUTO_INCREMENT PRIMARY KEY,
    ->     title VARCHAR(255) NOT NULL,
    ->     start_date DATE,
    ->     due_date DATE,
    ->     status TINYINT NOT NULL,
    ->     priority TINYINT NOT NULL,
    ->     description TEXT,
    ->     created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
    -> )  ENGINE=INNODB;
Query OK, 0 rows affected (0.35 sec)

mysql> INSERT INTO tasks (title,status,priority,description) VALUES 
    -> ('Get Luckperms working',1,1,'Why can it not connect?');
Query OK, 1 row affected (0.06 sec)

mysql> SELECT * FROM tasks;
+---------+-----------------------+------------+----------+--------+----------+-------------------------+---------------------+
| task_id | title                 | start_date | due_date | status | priority | description             | created_at          |
+---------+-----------------------+------------+----------+--------+----------+-------------------------+---------------------+
|       1 | Get Luckperms working | NULL       | NULL     |      1 |        1 | Why can it not connect? | 2020-07-22 16:00:45 |
+---------+-----------------------+------------+----------+--------+----------+-------------------------+---------------------+
1 row in set (0.00 sec)

mysql> quit
Bye
john@asus-un62 ~ $
commented

So are you using Pterodactyl as Webpanel or Docker or KVM? You didn't really answer that question

commented

What needs to get done is your MC server to connect to your MySQL database, which is handled by hikari. If you use a webpanel like pterodactyl or virtualization software like Docker or KVM, and wouldn't mind telling me which, there are different common problems/solutions to try, however I'm not sure what deleting the LP user on the database would do except making it unable to connect.

commented

@Laarryy The host, bunny, where Minecraft is running is not on a VM or Docker, but it is being managed by Pterodactyl.

commented

Pterodactyl is using docker for server creation and management

commented

I don't know Pterodactyl, so if it uses docker, then I guess it is running from a container.

commented

I personally prefer LXC over Docker.

commented

That means you can't use 127.0.0.1 or localhost like you notmally would, but you must use 172.18.0.1 or 172.17.0.1 as host IP. Also it requires changing the database configuration to allow remote access ( e.g. bind-address = 0.0.0.0 and that the user is created as username@%

commented

To each on their own, I personally like all of the container solutions out there. But personally I preffer docker ^^

commented

@Aperture-Development Astrein! Das muß ich ja ausprobieren! Vielen Dank!

commented

@Aperture-Development Jetzt klappt es:

MariaDB [luckperms]> show tables;
+-----------------------------+
| Tables_in_luckperms         |
+-----------------------------+
| luckperms_actions           |
| luckperms_group_permissions |
| luckperms_groups            |
| luckperms_messenger         |
| luckperms_players           |
| luckperms_tracks            |
| luckperms_user_permissions  |
| tasks                       |
+-----------------------------+
8 rows in set (0.001 sec)

MariaDB [luckperms]>

Endlich mal eine Lösung. Jetzt wird's gefeiert!

commented

Super ^^
Ich muss leider noch arbeiten, aber ich freu mich das ich euch helfen konnte

commented

Is it all good? @blueawp mind closing this if it is?