Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQLLoadPlayerTask: Task crashed #74

Open
aquaminer opened this issue Mar 31, 2017 · 19 comments
Open

MySQLLoadPlayerTask: Task crashed #74

aquaminer opened this issue Mar 31, 2017 · 19 comments

Comments

@aquaminer
Copy link

@SOF3, @PEMapModder A very interesting bug, similar to #73.
It is displayed for the reason of disconnecting via timeout.

Warning: Error while sending QUERY packet. PID=18336 in /root/*******/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLSavePlayerTask.php on line 38
[Tesseract] [18:25:38] INFO> opkiler22789 вышел из игры
[Tesseract] [18:25:38] INFO> opkiler22789[/95.46.157.19:19132] отключился: timeout

[Tesseract] [18:26:07] CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[Tesseract] [18:26:07] INFO> opkiler22789[/95.46.157.19:19132] вошел с id сущности -6712286032986211513 на (2, world, 256, 65)
[Tesseract] [18:26:07] CRITICAL> Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed

Accordingly, authorization is lost

@aquaminer
Copy link
Author

Situations are even more interesting ...
It's enough for one player to disconnect through timeout. And all the rest will pass without authorization

[Tesseract] [18:48:56] CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[Tesseract] [18:48:56] INFO> phx[/95.46.157.19:1024] вошел с id сущности 4709938578854418348 на (2, world, 215.7194, 64)
[Tesseract] [18:48:56] CRITICAL> Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
[Tesseract] [18:48:58] INFO> [EssentialsPE] Running
[Tesseract] [18:48:58] INFO> phx присоединился к игре
[Tesseract] [18:49:26] INFO> phx вышел из игры
[Tesseract] [18:49:26] INFO> phx[/95.46.157.19:1024] отключился: client disconnect
[Tesseract] [18:49:28] INFO> opkiler22789 вышел из игры
[Tesseract] [18:49:28] INFO> opkiler22789[/95.46.157.19:19132] отключился: timeout
[Tesseract] [18:49:34] CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[Tesseract] [18:49:34] INFO> phx[/95.46.157.19:1024] вошел с id сущности 4709938578854418348 на (3, world, 215.7194, 64)
[Tesseract] [18:49:34] CRITICAL> Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed

@Matthww
Copy link

Matthww commented Apr 19, 2017

Maybe it's because you are using Tesseract

@aquaminer
Copy link
Author

@Matthww, What do you propose to put then? It's not difficult for me to test

@SOF3
Copy link
Collaborator

SOF3 commented Apr 19, 2017

This issue is valid. HereAuth is responsible for checking whether the query succeeded and outputting the error. Nothing to do with the server software.

@xXNiceYT
Copy link

HereAuth working fine for me

@SOF3
Copy link
Collaborator

SOF3 commented Apr 20, 2017

This issue happens when there is something wrong with your database connection, e.g. permissions, wrong login config, etc. HereAuth is not responsible for actually fixing such problems, but it is responsible for gracefully reporting such problems to the user.

@Muqsit
Copy link

Muqsit commented Apr 20, 2017

@SOF3 ...or not. MySQLiResult returns boolean when the result does not exist.

@aquaminer
Copy link
Author

@Muqsit, @SOF3, I can provide values ​​in the config

@SOF3
Copy link
Collaborator

SOF3 commented Apr 21, 2017

@musqit it must be an error. A SELECT query never returns a true, and only returns a false when there is an error.

@SOF3
Copy link
Collaborator

SOF3 commented Apr 21, 2017

How many times have I spelt @Muqsit wrongly as @musqit :P

@Muqsit
Copy link

Muqsit commented Apr 21, 2017

@SOF3 True (that's what I meant).
If this error can be produced in one task, it can be produced elsewhere too. For example, MySQLRenamePlayerTask - it has the same structuring and no fallback as to if the result returns false.

@SOF3
Copy link
Collaborator

SOF3 commented Apr 21, 2017

A simple although not-too-graceful way to resolve this issue (but not your real issue) is to add a line ``if($result === false){ echo $db->error; $this->setResult(false); return; }`. It will not stop you from crashing, but it will at least display an error message for you.

@aquaminer
Copy link
Author

aquaminer commented May 5, 2017

Decision:
Repeat every 20-30 seconds:

public function fixdb(){
            $sql = $this->db()->query("SELECT * FROM `table` LIMIT 1");
            $data = $sql->fetch_assoc();
            $sql->free();
        }

Thus stop waiting for the mysql server
https://i.stack.imgur.com/UkZTG.gif

@SOF3
Copy link
Collaborator

SOF3 commented May 5, 2017

Why not mysqli::ping()?

Not really relevant to this issue anyway?

@aquaminer
Copy link
Author

aquaminer commented May 5, 2017

@SOF3 This is her decision 😐. The solution is not one of the best, but I have not found another

@Muqsit
Copy link

Muqsit commented May 12, 2017

A little update.
(This was my fault: I linked the plugin (.phar) files of the main server to a second server (both; the main and the second server were running at the same time). It was solved after copying the .phar files rather than linking them).

Warning: mysqli::query(): MySQL server has gone away in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39

Warning: mysqli::query(): Error reading result set's header in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39
[12:33:13] [Asynchronous Worker #2 thread/CRITICAL]: Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[12:33:13] [Server thread/CRITICAL]: Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
[12:33:15] [Asynchronous Worker #2 thread/CRITICAL]: Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[12:33:15] [Server thread/CRITICAL]: Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
[12:33:16] [Server thread/NOTICE]: Deleted 0 trash worlds.

Warning: mysqli::query(): MySQL server has gone away in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39

Warning: mysqli::query(): Error reading result set's header in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39
[12:34:20] [Asynchronous Worker #1 thread/CRITICAL]: Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[12:34:20] [Server thread/CRITICAL]: Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed

za

@SOF3
Copy link
Collaborator

SOF3 commented Jun 13, 2017

What, linking?

@Muqsit
Copy link

Muqsit commented Jun 13, 2017

@SOF3 Yeah, linking (ln -s) one .phar file into every server's plugin folder.

@SOF3
Copy link
Collaborator

SOF3 commented Jun 13, 2017

I suspect that you're actually using different versions of HereAuth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants