Can't access Webmin / Virtualmin at all

10 posts / 0 new
Last post
#1 Fri, 02/11/2011 - 10:05
loyalwhite

Can't access Webmin / Virtualmin at all

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

Fri, 02/11/2011 - 10:08
loyalwhite

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.

Fri, 02/11/2011 - 10:12
andreychek

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

Fri, 02/11/2011 - 10:21
loyalwhite

Thanks Eric,

On the first point, the output from netstat -an | grep :10000 is:

tcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN      
udp        0      0 0.0.0.0:10000               0.0.0.0:*                               

On the second, runnning /etc/init.d/webmin restart produces:

Stopping Webmin server in /usr/libexec/webmin
Starting Webmin server in /usr/libexec/webmin

However, I still can't see a log in screen.

The excerpt from /var/webmin/miniserv.error looks like this:

[11/Feb/2011:16:21:22 +0000] miniserv.pl started
[11/Feb/2011:16:21:22 +0000] Perl module Authen::PAM needed for PAM is not installed : Can't locate Authen/PAM.pm in @INC (@INC contains: /usr/libexec/webmin /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 10) line 1.
BEGIN failed--compilation aborted at (eval 10) line 1.

I know the PAM errors are to be ignored. Do you see anything that would allow to help any further?

Cheers,

Adam

Fri, 02/11/2011 - 10:28
loyalwhite

OK - by clearing out iptables and restarting the firewall I was able to connect. Problem 2 down, now back to problem 1...

Fri, 02/11/2011 - 10:28
andreychek

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

Fri, 02/11/2011 - 10:33
loyalwhite

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:

[Fri Feb 11 16:33:54 2011] [warn] mod_fcgid: read data timeout in 31 seconds
[Fri Feb 11 16:33:54 2011] [error] [client 81.142.86.49] Premature end of script headers: index.php

Any ideas?

Fri, 02/11/2011 - 11:20
andreychek

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

Sat, 02/12/2011 - 17:20
loyalwhite

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.

Thu, 02/17/2011 - 18:02
magicker

thank you.. that was driving me mad.. disabling the firewall has allowed me back in.

Topic locked