"cbes-consul run" returns ConsulException

Hello everyone,
I’m trying to do the tutorial in https://docs.couchbase.com/elasticsearch-connector/current/autonomous-operations.html . Have a consul in my local and did all the steps required but when i run the “cbes-consul run --group=x-group”, i am getting an Exception. It’s too long so I’m gonna paste some important parts. I tried to search in google but couldn’t find anything, hope you can help! Thank you from now.
Exception message:

  • Exception in thread “main” picocli.CommandLine$ExecutionException: Error while running command (com.couchbase.connector.elasticsearch.cli.RunCommand@71e9a896): com.orbitz.consul.ConsulException: Consul request failed
  • Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of com.orbitz.consul.model.agent.ImmutableDebugConfig, problem: Cannot build DebugConfig, some of required attributes are not set [logLevel, enableSyslog]
  • Caused by: java.lang.IllegalStateException: Cannot build DebugConfig, some of required attributes are not set [logLevel, enableSyslog]

Hi Mehmet,

Weird, I haven’t seen that one before.

What version of the connector, and what version of Consul?

Can you please post the whole stack trace, even if it’s very long?

Thanks,
David

Hello David,
Connector Version is 4.2.5 and Consul version is 1.9.1 .
Whole exception message is like this:
Consul config file not specified; will not override Consul agent ACL token.
Exception in thread “main” picocli.CommandLine$ExecutionException: Error while running command (com.couchbase.connector.elasticsearch.cli.RunCommand@71e9a896): com.orbitz.consul.ConsulException: Consul request failed
at picocli.CommandLine.execute(CommandLine.java:1168)
at picocli.CommandLine.access$800(CommandLine.java:141)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
at picocli.CommandLine.parseWithHandler(CommandLine.java:1465)
at com.couchbase.connector.elasticsearch.cli.ConsulCli.main(ConsulCli.java:107)
Caused by: com.orbitz.consul.ConsulException: Consul request failed
at com.orbitz.consul.util.Http.executeCall(Http.java:52)
at com.orbitz.consul.util.Http.extract(Http.java:31)
at com.orbitz.consul.AgentClient.getAgent(AgentClient.java:413)
at com.couchbase.connector.cluster.consul.ConsulConnector.run(ConsulConnector.java:57)
at com.couchbase.connector.elasticsearch.cli.RunCommand.run(ConsulCli.java:169)
at picocli.CommandLine.execute(CommandLine.java:1160)
… 7 more
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of com.orbitz.consul.model.agent.ImmutableDebugConfig, problem: Cannot build DebugConfig, some of required attributes are not set [logLevel, enableSyslog]
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 342, column: 5] (through reference chain: com.orbitz.consul.model.agent.ImmutableAgent$Json[“DebugConfig”])
at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1608)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapAsJsonMappingException(StdValueInstantiator.java:484)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.rewrapCtorProblem(StdValueInstantiator.java:503)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator._createUsingDelegate(StdValueInstantiator.java:540)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDelegate(StdValueInstantiator.java:298)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1283)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:189)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1284)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1611)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1203)
at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:32)
at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:23)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:223)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:186)
at com.orbitz.consul.util.Http.executeCall(Http.java:49)
… 12 more
Caused by: java.lang.IllegalStateException: Cannot build DebugConfig, some of required attributes are not set [logLevel, enableSyslog]
at com.orbitz.consul.model.agent.ImmutableDebugConfig$Builder.build(ImmutableDebugConfig.java:2121)
at com.orbitz.consul.model.agent.ImmutableDebugConfig.fromJson(ImmutableDebugConfig.java:1586)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call1(AnnotatedMethod.java:114)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator._createUsingDelegate(StdValueInstantiator.java:524)
… 30 more

this is how much terminal shows. Thank you for your help and interest.
Mehmet Fırat

Hello David,
the problem was my consul version. I downgraded to 1.5.3 and it worked now. Thank you.
Mehmet Firat

1 Like

Hi Mehmet,
Wonderful news. I’ll see about updating the connector to support the latest Consul version, tracking the issue as CBES-185.
Thanks,
David

1 Like