MyBB Community Forums

Full Version: Service unavailable after upgrading to 1.6.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello.

This morning I duly applied the 1.6.3 patch to my 1.6.2 MyBB installation, running within IIS 7.5 on Windows Server 2008 R2 Standard Edition. I followed the update process and everything seemed to go smoothly, but alas the server is now reporting a HTTP 503 error when I try and access the forum.

The forum in question is: http://forum.redwarsoc.com/

I've uploaded a test php fle to the website, and that executes correctly, as do all the others sites hosted by the box. Any ideas? Is there some MyBB error logging I can refer to?

cheers
v.f.
503 is a server error and I am not aware of any issues in 1.6.3 that would cause that. Can you try restarting your IIS services?

You could check the IIS logs for any errors logged there
Hi there, and thanks for the reply.

I've tried restarting both the individual website and web server itself (via IISReset). I've also looked in the IIS logs and Windows Event Log, but nothing has been reported there.

I'm wondering whether applying the upgrade has reset some file-access permissions somewhere?
Well since this is a server-side issue theres not much we can do. There isn't any addition in 1.6.3 that would cause this unless the code in 1.6.3 is conflicting with something else on your server.

You'll probably need to comb through all of IIS logs, including the application pool logs to see if anything is logged there.

Other than that, heres a few things that I think you can check:

- Check permissions on the files/folders to make sure they are accessible to the IIS process
- Did you manually edit any of the files?
- Is there access to PHP and MySQL from IIS
- Are all application pools up and running?
- Are there any .htaccess files in your files? (I know IIS does not use htaccess files but its known to have some problems with the dot naming .htaccess)
(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]Well since this is a server-side issue theres not much we can do. There isn't any addition in 1.6.3 that would cause this unless the code in 1.6.3 is conflicting with something else on your server.

Yep, I can appreciate that it's the web server rather than MyBB reporting the error - I'm just a bit perplexed as it's a "standard" MyBB installation, and I followed the upgrade procedure to the letter.

(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]You'll probably need to comb through all of IIS logs, including the application pool logs to see if anything is logged there.

Nothing so far.

(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]- Check permissions on the files/folders to make sure they are accessible to the IIS process

That's my current thinking.

(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]- Did you manually edit any of the files?

Nope.

(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]- Is there access to PHP and MySQL from IIS

Yep, I created a test php file, and that works fine.

(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]- Are all application pools up and running?

Yep.

(2011-04-22, 09:20 AM)- G33K - Wrote: [ -> ]- Are there any .htaccess files in your files? (I know IIS does not use htaccess files but its known to have some problems with the dot naming .htaccess)

Can't see any.

I have a hunch it's a file permissions issue - I'll keep you posted.

Solved it by stepping through the PHP, and tracked down the issue to line 96 of forum_root/install/init.php ...

// Trigger an error if the installation directory exists
if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))
{
	$mybb->trigger_generic_error("install_directory");
}

Basically the problem was that in accordance with the upgrade instructions I'd deleted the 'lock' file located in forum_root/install/, but not the install directory itself. I wasn't aware of seeing any instructions to remove this, but it's not beyond the realms of possibility that I missed it. Is it a known requirement to have to manually remove this directory, or is it something that the upgrade process should do automagically (but perhaps failed due to insufficient file permissions)?
It doesn't matter if you delete it or lock it. You delete the lock folder to run the upgrade and it's added back afterwards, then you either have the lock file so the install folder can't be used, or you delete the install folder. There's no reason that code should be causing any sorts of errors, it's simply checking whether a folder and file exists.
Matt

Thanks for clarifying the behaviour of the install/lock directory - I think I've twigged that I probably deleted the lock file after the upgrade had run, and that's what triggered the problem.

However, after the upgrade, with the install folder present but no lock file, any attempt to access the forum was generating a 503 "service is unavailable" message on my system. The actual check for the folder & file wasn't triggering it directly, rather the call to trigger_generic_error invoked if the check failed. After deleting the install folder everything was fine. Just to be sure I created an install directory again, and got the same result as before.

If the install directory was present with no lock file, what should I expect to see? Perhaps there is a configuration issue on my system causing a problem with trigger_generic_error?
(2011-04-22, 05:33 PM)voodooflux Wrote: [ -> ]The actual check for the folder & file wasn't triggering it directly, rather the call to trigger_generic_error invoked if the check failed.

(2011-04-22, 05:33 PM)voodooflux Wrote: [ -> ]If the install directory was present with no lock file, what should I expect to see? Perhaps there is a configuration issue on my system causing a problem with trigger_generic_error?

You should just see a friendly error page saying to remove or lock the install folder. There's no 'configuration' that would affect this function, there's nothing weird and wonderful about trigger_generic_error, it's just a function that outputs an error message. Rename the config.php file in the ./inc/ folder to _config.php, try and access your forum now, what does it do then?? This too should show a friendly error.
(2011-04-22, 06:36 PM)MattRogowski Wrote: [ -> ]Rename the config.php file in the ./inc/ folder to _config.php, try and access your forum now, what does it do then?? This too should show a friendly error.

Again a 503 HTTP response with a message of "The service is unavailable".

There must be some configuration "nuance" or installation issue on my system. I'll step through the code when I get chance and see if I can isolate the exact cause of the problem, if only to satisfy my curiosity.

The code it runs for trigger_generic_error is very basic. trigger_generic_error is basically a switch statement that sets the message and the error code, and then it calls the error function from class_error.php. It may be that it's having trouble logging or emailing the error if it's set to do that, but without knowing what's in your error log we can't really tell; there's nothing special or unusual in the code it's running though.
Pages: 1 2