Hi all,
I am upgrading a server to a brand new CentOS 5 box with a fresh install of virtualmin.
On setting up my first virtual server today, I copied the site over from the old server. When I browsed to it on the new server, it hung for 30 seconds or so and then threw a 500 Server error.
I tracked the problem to a few lines of code in which a MySQL connect took place. I placed the identical code on another CentOS box, also running Virtualmin, and it runs fine. On the problem box, a 500 Server error every time.
Thinking that a restart is always a good in these situations, I rebooted the problem box. Now, I cannot access Webmin or Virtualmin at all, i.e. when I browse to https://xx.xxx.xxx.xx:10000/ I get a whole lot of nothing before Safari's "Failed to open page" standard message.
I guess I need to solve problem 2 before I can address problem 1, so can anyone offer any help as to where I can look for the reasons why I can't now see Webmin at all?
Many thanks in advance,
Adam
I should add that Apache is running as I can see the web site of a second virtual server I created when trying to solve problem 1.
Howdy,
I tracked the problem to a few lines of code in which a MySQL connect took place. I placed the identical code on another CentOS box, also running Virtualmin, and it runs fine. On the problem box, a 500 Server error every time.
For that particular problem -- you may want to make sure that PHP's MySQL module is installed, which can be done with "yum install php-mysql". If that's not it, take a look in the error logs located in $HOME/logs/error_log, that should offer some insight into the issue.
Now, I cannot access Webmin or Virtualmin at all, i.e. when I browse to https://xx.xxx.xxx.xx:10000/ I get a whole lot of nothing before Safari's "Failed to open page" standard message.
The first thing to do would be to make sure Webmin is indeed listening for connections... you can do that with this command:
netstat -an | grep :10000
If it is, then it sounds like something is blocking your access to it... a firewall perhaps.
If it's not, you may want to make sure it's started, which you can do with this:
/etc/init.d/webmin restart
Also, the Webmin error log may help, you can see that in /var/webmin/miniserv.error.
-Eric
Thanks Eric,
On the first point, the output from netstat -an | grep :10000 is:
On the second, runnning /etc/init.d/webmin restart produces:
However, I still can't see a log in screen.
The excerpt from /var/webmin/miniserv.error looks like this:
I know the PAM errors are to be ignored. Do you see anything that would allow to help any further?
Cheers,
Adam
OK - by clearing out iptables and restarting the firewall I was able to connect. Problem 2 down, now back to problem 1...
Yeah, everything you have there looks good.
Are you by chance running a firewall on your server? You can determine that with this command:
iptables -L -n
Eric,
We cross posted there. Webmin back up and running now.
OK, php-mysql is definitely installed and the latest version. The virtual server error log contains:
Any ideas?
It looks like it's taking your script too long to run for some reason, and it's timing out. I'm not sure why that would be.
One thing you could always try is to go into Server Configuration -> Website Options, and set "PHP Execution Mode" to CGI. CGI defaults to a higher timeout, so you could at least see if it'll run that way.
-Eric
Well, having failed to solve the problem, I had my provider rebuild the server and then I reinstalled Virtualmin and recreated the virtual server and re-uploaded my site. Same problem.
I think the problem is this: the problem php script is attempting to connect to a MySQL server on a different box with the same provider. It looks as though servers on the same internal network are prevented from talking to each other, unless I pay GBP£140 a year for my own little private LAN.
I need to do some more testing to be sure I'm right about this, but it looks like the problem is nothing to do with Virtualmin.
After the re-installation I am left with a System Hostname issue, but I'll post about that separately.
thank you.. that was driving me mad.. disabling the firewall has allowed me back in.