Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth error: ETIMEDOUT #30

Closed
jamesholcomb opened this issue Jan 5, 2018 · 11 comments
Closed

Auth error: ETIMEDOUT #30

jamesholcomb opened this issue Jan 5, 2018 · 11 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. triaged for GA type: question Request for information or clarification. Not an issue.

Comments

@jamesholcomb
Copy link

Environment details

Note: App is running external from GCP

  • OS: Ubuntu 16.04.3 LTS
  • Node.js version: 8.9.1
  • npm version: 5.5.1
  • @google-cloud/pubsub version: 0.14.5

Steps to reproduce

UNKNOWN

Auth error:Error: connect ETIMEDOUT 172.217.4.109:443
Auth error:Error: connect ETIMEDOUT 172.217.4.109:443
Auth error:Error: connect ETIMEDOUT 172.217.4.109:443
Auth error:Error: connect ETIMEDOUT 172.217.4.109:443
Dec 31, 2017 7:05 AM ERROR  { message: 'Getting metadata from plugin failed with error: con
nect ETIMEDOUT 172.217.4.109:443',
  stack: 'Error: Getting metadata from plugin failed with error: connect ETIMEDOUT 172.217.4.109:44
3\n    at ClientDuplexStream.onConnectionStatus (/home/jholcomb/ridealert.server/node_modules/@goog
le-cloud/pubsub/src/connection-pool.js:270:21)\n    at emitOne (events.js:116:13)\n    at ClientDup
lexStream.emit (events.js:211:7)\n    at ClientDuplexStream._emitStatusIfDone (/home/jholcomb/ridea
lert.server/node_modules/grpc/src/node/src/client.js:260:10)\n    at ClientDuplexStream._receiveSta
tus (/home/jholcomb/ridealert.server/node_modules/grpc/src/node/src/client.js:233:8)\n    at /home/
jholcomb/ridealert.server/node_modules/grpc/src/node/src/client.js:757:12',
  code: 16 }

This error occured after the server app had been connected and processing messages for several days. Is it expected that the pubsub lib automatically reconnects (eventually) or does a reconnect in this situation have to be handled by the client?

@stephenplusplus
Copy link
Contributor

Sorry for the delay @jamesholcomb. @callmehiphop do you know?

@stephenplusplus stephenplusplus added priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue. labels Jan 9, 2018
@jamesholcomb
Copy link
Author

jamesholcomb commented Jan 18, 2018

On a possibly related note, I started getting this error after updating to 0.16.2.

Sending messages seems to continue working. But I have to restart the app in order to receive messages on subscriptions.

Jan 17, 2018 7:31 PM ERROR { message: 'Retry total timeout exceeded before anyresponse was received', stack: 'Error: Retry total timeout exceeded before anyresponse was received at repeat (/Users/jamesholcomb/code/ridealert.server/node_modules/google-gax/lib/api_callable.js:224:18) at Timeout._onTimeout (/Users/jamesholcomb/code/ridealert.server/node_modules/google-gax/lib/api_callable.js:256:13) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5)' }


@theacodes
Copy link

Related: googleapis/google-auth-library-python#211

This is due to Compute Engine's metadata server being occasionally unavailable. We should move this to the nodejs auth library and set a reasonable timeout and retry when talking to the GCE metadata server.

In the meantime, you can use a service account private key file as describe in cloud.google.com/docs/authentication/getting-started

@theacodes
Copy link

@stephenplusplus can you handle moving this to the appropriate place?

@stephenplusplus
Copy link
Contributor

Hmm, I'm not sure which library of code is making the request, whether it's our handwritten layer, the gapic, or the auth library itself. @callmehiphop do you know?

@callmehiphop
Copy link
Contributor

@stephenplusplus hard to say, when creating the gapic clients we attempt to get the project id from the auth library, after which all requests are made by the gapic. If this error occurs multiple times, I would think it was from the gapic since we cache the project id.

@stephenplusplus
Copy link
Contributor

@jamesholcomb do you know the minimum required code to track down the method that is making the request that returns that error? Not so much concerned with reproducing, but just knowing which method is making the call.

@jamesholcomb
Copy link
Author

@stephenplusplus I've only encountered this error once. The server where it was running did not have full debug/trace enabled at the time, so I don't have much to go on.

@ctavan
Copy link
Contributor

ctavan commented Feb 13, 2018

@stephenplusplus @callmehiphop I have encountered a similar error (see below) while running my branch from #65 (which is based on current master). I'll base my branch on the v0.16.2 tag and test again.

Here's the error, I'm getting ECONNRESET instead of ETIMEDOUT:

{ Error: Getting metadata from plugin failed with error: connect ECONNRESET 169.254.169.254:80
    at /app/node_modules/grpc/src/client.js:554:15 code: 16, metadata: Metadata { _internal_repr: {} } } },
  id: '06f12d14-5870-4aea-ad1c-f76ccf5d17fe' }

@stephenplusplus
Copy link
Contributor

This issue was moved to googleapis/google-auth-library-nodejs#283.

stephenplusplus pushed a commit that referenced this issue Jun 11, 2018
## Version **0.16.0** of [google-proto-files](https://github.com/googleapis/nodejs-proto-files) was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </th>
    <td>
      <code>google-proto-files</code>
    </td>
  </tr>
  <tr>
      <th align=left>
       Current Version
      </th>
      <td>
        0.15.1
      </td>
    </tr>
  <tr>
    <th align=left>
      Type
    </th>
    <td>
      dependency
    </td>
  </tr>
</table>

The version **0.16.0** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of google-proto-files.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Release Notes</summary>
<strong>v0.16.0</strong>

<h2>Features</h2>
<ul>
<li>(<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="316092585" data-permission-text="Issue title is private" data-url="googleapis/nodejs-proto-files#35" href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/pull/35">#35</a>): Allow passing <code>load()</code> options to protobuf.js. (Thanks, <a class="user-mention" data-hovercard-user-id="583593" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://urls.greenkeeper.io/nmccready">@nmccready</a>!)</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 19 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/b4d00bd0b7e6c2d4e0be1395739ded62bd9083e3"><code>b4d00bd</code></a> <code>0.16.0 (#44)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/47488981af49c1102737e60cad560f9609ac29d2"><code>4748898</code></a> <code>feat: allow load options (#35)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/91a34aa6ec2fb31932a03f4ed7756210146ea163"><code>91a34aa</code></a> <code>Merge pull request #42 from googleapis/greenkeeper/nyc-12.0.1</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/fca6f7540c45b1ec3916602e1189cef289429908"><code>fca6f75</code></a> <code>Update package.json</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/f0473ada67034a0a294d3f15dd1aa968acb5750a"><code>f0473ad</code></a> <code>chore(package): update nyc to version 12.0.1</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/057563111be9bf9e97e02f893fbed08a9b465db2"><code>0575631</code></a> <code>chore: lock files maintenance (#41)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/5f38e7f77b6c14a5bbc256acb598fe10f4dbb693"><code>5f38e7f</code></a> <code>chore: lock files maintenance (#38)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/d077e0b86bf56135301a5240a15c4cbbabf2eb47"><code>d077e0b</code></a> <code>chore: test on node10 (#37)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/7855ccaca6a1f323719ef2c5a6c77ddd06953cb6"><code>7855cca</code></a> <code>chore: lock files maintenance (#36)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/e5548189863303d1973d54c5dc23d5eb599fbdaa"><code>e554818</code></a> <code>Merge pull request #32 from googleapis/greenkeeper/sinon-5.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/0ecbb5e631d5918b8e1cf09e6ab1b6ed6d3baa64"><code>0ecbb5e</code></a> <code>Update package locks</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/838e2d1d84db3e15a0a5a73242ac7399709d6a44"><code>838e2d1</code></a> <code>chore(package): update sinon to version 5.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/fb18058f58c906ff9e90be80d4f312dbfb9ff68f"><code>fb18058</code></a> <code>chore: workaround for repo-tools EPERM (#33)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/cf5968e2974b0cecbb6a807ffde696ec37dd6fe6"><code>cf5968e</code></a> <code>chore: setup nighty build in CircleCI (#31)</code></li>
<li><a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/commit/c4c973a41ee5810052fb0159ae2f83c18e6f866f"><code>c4c973a</code></a> <code>chore(package): update proxyquire to version 2.0.0 (#30)</code></li>
</ul>
<p>There are 19 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/googleapis/nodejs-proto-files/compare/89183d7d25f9c7e3b9097da820d9d84bd803a92f...b4d00bd0b7e6c2d4e0be1395739ded62bd9083e3">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
stephenplusplus pushed a commit to stephenplusplus/nodejs-pubsub that referenced this issue Aug 31, 2018
@google-cloud-label-sync google-cloud-label-sync bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Jan 31, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 7, 2020
@Manya-Buyhatke
Copy link

what do you mean by FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.194.95:443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. triaged for GA type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

7 participants