Communications link failure when using MariaDB
ThisIsTenou opened this issue · 19 comments
Issue Description: Dynmap sample issue description. This description would include as much and as little detail necessary for us to understand the issue in its entirety.
- Dynmap Version: v3.3-beta-2
- Server Version: Purpur version git-Purpur-1473 (MC: 1.18.1)
- Pastebin of Configuration.txt: Pastebin
- Server Host (if applicable): Selfhosted
- Pastebin of crashlogs or other relevant logs: Minecraft log & MariaDB log
- Other Relevant Data/Screenshots: Some tiles aren't displayed in the WebUI but are just black.
- Steps to Replicate: Install Dynmap with MariaDB backend and literally wait.
I have tested this with a second minecraft installation and could replicate the same behaviour. I have not attached the logs/configs of that server, but am happy to if necessary.
[✔️] I have looked at all other issues and this is not a duplicate
[✔️] I have been able to replicate this
that will sure fail, by the looks of your latest.log, the connection is made but dynmap hasn't got the proper permissions to create tables or schemas, also purpur is not supported by dynmap as it makes changes to the paper core
I'm sorry nevermind - that is already set to mysql, as to be seen in the config file I attached originally. Should I try MariaDB instead or is that sure to fail?
set the storage option to mysql, which is compatible and interchangable with the mariadb connector, the mariadb connector doesn't ship with purpur.
Do you have a firewall between the MC server host and the MySQL server host, that could possibly be causing dropped packets?
There's no firewall present, no. This is running in a dockerized setup with a database container and two minecraft server containers. Networking is completly local.
@JurgenKuyper How did you determine lacking database permissions? From my point, it rather seems like an issue with the timeout/keepalive, though that's just an (arguably) educated guess.
Ultimately, the map works great for the most part and I can't seem to find anything indicating a permission issue.
Purpur not being supported I get, if I have the time I'll test with a paper version later.
@kosma all logs are attached in the original post - is there anything else you'd like me to provide? If so, please specify.
Marker file read error leads me to believe that either the mariadb host blocks your username, or as Kosma is saying, a connection issue, double check credentials. also, in the docker compose you need to add any ports you want to be open to the outside of the docker. so in this case that would be 3306 for the mariadb
Hmm, this is indeed quite puzzling. One thing you might try is adding the MariaDB JDBC driver to the server and trying to use the MariaDB option in the configuration file. I don't remember how to add a JAR on Paper though - you can try drag&drop it into libraries
folder, lib
folder, plugins
folder, or inside the Dynmap jar (using 7zip).
Marker file read error leads me to believe that either the mariadb host blocks your username, or as Kosma is saying, a connection issue, double check credentials. also, in the docker compose you need to add any ports you want to be open to the outside of the docker. so in this case that would be 3306 for the mariadb
For 99.99% it works. It cannot be an issue with the database credentials or network connection itslef per-se. The (by now very large) map is - with exceptions of very few tiles which I suspect to have been affected by this issue - displayed perfectly.
@kosma I will try using the mariadb connector and see how that goes!
@kosma I was, unfortunatly, unable to get it to accept my mariadb connector just by throwing it in the folders you mentioned. Do you by chance have anymore detail on where to put it into the dynmap-jar directly? I'm not at all familiar with anything regarding software development, unfortunatly.
I'm also facing the exact same thing with MySQL. Note that my MySQL server isn't affected by firewall. It's installed outside of Docker. And the minecraft server is being run outside of any docker containers
- Dynmap version: v3.3-beta-2
- Server version: Purpur version git-Purpur-"08dd6c7" (MC: 1.17.1)
- Pastebin of Configuration.txt: Pastebin
- Server host: Selfhosted
- Pastebin of crashlogs or other relevant logs: Minecraft log
- Steps to replicate: Install dynmap with MySQL as the db server and wait. For me, it takes a couple of hours in order for it to happen
I'm also facing the exact same thing with MySQL. Note that my MySQL server isn't affected by firewall. It's installed outside of Docker. And the minecraft server is being run outside of any docker containers
- Dynmap version: v3.3-beta-2
- Server version: Purpur version git-Purpur-"08dd6c7" (MC: 1.17.1)
- Pastebin of Configuration.txt: Pastebin
- Server host: Selfhosted
- Pastebin of crashlogs or other relevant logs: Minecraft log
- Steps to replicate: Install dynmap with MySQL as the db server and wait. For me, it takes a couple of hours in order for it to happen
Add autoReconnect=true to the flags of MySQL in dynmap configuration.txt
I'm also facing the exact same thing with MySQL. Note that my MySQL server isn't affected by firewall. It's installed outside of Docker. And the minecraft server is being run outside of any docker containers
- Dynmap version: v3.3-beta-2
- Server version: Purpur version git-Purpur-"08dd6c7" (MC: 1.17.1)
- Pastebin of Configuration.txt: Pastebin
- Server host: Selfhosted
- Pastebin of crashlogs or other relevant logs: Minecraft log
- Steps to replicate: Install dynmap with MySQL as the db server and wait. For me, it takes a couple of hours in order for it to happen
Add autoReconnect=true to the flags of MySQL in dynmap configuration.txt
oh thanks. if I want to set it, do I keep the "?" at the front?
I'm also facing the exact same thing with MySQL. Note that my MySQL server isn't affected by firewall. It's installed outside of Docker. And the minecraft server is being run outside of any docker containers
- Dynmap version: v3.3-beta-2
- Server version: Purpur version git-Purpur-"08dd6c7" (MC: 1.17.1)
- Pastebin of Configuration.txt: Pastebin
- Server host: Selfhosted
- Pastebin of crashlogs or other relevant logs: Minecraft log
- Steps to replicate: Install dynmap with MySQL as the db server and wait. For me, it takes a couple of hours in order for it to happen
Add autoReconnect=true to the flags of MySQL in dynmap configuration.txt
oh thanks. if I want to set it, do I keep the "?" at the front?
yes, like this:flags: "?allowReconnect=true&autoReconnect=true"
I already tried with those flags, didn't seem to change anything. If I have the time, I'll try with a different database - just to rule out that's not the issue.
However, since dynmap is the only client that's reporting issues, I somehow doubt it.
I've just stumbled upon an old annoying MySQL issue that could be the problem. MySQL treats 127.0.0.1
and localhost
differently - the former uses TCP/IP connection over loopback, the latter uses a UNIX domain socket in /var/run
. You might want to switch those around - use localhost
when running outside Docker, use hostnames/IP addresses when running inside Docker. Also remember you have to specify your GRANTs accordingly.
Nice catch Kosma.
I am going to go ahead and close this for now, if you find this problem to still exist, feel free to reopen it.
I've just stumbled upon an old annoying MySQL issue that could be the problem. MySQL treats
127.0.0.1
andlocalhost
differently - the former uses TCP/IP connection over loopback, the latter uses a UNIX domain socket in/var/run
. You might want to switch those around - uselocalhost
when running outside Docker, use hostnames/IP addresses when running inside Docker. Also remember you have to specify your GRANTs accordingly.
thanks. This worked for me, and the problem seems to be solved for the time being