Help! Problems with "This site is not available currently."

Help! Problems with "This site is not available currently."

by Henry Foster -
Number of replies: 13

We are experiencing sporadic outbreaks of inability to access our site, which is running moodle 2.6.2. At first it seemed to be a problem only from computers on our school network, with a limited range of IPs. A couple of times I succeeded in getting through after adding the university IP range to the allowed IP list; however, that then seemed to have the effect of blocking access from other IPs. Right now I am not able to access the site at all, and I've tried it from 3 different IPs, including one in another country (via VPN). I have cleared all IP addresses from the IP blocker by directly editing the mdl_config table, but that doesn't seem to help.

Our installation is on a rental server (siteground), and they report no blockages or firewall issues on their end. Aside from upgrading to 2.6.2, other recent changes include that our rental server has recently changed our IP address (but long enough ago now that propagation should be complete), and because of the new school year here in Japan, we have much more traffic on the site than previously.

Can anybody imagine what might be amiss?

რეიტინგების საშუალო: -
In reply to Henry Foster

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

The  approach using allowed IP addresses will keep one forever busy unless one knew specifically all the ranges of IP addresses that will access.  Your students could be using hand held/smartphones as well to access.

What are the limits to the SiteGround account?  Sounds like 'much more traffic' might be the cause ... account is restricted to memory it can use, number of connections, number of hits on DB, etc..

'spirit of sharing', Ken

რეიტინგების საშუალო: -
In reply to Ken Task

Re: Help! Problems with "This site is not available currently."

by Henry Foster -

Ken, thank you for responding. Of course server limitations are one thing we've been considering, but I'm not convinced that is the problem. We are now using a 'pro semi-dedicated' account there (just two accounts on one server); we upgraded from a more basic account a few years ago when Siteground told us we were over-taxing the CPU. The strange thing is the timing. We have successfully had multiple classes of students simultaneously logging in and taking quizzes one day, only to find that there is no access the next morning (after virtually no activity during the night). Once we lose access, it can last up to 24 hours. The access problem seems to be related to IP addresses; at first it was only PCs on the university network that could not access, and a few times I was able to resolve that using the allow IP setting. But allowing certain IPs seems to then block access from other IPs, and yesterday I temporarily lost access from every available connection I had, despite their being registered in the allowed list.

Neither Siteground nor the university IT folks can find anything on their respective ends that would be causing our problem, so now I'm wondering if there is something going wrong within our moodle installation itself. If anyone can think of something related to moodle settings or configuration on the server that might cause this behavior, or advice for what kind of diagnostic tests I could perform, I would be most grateful.

რეიტინგების საშუალო: -
In reply to Henry Foster

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

In Site Admin -> Security -> IP Blocker there is an option for 'Allowed' will be processed first.

Is that checked?

The box for allowed IP addresses ranges then contains the IP's.

There is also a box for denied IP's and ranges.

Either way it says: 'Put every entry on one line.'

There are three different ways to enter IP addresses ... CIDR, range, or partial.

Which are you using?

And I'll say this again ... believe it's almost futile to use this tool.   For example, I have two connections in different cities on different networks (cable).   From time to time provider refreshes the IP addresses allocated to their customers.  On servers where am trying to restrict access to certain services not even the "Class B" will work *all* the time.   Example: can't use 70.128.   Could use 70.  In order to be accurate I'd have to find the entire range of IP addresses ... all the IP blocks ... the provider might be using.

Check:

http://docs.moodle.org/26/en/IP_blocker

"If there are entries present in the Blocked IP List, any hosts for which Moodle cannot determine the IP address will be blocked by default. For example, hosts that are behind a web proxy server which does not pass the HTTP headers containing the remote IP address information. In this case Moodle cannot determine the host's IP address with which to compare against the Blocked IP List, so the host is blocked by default. A suggested workaround may be to change the Logged IP address source (getremoteaddrconf setting within Site administration > Server > HTTP > Reverse Proxy) from the default to "REMOTE_ADDR" which will log the IP address of the proxy server instead of the host behind it."

The server guys/gals probably use command line tools ... do you have shell access to the site?

One could setup a 'poor man's monitor' ... a script that pings an IP address one time and also records results in a log file every 5 minutes or so.    Could also have that send EMail.  That is ONLY if the server is allowed to ping.   The ip address it pings ... yours.

'spirit of sharing', Ken

რეიტინგების საშუალო: -
In reply to Henry Foster

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

Sounds like one could use a free monitoring service.  Not at university ... although they could set one up and check access to the server from the uni's network perspective.   Those checks would be from the monitoring service prospective, so once setting it up, you have to allow the IP address you see in logs access to Moodle.    Think I'd create a 'monitor.txt' file and put it at document root of the server.  And then point the monitoring service to that specific file.  'monitor.txt' doesn't have to be a web page ... just has 'success' on the first line of the .txt file.  Since that file is outside of Moodle, only apache is involved in granting/dis-allowing access.   It those succeed all the time, then one could deduct that it might be related to what the Moodle code can do to check the IP address.

Here's one such free monitoring service: https://dashboard.monitor.us/en/sign-in

maybe others have better suggestions.

When your workstation at the uni can't access, can you do things like 'traceroutes', dns lookups, or pings?  Examples:

From command prompt (assuming you are using Windows):

C:\tracert 'fully_qualified_domain_name_of_moodle_server'

Mac from terminal:

traceroute 'fully_qualified_domain_name_of_moodle_server'

Ping:

ping -c 1 'fully_qualified_domain_name_of_moodle_server'

Dig (DNS check):

dig 'fully_qualified_domain_name_of_moodle_server'

There is a Chrome tool:

https://chrome.google.com/webstore/detail/network-tools/ncnnjohmbhjghjnejmblnagjgcgcpgfa?hl=en

There are also addons for FireFox:

https://addons.mozilla.org/en-us/firefox/collections/riverlethe/scott_net/

In the ISO model, network comes before application.   So if workstations being used cannot access the web server, Moodle (the application) has no information upon which to act (allow/deny) and thus it would appear to be Moodle (might not be).  The default, if Moodle cannot check, is to block.   So there is the 'reverse' to consider as well ... using IP blocker, Moodle has to be allowed whatever checks it does to determine if an IP is allowed or not.  Example: let's say the Moodle code tries to do a reverse lookup on the IP address ... that involves DNS ... if that fails, result blocked.  Let's say the reverse lookup is successful and the next test Moodle tries to use is a ping.  If the uni servers are not allowed to use ICMP echos (ie, pings), that fails ... result blocked.

To resolve the issue is not an easy undertaking *IF* it is a networking issue.  But think you have to resolve that issue first ... ie, make sure that networking is ALWAYS there before assuming it's Moodle. One has to run those test when it happens.   Might run those test (ping/traceroute/DNS lookups) when it is working ... *record those results' in a text file for later reference.   When those test are NOT working, then one has something to compare.

When I had a problem like this (once), I created a troubles.html page that just said 'Thanks' on it.  Asked those having problems to go to that url.   http://site/troubles.html   Then looked at apache server access logs ...

Log might look something like this:

70.123.xxx.xx - - [19/Apr/2014:10:59:56 -0500] "GET /plugins/system/jcemediabox/js/jcemediabox.js?version=114 HTTP/1.1" 304 - "http://someserver.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0"

Lots of info there isn't there!

If you had a monitor.txt or a troubles.html page at your apache root that would should in that log and some useful information to use in resolving the issue.

'spirit of sharing', Ken

რეიტინგების საშუალო: -
In reply to Henry Foster

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

Did some experimenting with a site related to ip blocking ... the ip addresses for allow/deny are recorded in the mdl_config table.

select allowbeforeblock,allowedip,blockedip from mdl_config

So when an IP is entered in the form to block, it's entered into the 'blockedip' of mdl_config table.  That table is accessed even before one can browse the Moodle front page.

So when you cannot access,  do you get a time out in the browser, or do you get a notification:

'This site is currently unavailable'

If you get that notification, browser did reach the server, but the ip address used by the workstation matched an entry in mdl_config:blockedip.

If you don't get that notification then it could be networking.

Question: how are you entering the IP addresses in the blocked ip list box?
Pasting?   Is there a blank space after an ip listed?   Do you have 'periods' located correctly?
Is there a blank line at the bottom?

'spriit of sharing', Ken

რეიტინგების საშუალო: -
In reply to Ken Task

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

After re-reading reponses, I see you had edited the DB once and still got the 'This site is currently unavailable'.   Well, that's Moodle sending that notification.   So the networking is good.   Did you, however, clear browser cache and cookies?   Dunno that SiteGround does this but maybe they have some caching (Moodle does).   Did you also purge all Moodle caches?

One thing I did notice in the experiment ... I entered one IP address, pressed [return] to set cursor on a blank line, then saved the form.   Normally, the screen returns to the same screen but because of that extra line, there was a notification on the form screen that informed my changes weren't saved and the item (the ipblocked box) was indicated as where the data wasn't excepted.   I re-edited the ipblocked box removing the extra line at the bottom and it saved with no errors.   Missed the error notification the first time ... should have seen it but missed it.  So Moodle does check your entries.

I suspect there is some character/entry that might be confusing the routine to block IP's.

Of course this is really a stab in the dark as no one has seen the ipblock listing to see if those are properly formatted and even that would perhaps beg more questions concerning the IP's.

'spirit of sharing', Ken

 

რეიტინგების საშუალო: -
In reply to Ken Task

Re: Help! Problems with "This site is not available currently."

by Henry Foster -

Thanks for all the advice, Ken, and I will try out the monitoring tricks if the problem persists. I won't be able to do much of anything for the next day or so, though, because I'm too busy. 

As for the IP blocker, the whole problem started before we had ever touched those settings, and we have never put anything in the block box, only the allow box, and only as a desperate (but then surprisingly successful) attempt to regain access. For access from the university network, I used 202.209, which covers the full range of IPs they use. Then as necessary I added the full IP of my laptop, which is on a wireless network unrelated to the university. Each IP on one line, no extra spaces or line breaks. 

In retrospect, when the problem first occurred, it was a timeout; we got the browser's error message. But then a couple of times we were getting moodle's error message (as per the title of this thread), so now I'm starting to think maybe your first suggestion of server limitations is the ultimate cause. Maybe we are pushing the limit in terms of database activity or something, with multiple negative results. I'll start another ticket with the SiteGround help staff to investigate that possibility. 

Thanks again. 

რეიტინგების საშუალო: -
In reply to Henry Foster

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

'the whole problem started before we had ever touched those settings"

Well then don't make Moodle part of the problem! smile  Servers are just end points/desitnations!  If there is no reason to use the ipblocker to block remove all settings for blocking/allowing ip addresses.  Take the Moodle application out of the equation. Then it's just network and server restrictions.  That takes just a few minutes ... take the time to do that.  The monitoring could be done automatically with the URL to that *free* service provided earlier.

'spirit of sharing', Ken

რეიტინგების საშუალო: -
In reply to Ken Task

Re: Help! Problems with "This site is not available currently."

by rathish venugopal -

Hi ken,

i am using moodle2.6.2 with essential theme. 

i have used ipblocker with allowedip option. Suddenly site refreshed and showed the text 

"This site is not available currently."

I have changed allowedip,removedip as empty in mdl_config table as per your instruction and clear cache and cookies too.

Till yet my site shows the same error.

Help me.

Attachment Untitled.png
Attachment Untitled1.png
რეიტინგების საშუალო: -
In reply to rathish venugopal

Re: Help! Problems with "This site is not available currently."

by Ken Task -
Particularly helpful Moodlers სურათი

Curl test shows a HTTP/1.1 301 Moved Permanently for /moodle   The apache root, however, is serving out (suggest placing a blank index.html there to prevent raw directory listing ... folks don't need to see folders there ... nor phpinfo file).

Hmmmm ... site is accessible to me and I read:

"In case of adopting memcached as the back-end you could look at repcached to try to add the missing unshared cache nodes collaboration by using its own replication mechanisms which unfortunately are asynchronous, again leading potentially to unpredictable results in Moodle."

Might be that you need to restart apache - which should clear out any a

/sbin/service httpd restart

Server on a shared host or dedicated?

'spirit of sharing', Ken

რეიტინგების საშუალო: -
In reply to rathish venugopal

Re: Help! Problems with "This site is not available currently."

by Shahab Mohd -

Hi rathish 

I am also facing the same issue. I have the access to mySQL and cleared out all the ields in both allowedip and blockedip rows. But still the site shows "This site is not available currently." message.

Did you find any solution for this? other than overriding the database in config.php?

რეიტინგების საშუალო: -
In reply to Henry Foster

Re: Help! Problems with "This site is not available currently."

by Rick Jerz -
Particularly helpful Moodlers სურათი Testers სურათი

I am not an IT person, but I will offer an idea.  Might it be something with your area Internet company?  I have had a similar problem once or twice, and found that the problem was with the ISP.

See if you can access the site from https://www.megaproxy.com, which is Megaproxy.  If you can, then contact your local ISP.  If not, then it could be a problem with your server company.

Just an idea???

You can also try copying your moodle installation to an "experimental" server, even with your same server company, or a different on.

Are you running many add-ins?  Maybe the problem has something to do with one of these in 2.6.2.

რეიტინგების საშუალო: -
In reply to Rick Jerz

Re: Help! Problems with "This site is not available currently."

by Íde O'Neill -

Hi Rick

 

Many thanks for taking the time to respond.  I was able to access download.moodle.org without any difficulty using the  https://www.megaproxy.com link.

I'm just wondering if the problem might be Chrome?  I'm going to try Firefox and see if that might make a difference.  If all fruit fails, then I guess I'll have to check some details with my ISP.

Thanks again, Rick.

Íde

 

რეიტინგების საშუალო: -