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

Error trying to use Elasticsearch Backend #414

Closed
gfranco-nos opened this issue Jun 4, 2024 · 2 comments · Fixed by #415
Closed

Error trying to use Elasticsearch Backend #414

gfranco-nos opened this issue Jun 4, 2024 · 2 comments · Fixed by #415

Comments

@gfranco-nos
Copy link

Image: pacovk/tapir:0.6.3

Issue: Trying to setup Tapir using Helm Chart I'm receiving an error from the application in the step where it's supposed to connect to ElasticSearch:

2024-06-04 04:47:20,899 INFO  [io.quarkus] (main) Installed features: [amazon-dynamodb, amazon-s3, amazon-sts, cdi, config-yaml, elasticsearch-rest-client, hibernate-validator, oidc, quinoa, resteasy-reactive, resteasy-reactive-jackson, security, smallrye-context-propagation, smallrye-openapi, vertx]
2024-06-04 04:47:20,904 INFO  [cor.Bootstrap] (main) Validate GPG key configuration provided
2024-06-04 04:47:20,905 INFO  [cor.Bootstrap] (main) Start to bootstrap registry database [elasticsearch]
2024-06-04 04:47:21,224 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): org.apache.http.ConnectionClosedException: Connection is closed
	at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:920)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:300)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:288)
	at core.backend.elasticsearch.ElasticSearchRepository.createIndexIfNotExists(ElasticSearchRepository.java:310)
	at core.backend.elasticsearch.ElasticSearchRepository.bootstrap(ElasticSearchRepository.java:209)
	at core.backend.elasticsearch.ElasticSearchRepository_ClientProxy.bootstrap(Unknown Source)
	at core.Bootstrap.bootstrap(Bootstrap.java:33)
	at Main$TerraformRegistry.run(Main.java:22)
	at Main_TerraformRegistry_ClientProxy.run(Unknown Source)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:132)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
	at Main.main(Main.java:9)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:61)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:32)
Caused by: org.apache.http.ConnectionClosedException: Connection is closed

I've tried to use other ports in the Elastic definitions, but looking into the code I wasn't able to find any authentication method to Elastic, what's expected by it to accept connections, as the default behavior is to close connections without any auth method. This is a issue to me because when using the ECK deploy to Elastic, it isn't possible to deactivate the authentication to Elasticsearch.

@PacoVK
Copy link
Owner

PacoVK commented Jun 4, 2024

Thanks for this issue. I had that on my radar, but never implemented it. I will release soon 0.7.3 which will then contain the config options

@gfranco-nos
Copy link
Author

Thank you very much @PacoVK! I've updated the image and it just worked! I'll after just leave some suggestions and a PR to the Helm repo after.

Also, just to remind to update the info version in the Java Bootstrap, although I'm using the 0.7.3 version, the logs display 0.7.0 :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants