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

Timeout in instance credentials fatal error #334

Open
joehoyle opened this issue Nov 23, 2021 · 0 comments
Open

Timeout in instance credentials fatal error #334

joehoyle opened this issue Nov 23, 2021 · 0 comments
Labels
bug Existing functionality isn't behaving as expected

Comments

@joehoyle
Copy link
Member

When running wp elasticpress index I observed this error:

Fatal error: Uncaught Aws\Exception\CredentialsException: Error retrieving credential from ECS (cURL error 28: Operation timed out after 1054 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://169.254.170.2/v2/credentials/ccc60c8d-eff2-4c31-a677-c57a6d71f261) in /usr/src/app/vendor/aws/aws-sdk-php/src/Credentials/EcsCredentialProvider.php:74
Stack trace:
#0 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(204): Aws\Credentials\EcsCredentialProvider->Aws\Credentials\{closure}(Object(GuzzleHttp\Exception\ConnectException))
#1 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(2, Array, NULL)
#2 /usr/src/app/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#3 /usr/src/app/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(158): GuzzleHttp\Promise\TaskQueue->run()
#4 /usr/src/app/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(183): GuzzleHttp\Handler\CurlMultiHandler->tick()
#5 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#6 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#7 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#8 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#9 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#10 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#11 /usr/src/app/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#12 /usr/src/app/vendor/altis/enhanced-search/inc/namespace.php(295): GuzzleHttp\Promise\Promise->wait()
#13 /usr/src/app/vendor/altis/enhanced-search/inc/namespace.php(270): Altis\Enhanced_Search\sign_psr7_request(Object(GuzzleHttp\Psr7\Request))
#14 /usr/src/app/vendor/altis/enhanced-search/inc/namespace.php(252): Altis\Enhanced_Search\sign_wp_request(Array, 'https://search-...')
#15 /usr/src/app/wordpress/wp-includes/class-wp-hook.php(292): Altis\Enhanced_Search\on_http_request_args(Array, 'https://search-...')
#16 /usr/src/app/wordpress/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#17 /usr/src/app/wordpress/wp-includes/class-http.php(232): apply_filters('http_request_ar...', Array, 'https://search-...')
#18 /usr/src/app/wordpress/wp-includes/http.php(145): WP_Http->request('https://search-...', Array)
#19 /usr/src/app/vendor/altis/enhanced-search/inc/namespace.php(1788): wp_remote_request('https://search-...', Array)
#20 /usr/src/app/wordpress/wp-includes/class-wp-hook.php(292): Altis\Enhanced_Search\split_large_ep_request(Object(WP_Error), Array, Array, 0)
#21 /usr/src/app/wordpress/wp-includes/plugin.php(212): WP_Hook->apply_filters(Object(WP_Error), Array)
#22 /usr/src/app/vendor/10up/elasticpress/includes/classes/Elasticsearch.php(1066): apply_filters('ep_do_intercept...', Object(WP_Error), Array, Array, 0)
#23 /usr/src/app/vendor/10up/elasticpress/includes/classes/Elasticsearch.php(954): ElasticPress\Elasticsearch->remote_request('ep-rappleraltis...', Array, Array, 'bulk_index')
#24 /usr/src/app/vendor/10up/elasticpress/includes/classes/Indexable.php(318): ElasticPress\Elasticsearch->bulk_index('ep-rappleraltis...', 'post', '{"index":{"_id"...')
#25 /usr/src/app/vendor/10up/elasticpress/includes/classes/Command.php(920): ElasticPress\Indexable->bulk_index(Array)
#26 /usr/src/app/vendor/10up/elasticpress/includes/classes/Command.php(648): ElasticPress\Command->index_helper(Object(ElasticPress\Indexable\Post\Post), Array)
#27 [internal function]: ElasticPress\Command->index(Array, Array)
#28 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func(Array, Array, Array)

It seems that the request for instance credentials has a timeout of 1 second. I don't know why the request took that long, but this seems like an issue.

@joehoyle joehoyle added the bug Existing functionality isn't behaving as expected label Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality isn't behaving as expected
Projects
None yet
Development

No branches or pull requests

1 participant