-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Ingest Manager] [DRAFT] POST /setup can crash #74125
Closed
jfsiii
wants to merge
3
commits into
elastic:master
from
jfsiii:73997-crash-on-setup-without-registry
Closed
[Ingest Manager] [DRAFT] POST /setup can crash #74125
jfsiii
wants to merge
3
commits into
elastic:master
from
jfsiii:73997-crash-on-setup-without-registry
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get EPM packages behaves as expected ``` curl http://localhost:5601/api/ingest_manager/epm/packages --user elastic:changeme {"statusCode":500,"error":"Internal Server Error","message":"Error connecting to package registry at http://localhost:9999/search: request to http://localhost:9999/search failed, reason: connect ECONNREFUSED 127.0.0.1:9999"} ``` ``` server log [17:10:12.499] [info][server][Kibana][http] http server running at http://0.0.0.0:5601 fetchUrl http://localhost:9999/search getResponseStream before http://localhost:9999/search registry#getResponse try http://localhost:9999/search registry#getResponse catch http://localhost:9999/search server error [17:10:14.470] Error: Internal Server Error at HapiResponseAdapter.toError (/Users/jfsiii/work/kibana/src/core/server/http/router/response_adapter.ts:129:19) at HapiResponseAdapter.toHapiResponse (/Users/jfsiii/work/kibana/src/core/server/http/router/response_adapter.ts:79:19) at HapiResponseAdapter.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/response_adapter.ts:74:17) at Router.handle (/Users/jfsiii/work/kibana/src/core/server/http/router/router.ts:273:34) at process._tickCallback (internal/process/next_tick.js:68:7) ``` but crashes with POST to /setup while no registry ``` curl -X POST 'http://localhost:5601/api/ingest_manager/setup' -H 'kbn-xsrf: <string>' --user elastic:changeme {"isInitialized":true} ``` server / console Logs ``` handler try await setupIngestManager setupIngestManager setupIngestManager try/catch await Promise.all default packages, output, agent config, etc ensureInstalledDefaultPackages return 2 installLatestPackage try/catch system fetchFindLatestPackage try system calls fetchUrl http://localhost:9999/search?package=system&internal=true&experimental=true fetchUrl http://localhost:9999/search?package=system&internal=true&experimental=true getResponseStream before http://localhost:9999/search?package=system&internal=true&experimental=true registry#getResponse try http://localhost:9999/search?package=system&internal=true&experimental=true installLatestPackage try/catch endpoint fetchFindLatestPackage try endpoint calls fetchUrl http://localhost:9999/search?package=endpoint&internal=true&experimental=true fetchUrl http://localhost:9999/search?package=endpoint&internal=true&experimental=true getResponseStream before http://localhost:9999/search?package=endpoint&internal=true&experimental=true registry#getResponse try http://localhost:9999/search?package=endpoint&internal=true&experimental=true registry#getResponse catch http://localhost:9999/search?package=system&internal=true&experimental=true installLatestPackage catch { RegistryError: Error connecting to package registry at http://localhost:9999/search?package=system&internal=true&experimental=true: request to http://localhost:9999/search?package=system&internal=true&experimental=true failed, reason: connect ECONNREFUSED 127.0.0.1:9999 at getResponse (/Users/jfsiii/work/kibana/x-pack/plugins/ingest_manager/server/services/epm/registry/requests.ts:26:11) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'RegistryError' } setupIngestManager catch & call onSetupReject { RegistryError: Error connecting to package registry at http://localhost:9999/search?package=system&internal=true&experimental=true: request to http://localhost:9999/search?package=system&internal=true&experimental=true failed, reason: connect ECONNREFUSED 127.0.0.1:9999 at getResponse (/Users/jfsiii/work/kibana/x-pack/plugins/ingest_manager/server/services/epm/registry/requests.ts:26:11) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'RegistryError' } ingestManagerSetupHandler await success undefined Unhandled Promise rejection detected: { RegistryError: Error connecting to package registry at http://localhost:9999/search?package=system&internal=true&experimental=true: request to http://localhost:9999/search?package=system&internal=true&experimental=true failed, reason: connect ECONNREFUSED 127.0.0.1:9999 at getResponse (/Users/jfsiii/work/kibana/x-pack/plugins/ingest_manager/server/services/epm/registry/requests.ts:26:11) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'RegistryError' } Terminating process... server crashed with status code 1 ```
@elasticmachine merge upstream master |
💔 Build Failed
Failed CI StepsBuild metrics
History
To update your PR or re-run it, just comment with: |
closing in favor of #74300 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP PR only to get CI & merge upstream
get EPM packages behaves as expected
but crashes with POST to /setup while no registry
server / console Logs
Summary
Summarize your PR. If it involves visual changes include a screenshot or gif.
Checklist
Delete any items that are not applicable to this PR.
For maintainers