Coder Social home page Coder Social logo

Comments (16)

SoKnight avatar SoKnight commented on June 23, 2024

It's can't send only 04.05 07:35:17 [Server] INFO [PEconomy] Loading PEconomy v2.0.2.
Your console should have more logs from PEconomy.. May be error logging is disabled?

PEconomy must send error message and stack trace if connection to database has been failed.

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

I may not have looked at the log correctly.

Here is what I have found on logs file after running it again with use-sqlite: false.

[14:10:23] [Server thread/INFO]: [PEconomy] Enabling PEconomy v2.0.2
[14:10:23] [Server thread/INFO]: [PEconomy] Currency 'Moedas' will be used for Vault economy.
[14:10:23] [Server thread/INFO]: [PEconomy] Loaded 2 currencies.
[14:10:23] [Server thread/ERROR]: [PEconomy] Failed to initialize database: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)
[14:10:23] [Server thread/WARN]: java.sql.SQLException: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:864)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4384)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1269)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2189)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:768)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
[14:10:23] [Server thread/WARN]: 	at sun.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source)
[14:10:23] [Server thread/WARN]: 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[14:10:23] [Server thread/WARN]: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)
[14:10:23] [Server thread/WARN]: 	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)
[14:10:23] [Server thread/WARN]: 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
[14:10:23] [Server thread/WARN]: 	at java.sql.DriverManager.getConnection(DriverManager.java:208)
[14:10:23] [Server thread/WARN]: 	at com.j256.ormlite.jdbc.JdbcConnectionSource.makeConnection(JdbcConnectionSource.java:266)
[14:10:23] [Server thread/WARN]: 	at com.j256.ormlite.jdbc.JdbcConnectionSource.getReadWriteConnection(JdbcConnectionSource.java:187)
[14:10:23] [Server thread/WARN]: 	at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:397)
[14:10:23] [Server thread/WARN]: 	at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:383)
[14:10:23] [Server thread/WARN]: 	at com.j256.ormlite.table.TableUtils.createTableIfNotExists(TableUtils.java:75)
[14:10:23] [Server thread/WARN]: 	at ru.soknight.peconomy.database.Database.<init>(Database.java:43)
[14:10:23] [Server thread/WARN]: 	at ru.soknight.peconomy.PEconomy.onEnable(PEconomy.java:44)
[14:10:23] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[14:10:23] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:364)
[14:10:23] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[14:10:23] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:470)
[14:10:23] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:384)
[14:10:23] [Server thread/WARN]: 	at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:488)
[14:10:23] [Server thread/WARN]: 	at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:298)
[14:10:23] [Server thread/WARN]: 	at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:895)
[14:10:23] [Server thread/WARN]: 	at java.lang.Thread.run(Thread.java:748)
[14:10:23] [Server thread/INFO]: [PEconomy] Disabling PEconomy v2.0.2

I'm not used to MySQL but the IP that shows on log, user 'rh5623'@'170.81.41.111' it's not the one I used in the config.

Also, I checked again the Host IP, name, user name and password. They match with the ones that I use on others plugins.

from peconomy.

SoKnight avatar SoKnight commented on June 23, 2024

Oh.. May be you try to use fake IP? The error message will be similar or not?

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

Not similar. Changed IP to a fake IP and got this:

04.05 16:10:33 [Server] INFO [PEconomy] Currency 'Moedas' will be used for Vault economy.
04.05 16:10:33 [Server] INFO [PEconomy] Loaded 2 currencies.
04.05 16:11:03 [Server] ERROR [PEconomy] Failed to initialize database: Communications link failure
04.05 16:11:03 [Server] INFO The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
04.05 16:11:03 [Server] WARN com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
04.05 16:11:03 [Server] WARN The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
04.05 16:11:03 [Server] WARN at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
04.05 16:11:03 [Server] WARN at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
04.05 16:11:03 [Server] WARN at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
04.05 16:11:03 [Server] WARN at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2187)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:768)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
04.05 16:11:03 [Server] WARN at sun.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source)
04.05 16:11:03 [Server] WARN at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
04.05 16:11:03 [Server] WARN at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)
04.05 16:11:03 [Server] WARN at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)
04.05 16:11:03 [Server] WARN at java.sql.DriverManager.getConnection(DriverManager.java:664)
04.05 16:11:03 [Server] WARN at java.sql.DriverManager.getConnection(DriverManager.java:208)
04.05 16:11:03 [Server] WARN at com.j256.ormlite.jdbc.JdbcConnectionSource.makeConnection(JdbcConnectionSource.java:266)
04.05 16:11:03 [Server] WARN at com.j256.ormlite.jdbc.JdbcConnectionSource.getReadWriteConnection(JdbcConnectionSource.java:187)
04.05 16:11:03 [Server] WARN at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:397)
04.05 16:11:03 [Server] WARN at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:383)
04.05 16:11:05 [Multicraft] Skipped 34 lines due to rate limit (30/s)

from peconomy.

SoKnight avatar SoKnight commented on June 23, 2024

Try to set ' around IP address and change the name of database (database.name) to another string (not similar with user).

from peconomy.

SoKnight avatar SoKnight commented on June 23, 2024

Probably, this problem is on your side, sorry. I'm looked at my database connector code, but I didn't find anything.

from peconomy.

voidpointer0x00 avatar voidpointer0x00 commented on June 23, 2024

[14:10:23] [Server thread/ERROR]: [PEconomy] Failed to initialize database: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)
[14:10:23] [Server thread/WARN]: java.sql.SQLException: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)

To sum up, you have an invalid database connection URI. Try to connect It manually using your terminal mysql -u USERNAME -h HOST DATABASE -p or any other service. Then, if it's correct, insert final connection credentials into plugin configuration and retry.

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

So, after setting ' around IP and changed the database name to peconomy, this is the log:

04.05 16:23:24 [Server] INFO [PEconomy] Enabling PEconomy v2.0.2
04.05 16:23:24 [Server] INFO [PEconomy] Currency 'Moedas' will be used for Vault economy.
04.05 16:23:24 [Server] INFO [PEconomy] Loaded 2 currencies.
04.05 16:23:24 [Server] ERROR [PEconomy] Failed to initialize database: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)
04.05 16:23:24 [Server] WARN java.sql.SQLException: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)
04.05 16:23:24 [Server] WARN at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
04.05 16:23:24 [Server] WARN at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
04.05 16:23:24 [Server] WARN at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
04.05 16:23:25 [Multicraft] Skipped 38 lines due to rate limit (30/s)

The strangest (oddest?) part to me is that nLogin and CoreProtect are connected and working with MySQL.

To sum up, you have an invalid database connection URI. Try to connect It manually using your terminal mysql -u USERNAME -h HOST DATABASE -p or any other service. Then, if it's correct, insert final connection credentials into plugin configuration and retry.

I'll try to figure out how to do this, as I have no clues. As soon I get it done, or not, I'll be back here.

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

So! I discovered how to connect to the MySQL, and made a SELECT just to test it.

It went all good. Still not able to connect from PEconomy thought.

image

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

I Would like to address one more thing. I finished installing another plugin that uses MySQL (Statz). And it's working properly as far as I can see.

So, maybe it's a problem with permissions from my side, because I don't have full permissions in MySQL. But, probably, there's a workaround. Besides that, I experienced other Servers Host Providers that are almost the same, not allowing full control over the Databases.

from peconomy.

SoKnight avatar SoKnight commented on June 23, 2024

You connected to 170.81.41.76, not a 111... May be you should set this correct address into PEconomy config file?

from peconomy.

voidpointer0x00 avatar voidpointer0x00 commented on June 23, 2024

I've just tried to install the plugin with MySQL (MariaDB locally) by myself and it works perfectly, so I suppose these are troubles on your side. Recheck your MySQL credentials and user permissions.

I have a local MariaDB service with user 'test'@'localhost' with no password and full access to the 'test' database, so my configuration section looks like this:

database:
  use-sqlite: false
  host: localhost
  port: 3306
  name: test
  user: test
  password: ''
  file: database.db

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

You connected to 170.81.41.76, not a 111... May be you should set this correct address into PEconomy config file?

Actually, I've set the PEconomy config file since from the begging to connect to 170.81.41.76

database:
  # Should plugin use MySQL database as data storage?
  # Specify 'true' to use SQLite or 'false' to use MySQL
  use-sqlite: false

  # MySQL configuration
  host: 170.81.41.76
  port: 3306
  name: rh5623
  user: rh5623
  password: **********

So I went all the way from the beginning, fresh started the server. The plugin seems to work fine until switched to MySQL.
Still unable to connect.

[PEconomy] Enabling PEconomy v2.0.2
05.05 16:49:36 [Server] INFO [PEconomy] Loaded 2 currencies.
05.05 16:49:36 [Server] ERROR [PEconomy] Failed to initialize database: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)
05.05 16:49:36 [Server] WARN java.sql.SQLException: Access denied for user 'rh5623'@'170.81.41.111' (using password: YES)

I also started a ticket with my server provider, they're completely useless. Good to know that though. I'm making all the configs from the server and problably will change my provider as for production.

Just to add, I've tried to connect direclty througth MySQL WorkBench 8.0 and was unable also. The only way was using MySQL Query Browser due to a bad handshake error. Solution for direct connect..

I'll stick to using SQLite by now, until trying again in another host.

from peconomy.

voidpointer0x00 avatar voidpointer0x00 commented on June 23, 2024

By the way, is your database named 'rh5623' in MySQL? Just I've noticed that the database.name yaml path is a bit misleading.

At this point, you can contact me on SpigotMC (I have the same nickname on there) and I'll create a database for you on my German host (at least for this month) (totally free :D)

from peconomy.

Zaikoski avatar Zaikoski commented on June 23, 2024

By the way, is your database named 'rh5623' in MySQL?

Yes, it is!
image

This Host "REISHOST" is a popular provider here in Brazil. They use the same "key" of the user account for almost anything they need. So my account is rh5623. The database name is the same, the user name is the same. Kinda weird.

I have only privileges creating tables inside this database. It's messy all the tables mixed.

At this point, you can contact me on SpigotMC (I have the same nickname on there) and I'll create a database for you on my German host (at least for this month) (totally free :D)

OMG! This is really kind! Thank you! I'll be in touch if needed. Thanks again!

from peconomy.

SoKnight avatar SoKnight commented on June 23, 2024

Okay. I think that I should to close this issue.
If the problem persists, continue in the new issue. Good luck!

from peconomy.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.