Jump to content

Can't connect to MySQL server on '(MySQL IP)' (10061): Authentication failed


gijs007

Recommended Posts

I'm having random MySQL Authentication failed errors in my TCadmin monitor and service manager on my master server for the past few months.

 

Luis told me it was an issue with my MySQL server, but this doesn't seem to be the case as I've already done the following:

  • Switch from MariaDB 10.1.22 to MySQL 5.7.18
  • Using default configuration of MySQL/MariaDB
  • Use a different node to host the MySQL server

Additionally the remotes can connect normally to this MySQL server with the same username and password. This issue is limited to the master server.

 

What happens? The control panel website on the master is unreliable. (Always at around the same time in the night for a couple of minutes at 04:30 and 04:50 )

The TCadmin monitor has to be restarted at least once a week to fix errors.

Since a few days the service manager is also affected, it starts up but crashes within 2-3 minutes. :mad:

 

We always see the following MySQL error:

System.Exception: Error connecting to MySQL server. Retrying in 2 seconds (9 of 10). ---> Can't connect to MySQL server on 'mysql.elitegameservers.net' (10061): Authentication failed.
  --- End of inner exception stack trace ---
  at System.Environment.get_StackTrace()
  at TCAdmin.DatabaseProviders.MySql.MySqlManager.?()
  at TCAdmin.DatabaseProviders.MySql.MySqlManager.Connect()
  at TCAdmin.SDK.Database.DatabaseManager.Execute(String sql)
  at TCAdmin.DatabaseProviders.MySql.MySqlManager.Execute(String sql)
  at TCAdmin.SDK.Objects.ObjectBase.Find()
  at TCAdmin.SDK.Objects.Server.Find()
  at TCAdmin.SDK.Objects.Server..ctor(Int32 serverId)
  at TCAdmin.SDK.MonitorConfiguration.get_ThisServer()
  at TCAdmin.SDK.UnhandledExceptionManager.?(Boolean ?)
  at TCAdmin.SDK.UnhandledExceptionManager.ExceptionToString(Exception objException)
  at TCAdmin.SDK.UnhandledExceptionManager.UnhandledExceptionHandler(Object sender, UnhandledExceptionEventArgs e)
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
  at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
  at System.IO.FileStream.Flush()
  at IronPython.Runtime.PythonTextWriter.Flush()
  at IronPython.Runtime.PythonFile.FlushWorker()
  at IronPython.Runtime.PythonFile.Dispose(Boolean disposing)
  at IronPython.Runtime.PythonFile.Finalize()
TCAdmin.SDK.Database.DatabaseException: Can't connect to MySQL server on '(MySQL IP)' (10061): Authentication failed. ---> Can't connect to MySQL server on 'mysql.elitegameservers.net' (10061): Authentication failed.
  --- End of inner exception stack trace ---
  at TCAdmin.DatabaseProviders.MySql.MySqlManager.?()
  at TCAdmin.DatabaseProviders.MySql.MySqlManager.Connect()
  at TCAdmin.SDK.Database.DatabaseManager.Execute(String sql)
  at TCAdmin.DatabaseProviders.MySql.MySqlManager.Execute(String sql)
  at TCAdmin.SDK.Objects.ObjectBase.Find()
  at TCAdmin.SDK.Objects.Server.Find()
  at TCAdmin.SDK.Objects.Server..ctor(Int32 serverId)
  at TCAdmin.SDK.MonitorConfiguration.get_ThisServer()
  at TCAdmin.SDK.UnhandledExceptionManager.?(Boolean ?)
  at TCAdmin.SDK.UnhandledExceptionManager.ExceptionToString(Exception objException)
  at TCAdmin.SDK.UnhandledExceptionManager.UnhandledExceptionHandler(Object sender, UnhandledExceptionEventArgs e)

This error would indicate that the password or username is wrong, but this isn't the case. TCadmin is able to connect to this database with the same credentials, this error shows up randomly.

 

I really need to get it solved, but unfortunately Luis doesn't respond to these tickets :mad:

Has anyone experienced similar issues or know a solution?

 

I'm considering reinstalling/reconfiguring TCadmin, but I'm not sure how to do this on the master while keeping all the gameservers.

Link to comment
Share on other sites

Are you hosting the control panel on Windows? If it's always happening around the same time, it could be Windows Update. Unlikely, but worth checking.

 

P.S. if you're going to omit your MySQL server IP, you might also want to omit the hostname.

Link to comment
Share on other sites

Are you hosting the control panel on Windows? If it's always happening around the same time, it could be Windows Update. Unlikely, but worth checking.

 

P.S. if you're going to omit your MySQL server IP, you might also want to omit the hostname.

Windows update doesn't restart the server twice every night ;)

 

I used the local host IP 127.0.0.1

Later I switched to a domain name by using an external MySQL server, but this didn't resolve the problem.

Link to comment
Share on other sites

Apparently the random errors are caused by the "Protocol=SSL" parameter for database connections. But this only causes problems on the master.

 

According to Luis the master server doesn't need SSL for the MySQL connection. If the MySQL server ran on the same server and connected trough localhost there is indeed not really a need for SSL, however it doesn't run on the localhost at the moment.

 

The primary issue is that we can't enforce SSL for the MySQL user account, which is something which we wanted to enforce to harden the security of the backend.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 29 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use