Forum archive
LAMP Appliance randomly stops serving user pages
Hi everyone.
I'm running the Turnkey LAMP appliance version 12.1 (it needs to be 32-bit since my development machine is still running Windows XP). Most of the time the appliance works perfectly. But every once in a while - seemingly at random - Apache stops serving my development web pages.
The administration pages (Webmin, PhpMyAdmin, Shell) still work normally, but the browser shows a blank window without errors for my pages. The browser console shows a Network Error: 404 message. Apache's 404 page does not display.
At first I thought it may be interference from MS VirtualPC, in which I had my earlier development VMs. But the problem persists since I've stopped using it.
Restarting Apache, the VM, VirtualBox and VBoxSVC has no effect. Only a complete restart of the host seems to work. UPDATE: very occasionally restarting the VM does fix it - but it seems to be as random as the initial failure.
I've verified that VirtualBox's shared folder (where my source files are) is still working. I can find no errors in any log files of Windows, VirtualBox, Apache or PHP. Or in any of the logs accessible through Webmin - with one exception. During the error condition /var/webmin/miniserv.error receives one or more instances of the following line for each page load attempt:
[07/Jan/2014:21:49:17 +0000] [10.0.2.2] Bad Request : This web server is running in SSL mode. Try the URL <a href='https://10.0.2.15:12321/'>https://10.0.2.15:12321/</a> instead.<br>
The page I'm loading is http://design3.dev/ which is mapped to localhost. The LAMP control panel, http://192.168.56.1:80, behaves the same way during the error condition.
VirtualBox's log claims NAT is mapping that to http://10.0.2.15:80 (which should be the default for user web pages). The address 10.0.2.2 is not one I recognise from any configuration files or documentation I've looked through.
Altering the SSL options in the virtual server has no effect. Adding https to the URL results in a "Secure Connection Failed" error in the browser.
Basically, I'm out of my depth. I've checked everything that looks relevant but can't figure out what specific element is failing. Can anyone advise me on what I can do from here? What can I test? Even if I only knew what service or setting to reset to restore operations, I'd be happy.
Thanks in advance.
Thanks.
I managed to get it working with Host Only networking instead of NAT. (I had a bit of trouble getting Bridged to work - and didn't really want the appliance exposed to a wider network anyway).
It's been a few days now with no sign of problems.
Since you mentioned a race condition I've been rethinking the context of the failures. It's possible they occured more frequently if I started the appliance later in the day - which would support the notion of something else grabbing the port first. But I can't honestly be sure.
Definitely can't see anything noteworthy during a review of the logs. A startup followed soon by a shutdown marks where it fails to serve pages. But apache doesn't seem to "see" anything wrong at that time.
Unfortunately I don't have the time or skills right now to chase this further - but at some stage I would like to know what the actual problem was. For now I'm glad I can focus on coding again.
Thanks again for the advice.