[BlueOnyx:18770] Re: Gneric question on 5208R DNS

Michael Stauber mstauber at blueonyx.it
Fri Dec 11 01:53:54 -05 2015


Hi Larry,

> At the same time (currently) the GUI page still shows "This screen would 
> normally display"...

Ok. So the server can resolve DNS. Outgoing connections (to port 80)
also seem to work in general. Just not through the GUI.

Whenever the GUI needs to make an HTTP(S) connection to the outside such
as when polling the RSS feed or when "talking" with NewLinQ it uses the
PHP "curl" extension.

Usually Curl is then used in two stages:

1.) The function areWeOnline() checks if an outgoing connection can be
made. This covers the check if DNS works, too.

2.) The function get_data() is used to make an HTTP or HTTPS GET
connection to the specified URL.

You find that code here in SVN:

http://devel.blueonyx.it/trac/browser/BlueOnyx/5209R/platform/alpine.mod/ci/application/helpers/blueonyx_helper.php

Line 543 to 585.

I think I know what the problem *might* be:

The function areWeOnline() uses a 10 second timeout. The function
get_data() uses a 5 second timeout. If no valid response happens within
that timeframe, then the connection attempt is aborted and the
connection failure message is shown. We use short timeouts to prevent
that connection problems (like to the RSS feed) slow the loading of the
GUI down.

I suspect that the 5 second timeout is too short for you and your server
needs longer to make the request. Hence the polling of the news (or
connections to NewLinQ) fail. If you use your own DNS server, then this
works, because the response succeeds before the timeout happens.

To test this please do this:

Edit the file
/usr/sausalito/ui/chorizo/ci/application/helpers/blueonyx_helper.php and
find the line 548. It should read like this:

        $awo_timeout = "10";

Change the 10 to 30.

A bit below in line 572 you find this:

	    $timeout = 5;

Change the 5 to a 30. Then save the changes and try to access the GUI
and see if the "BlueOnyx News" shows the news from the RSS feed.

I suspect that this will then work. In that case it's indeed an issue
with the short timeout. Which seems to indicate that the DNS servers
you're using might be responding pretty slow.

While you're on the console, please report back what this command shows:

time nslookup www.blueonyx.it

It should show something like this:

[root at 5209r ]# time nslookup www.blueonyx.it
Server:         208.67.251.180
Address:        208.67.251.180#53

Non-authoritative answer:
Name:   www.blueonyx.it
Address: 38.114.102.4


real    0m0.139s
user    0m0.006s
sys     0m0.006s

The interesting part is at the end. In the line "real" it shows how long
it took to execute the command and get a result. In your case it might
need 3-4 seconds, which (combined with the actual GET request) then
causes the timeout.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list