Why can't I connect to the google-translate API on the server?

Integration of my Ruby application with google translate API stopped working on my server.
From outside the application also fails to get the correct response from the API.

In the app and through curl, I get the error:

403. That’s an error.

Your client does not have permission to get URL <code>/language/translate/v2</code> from this server. That’s all we know.

But if I check it through my home computer, then everything works correctly:

curl "https://translation.googleapis.com/language/translate/v2?key={MY_GOOGLE_KEY}&source=en&target=de&q=Hello%20World"

==> 
{
  "data": {
    "translations": [
      {
        "translatedText": "Hallo Welt"
      }
    ]
  }
}

Could there be problems in the system itself on the server?

cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"

update1:

checked on the same system with debian 8 and got the current answer from api. So, now I have a theory that there is some problem with the ip (although the ip is included in the trusted list)

5 Replies

We've been alerted of reports from customers experiencing the same issue with accessing Google's API. From what we have gathered so far, Google is blocking our IPv6 /64 block in Frankfurt. We've already reached out to Google and they are currently looking into it.

In the meantime, we've found that assigning a dedicated /64 range to affected Linodes resolves the issue. Since the issue is specific to IPv6, you could also disable it (if you're not using it for anything else), and that may resolve the issue.

One customer stated that after a lot more debugging, they ran curl with --verbose and noticed that a ipv6 address was used. When running curl with --ipv4 to force ipv4 the problem seems to disappear.

If you'd like us to assign a /64 range to your Linode, just let us know by opening a ticket within Cloud Manager and we'll get it taken care of. IPv6 ranges are provided free of charge, so there would be no additional cost if you choose to do so.

So it takes google more that week to respond to that. Shame

Any status updates from Google?

We are affected by this too. IPV6/64 fix doesn't seem to be working for us (still waiting for Linode's response).
As a last resort option, we consider migrating the instances to the London data center (we have many instances there, and Google APIs work without issues).

Thanks to the help from Linode support, we resolved the issue.
This is how our /etc/netplan/01-eth0.yaml file looks like now: https://i.imgur.com/GmiOS0B.png
That item with the red arrow is the /64 address, we added ":1:1:1:1/128" to the end and it worked after "netplan apply".

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct