XF 1.2 Fatal Database error :-(

Divinum Fiat

Well-known member
Does anyone know what this means?

Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/corefree/public_html/community/library/Dark/AzuCloud/EventListener/TemplateHook.php on line 0

This just showed up on a white screen when I try going to my forum here. After 5 minutes I refreshed the page and now it simply says "An unexpected database error occurred. Please try again later."

?? anyone
 
Does anyone know what this means?

Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/corefree/public_html/community/library/Dark/AzuCloud/EventListener/TemplateHook.php on line 0

This just showed up on a white screen when I try going to my forum here. After 5 minutes I refreshed the page and now it simply says "An unexpected database error occurred. Please try again later."

?? anyone

The first message error points to a mod, AzuCloud. If you have such a mod then try to disable it and see if the error goes away.

Regarding the second error, can you view the page source and copy/paste here the full error?
 
When you get that generic message, there is actually a more detailed error hidden in the source of the page...

The specific error you're receiving is this:

<!-- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) -->

You should contact your host. They will be able to help you with that.
 
Borbole, now it only says "An unexpected error occurred. Please try again later" and when I right click on "view page source" that's all it says: "An unexpected error occurred. Please try again later" - nothing more.
 
here is what they said yesterday:

Your VPS container is having issue with processes reserving memory and other processes cannot be started because the memory is not available. When this memory starvation occurs, the container will kill off the most memory intensive process in order to prevent a hard crash. Your container has also abused CPU cycles on the node and was placed into a cooldown state so that your container would not affect the other containers on the node.

I complained saying that plugins should not do that. They responded this morning with this:

I had a look at your server and could see that during the times it was down, there had been a brute force attack on your WordPress login. The reason why this particular type of brute force attack causes such load on your server is because the login script is running and querying your database each time a password is tried. This happens as fast as they can possibly scan, so it causes your server to become quite loaded and unavailable for normal tasks.

Someone is having a hay day trying to get in, once again. Ah, if only those really smart people would use their technological talents to do good instead of find ways to mess with people's work.
 
It doesn't look like it. I know I get emails from the server on a daily basis that brute force attacks are being made on the vps server. I usually black list those IPs. But it doesn't look like there are any on the xf admin panel. I'm actually not even sure if I could tell if any brute force attacks were made on xf. o_O
 
Last edited:
It doesn't look like it. I know I get emails from the server on a daily basis that brute force attacks are being made on the vps server. I usually black list those IPs. But it doesn't look like there are any on the xf admin panel. I'm actually not even sure if I could tell if any brute force attacks were made on xf. o_O
You run fail2ban by chance? If so, check out http://wordpress.org/plugins/wp-fail2ban/

EDIT:

Even easier, if you use fail2ban, in your jail.local place
Code:
[apache-wp-login]
enabled = true
port    = http,https
action  = iptables[name=WP, port=http, protocol=tcp]
filter  = apache-wp-login
logpath = /path/to/your/wpress/access_log
maxretry = 3

and in your /etc/fail2ban/filter.d create a file called apache-wp-login and place
Code:
# Fail2Ban configuration file
[Definition]
failregex = <HOST>.*] "POST /wp-login.php
ignoreregex =
in it. Restart fail2ban and you should start getting those IP's blocked (dropped) after 3 failed attempts. I just set this up on my VPS that I run my blogs on.
 
Last edited:
Back
Top Bottom