Zeebe Cloud Connection Error

Hi there,

i am trying to create a worker using Apache Camel and its grpc component. Anyhow, i do get the following stack trace:

2020-06-26 15:21:09.638 | INFO  | org.quartz.core.JobRunShell | DefaultQuartzScheduler-camelEasiModule_Worker-4 |  |  | Job Camel_camelEasiModule.everysecond threw a JobExecutionException: 
org.quartz.JobExecutionException: io.grpc.StatusRuntimeException: INTERNAL: http2 exception
	at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:71)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: io.grpc.StatusRuntimeException: INTERNAL: http2 exception
	at io.grpc.Status.asRuntimeException(Status.java:533)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:606)
	at org.apache.camel.component.grpc.GrpcUtils.invokeSyncMethod(GrpcUtils.java:159)
	at org.apache.camel.component.grpc.client.GrpcSimpleExchangeForwarder.forward(GrpcSimpleExchangeForwarder.java:57)
	at org.apache.camel.component.grpc.GrpcProducer.process(GrpcProducer.java:90)
	at org.apache.camel.support.SynchronousDelegateProducer.process(SynchronousDelegateProducer.java:49)
	at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:67)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:168)
	at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395)
	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
	at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)
	at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
	at org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:40)
	at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:62)
	... 2 common frames omitted
Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 485454502f
	at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:103)
	at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:338)
	at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:239)
	at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:438)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

The full response is this:

HTTP/1.1 400 Bad Request
Server: nginx/1.17.7
Date: Fri, 26 Jun 2020 12:35:57 GMT
Content-Type: text/html
Content-Length: 157
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.17.7</center>
</body>
</html>

My Route looks like this:

public class MyRouteBuilder extends RouteBuilder {

    @Override
    public void configure() throws Exception {
        GatewayOuterClass.ActivateJobsRequest activateJobsRequest = GatewayOuterClass.ActivateJobsRequest.newBuilder()
                                                                                           .setType("evaluateMessage")
                                                                                           .setMaxJobsToActivate(1)
                                                                                           .setTimeout(10)
                                                                                           .setWorker("my-worker-key")
                                                                                           .build();
                from("quartz://everysecond?cron=*+*+8-18+?+*+MON-FRI")
                .setBody(e -> activateJobsRequest)
                .to("grpc://CLUSTERID.zeebe.camunda.io:443/io.zeebe.gateway.protocol.Gateway?method=ActivateJobs&synchronous=true&authenticationType=JWT&jwtSecret=ey…")
                .log("This comes in from zeebe: ${in.body}")
                ;
    }
}
1 Like

Turn on trace level debugging and let’s see what it is sending out over the wire.