Going offline although internet connection is present

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Going offline although internet connection is present

rlovtangen
When opening a new terminal window I get this output:
Last login: Thu Nov  7 22:08:48 on ttys001
GVM can't reach the internet so going offline. Re-enable online with:

  $ gvm offline disable

But connection is present and curl is working fine:
ronny@ronnymacold:~$ curl http://www.google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.no/?gws_rd=cr&amp;ei=FwN8Us3RFenV4wSk_IHYCg">here</A>.
</BODY></HTML>

Enabeling online mode seems to work fine:
ronny@ronnymacold:~$ gvm offline disable
Online mode re-enabled!

But when opening a new terminal window, it's the same over again:
Last login: Thu Nov  7 22:09:22 on ttys002
GVM can't reach the internet so going offline. Re-enable online with:

  $ gvm offline disable

Could this be due to some URL, that GVM queries, being down?
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

marco.vermeulen
Administrator
Could I ask you to post the result of the following here?

$ echo $GVM_SERVICE
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
ronny@ronnymacold:~$ echo $GVM_SERVICE
http://api.gvmtool.net

Anyway, the problem seems to be gone now. Probably a temporary problem with api.gvmtool.net?
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
Looks to be problems with the installation script as well at the moment:
ronny@ronnymac:~$ curl get.gvmtool.net
curl: (7) Failed connect to get.gvmtool.net:80; Operation timed out
ronny@ronnymac:~$ curl http://google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
This post was updated on .
Forget about that last post, I had a /etc/hosts entry for get.gvmtool.net to point to an old IP (184.73.178.216) to work around some earlier problems when using VPN (http://forum.gvmtool.net/Need-to-be-online-td28.html)
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
Looks to be some issues with api.gvmtool.net at the moment. See my other thread, http://forum.gvmtool.net/Install-script-failing-due-to-one-of-the-URLs-retrieved-is-returning-an-error-page-td65.html
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

mathifonseca
Hi rlovtangen,

Do you know (or anyone else) if there are still problems with api.gvmtool.net?

Everytime I open for the first time my iTerm in OS X Mavericks, I get the "GVM can't reach the internet so going offline" message although my Internet connection is working properly.

Executing the "gvm offline disable" command instantly gets it back working, but it's very annoying.

My current version of gvm if it helps, is 1.3.12

Thanks in advance,

Mathias
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
mathifonseca wrote
Hi rlovtangen,

Do you know (or anyone else) if there are still problems with api.gvmtool.net?
I haven't had the problem for a while, except when connected through VPN.
Can you test if your able to 'phone home' with
$ curl http://get.gvmtool.net/candidates/grails/2.1.1

It should return the value 'valid'.
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

marco.vermeulen
Administrator
In reply to this post by mathifonseca
I think that the problem might be due to a slow internet connection.

GVM switches to offline mode if it does not receive back a response within 1 second of opening a terminal. You can see it in the gvm-init.sh where the
-m 1
 switch is passed in.

The best way to test your response time to the server is by running:
time curl -s api.gvmtool.net/alive
This does a stab at the api and ripples through to the database as well. If this call exceeds 1 second, you would be seeing the timeout message.

If this is proving to be a problem for many people, we can look at increasing the timeout, although I am reluctant to do that because it makes the terminal hang.
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
The problem isn't the timeout, but the fact that GVM phones home every time you open a terminal.
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

marco.vermeulen
Administrator
No it doesn't. It phones home once a day on opening of new terminals
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
Ok, that's better. But when it first complains about missing connection, it does so on every subsequent terminal opening. Very annoying.
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
In reply to this post by marco.vermeulen
btw, why can't it phone home once a day while running a GVM command, instead of when opening a terminal?
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

marco.vermeulen
Administrator
Because it's a client server application, not a script. It depends on a body of dynamic data that lives in a database.
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
Calling home when opening a terminal is way to intrusive. There should be some sort of background job that does this.
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
Understand me right, I love GVM, but it bugs me more than I like it to
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

marco.vermeulen
Administrator
In reply to this post by rlovtangen

Erm, as I said, it doesn't. It only happens once a day to check if an update is available.

On 29 Nov 2013 10:48, "rlovtangen [via GVM Forum]" <[hidden email]> wrote:
Calling home when opening a terminal is way to intrusive. There should be some sort of background job that does this.


If you reply to this email, your message will be added to the discussion below:
http://forum.gvmtool.net/Going-offline-although-internet-connection-is-present-tp60p91.html
To start a new topic under GVM Forum, email [hidden email]
To unsubscribe from GVM Forum, click here.
NAML
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

rlovtangen
My experience, is that when the update check fails, it checks again on each subsequent opening of a terminal. Which means that working with the terminal while being offline, is a real pain.
Reply | Threaded
Open this post in threaded view
|

Re: Going offline although internet connection is present

Daniel
In reply to this post by marco.vermeulen
But as a user, I don't care about that dynamic data until I want to run a gvm command.  I use my terminal for things besides developing in groovy/gradle/whatever, so don't want to wait on first run each day for gvm to phone home.  When I source ~/.gvm/bin/gvm-init.sh , can't gvm assume we are offline, and then when the first gvm command is run, it checks online?