Issue with phpBB3 authenticator

Ice/DBus, Web-Interfaces, Management tools

Issue with phpBB3 authenticator

Postby tomdarkness » Fri May 21, 2010 1:56 am

Hey,

Sometimes users are getting "Wrong Password for User" when trying to connect to the mumble server running with the phpBB3 authenticator despite actually having the right password. In the phpBB3 authenticator's log the following message is displayed for that time:

Code: Select all
2010-05-21 02:31:26,090 ERROR Database operational error 2006: MySQL server has gone away
2010-05-21 02:31:26,090 DEBUG Invalidate connection to database for thread 1158166848


Whats "MySQL server has gone away" suppose to mean and how can the problem be solved? This issue normally occurs for the first person to login after no-one else has logged into the mumble server for about 30mins or so.

Thanks,

Tom
tomdarkness
 
Posts: 14
Joined: Sun Apr 11, 2010 3:33 pm

Re: Issue with phpBB3 authenticator

Postby tomdarkness » Sat May 29, 2010 11:18 pm

Funnily enough I actually encounted this when I was writing a PHP script that was designed to run in the background for a long time, crunching it's way through some data from a job queue. I found that if I attempted to run a query on what PHP thought to be an active MySQL server after not doing anything with the MySQL connection for quite some time because there was nothing in the job queue I'd get the same error. Seems that, understandably, MySQL closes the connection after a timeout period (It is actually defined by wait_timeout which is set to 1000 seconds on my server) and I simply fixed this by simply using a PHP function that allowed me to ping the connection to see if it was active or not (If not, reconnect) before running any queries. However, what appears to happen in the phpBB3 authenticator is that it just encounters this same problem and decides it can't authenticate the user. Since I don't know any Python can it be fixed (Since I'd go ahead and say it is a bug like I considered the same issue I was having with my script a bug in my script) so that the script does not try a run a query on a inactive MySQL connection or at least attempt to reconnect in some way rather than just giving up on authenticating the user until next time it gets an authentication request?
tomdarkness
 
Posts: 14
Joined: Sun Apr 11, 2010 3:33 pm

Re: Issue with phpBB3 authenticator

Postby hacst » Sun May 30, 2010 12:39 am

Yeah. You are right. The script isn't handling the connection timeout gracefully. The script does actually reconnect but the current operation will fail anyway. I'll fix this once I find the time. Sorry for the inconvenience.
hacst
Team member
Team member
 
Posts: 339
Joined: Wed Sep 23, 2009 4:28 pm

Re: Issue with phpBB3 authenticator

Postby hacst » Sun May 30, 2010 2:05 pm

I pushed an update that should solve the issues. It is completely untested though (I don't have a test environment for the authenticator right now) so please report back whether this actually works.
hacst
Team member
Team member
 
Posts: 339
Joined: Wed Sep 23, 2009 4:28 pm

Re: Issue with phpBB3 authenticator

Postby tomdarkness » Sun Jun 06, 2010 8:17 pm

Many thanks, that seems to have fixed the issue.
tomdarkness
 
Posts: 14
Joined: Sun Apr 11, 2010 3:33 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron