Skip to content

Getting error: connect EHOSTUNREACH #689

@ghost

Description

Hey everyone !

So, I'm trying to follow this tutorial :
https://cloud.google.com/docs/authentication/getting-started#auth-cloud-implicit-nodejs
and I'm trying to verify the authentification with the program below but I get an error.
I'm behind a company proxy and on ubuntu 16.04 . What should I do ?
Thanks for your help

ERROR: { Error: connect EHOSTUNREACH <myIPadress>
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
  code: 'EHOSTUNREACH',
  errno: 'EHOSTUNREACH',
  syscall: 'connect',
 // Imports the Google Cloud client library.
const Storage = require('@google-cloud/storage');

// Instantiates a client. If you don't specify credentials when constructing
// the client, the client library will look for credentials in the
// environment.
const storage = new Storage();

// Makes an authenticated API request.
storage
  .getBuckets()
  .then((results) => {
    const buckets = results[0];
    console.log('Buckets:');
    buckets.forEach((bucket) => {
      console.log(bucket.name);
    });
  })
  .catch((err) => {
    console.error('ERROR:', err);
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions