Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Kapua » Failed to start kapua-broker(Failed to start kapua-broker caused by "Failed to configure ElasticSearch rest client")
Failed to start kapua-broker [message #1803512] Sat, 02 March 2019 02:14 Go to next message
Entao Liang is currently offline Entao LiangFriend
Messages: 2
Registered: March 2019
Junior Member
Trying to start the kapua with the "latest" version. "kapua-broker" could not start with the following error. "elasticsearch:5.4.0" is used by the kapua and it also failed to start without any log.

*** kapua-broker error log ***
10:00:41.392 [main] WARN o.a.a.xbean.XBeanBrokerFactory$1 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataStorageMessageProcessor' defined in class path resource [camel.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.eclipse.kapua.broker.core.listener.DataStorageMessageProcessor]: Constructor threw exception; nested exception is com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.ExceptionInInitializerError
at org.eclipse.kapua.service.datastore.internal.MessageStoreServiceImpl.<init>(MessageStoreServiceImpl.java:88)
while locating org.eclipse.kapua.service.datastore.internal.MessageStoreServiceImpl
at org.eclipse.kapua.locator.guice.KapuaModule.configure(KapuaModule.java:120)
while locating org.eclipse.kapua.service.datastore.MessageStoreService
...
...
Caused by: org.eclipse.kapua.service.datastore.client.ClientUnavailableException: Error: Failed to configure ElasticSearch rest client
at org.eclipse.kapua.service.datastore.client.rest.EsRestClientProvider.<init>(EsRestClientProvider.java:218)
at org.eclipse.kapua.service.datastore.client.rest.EsRestClientProvider.<init>(EsRestClientProvider.java:202)
at org.eclipse.kapua.service.datastore.client.rest.EsRestClientProvider.<init>(EsRestClientProvider.java:192)
at org.eclipse.kapua.service.datastore.client.rest.EsRestClientProvider.init(EsRestClientProvider.java:108)
at org.eclipse.kapua.service.datastore.client.rest.RestDatastoreClient.initClientProvider(RestDatastoreClient.java:179)
at org.eclipse.kapua.service.datastore.client.rest.RestDatastoreClient.<init>(RestDatastoreClient.java:168)
at org.eclipse.kapua.service.datastore.client.rest.RestDatastoreClient.getInstance(RestDatastoreClient.java:141)
... 77 more

I don't think there is a bug in the system source code, but more about the configuration.
Following is my system configuration:
OS: macOS High Sierra 10.13.6
Docker Desktop Community: 2.0.0.3 (31259)
Java: 1.8.0_201

Please advise on possible cause of the error, or a walkthrough document will be very helpful. Thank you!!!
Re: Failed to start kapua-broker [message #1804062 is a reply to message #1803512] Sun, 17 March 2019 04:56 Go to previous messageGo to next message
Entao Liang is currently offline Entao LiangFriend
Messages: 2
Registered: March 2019
Junior Member
The cause was insufficient memory allocated to the docker container:
- The default memory allocation for docker container is 1GB
- elasticsearch requires more than 2GB

After increasing the docker to 4GB, the elasticsearch container starts successfully, and kapua-broker container is able to run succesfully.
Re: Failed to start kapua-broker [message #1808772 is a reply to message #1804062] Mon, 01 July 2019 10:44 Go to previous message
Alberto Codutti is currently offline Alberto CoduttiFriend
Messages: 23
Registered: June 2019
Junior Member
Hi Entao,

Yes, some containers are a bit memory hungry.
6GB of memory assigned to Docker is recommended.

Regards,

- Alberto
Previous Topic:Unable to login Eclipse Kapua web console
Next Topic:lose class?why?
Goto Forum:
  


Current Time: Thu Apr 18 17:02:02 GMT 2024

Powered by FUDForum. Page generated in 0.01576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top