Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-1619

Creating new connector results in HTTP 404 exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.4.0.GA
    • 1.4.0.GA
    • None
    • None
    • 2020.1

      Sometimes, when the connector operator creates the connector and checks its status, the status is not yet ready and does return HTTP 404:

      2020-01-17 19:35:05 WARN  AbstractConnectOperator:324 - Reconciliation #21(connector-watch) KafkaConnect(myproject/my-connect-cluster): Error reconciling connector my-source-connector
      io.strimzi.operator.cluster.operator.assembly.ConnectRestException: GET /connectors/my-source-connector/status returned 404 (Not Found): No status found for connector my-source-connector
      	at io.strimzi.operator.cluster.operator.assembly.KafkaConnectApiImpl.lambda$null$7(KafkaConnectApi.java:137) ~[io.strimzi.cluster-operator-0.17.0-SNAPSHOT.jar:0.17.0-SNAPSHOT]
      	at io.vertx.core.http.impl.HttpClientResponseImpl$BodyHandler.notifyHandler(HttpClientResponseImpl.java:292) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.HttpClientResponseImpl.lambda$bodyHandler$0(HttpClientResponseImpl.java:193) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.HttpClientResponseImpl.handleEnd(HttpClientResponseImpl.java:248) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.lambda$beginResponse$0(Http1xClientConnection.java:480) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:237) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:127) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.endResponse(Http1xClientConnection.java:499) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.access$000(Http1xClientConnection.java:237) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.Http1xClientConnection.handleResponseEnd(Http1xClientConnection.java:634) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.Http1xClientConnection.handleHttpMessage(Http1xClientConnection.java:584) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.http.impl.Http1xClientConnection.handleMessage(Http1xClientConnection.java:566) ~[io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369) [io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43) [io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:232) [io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:173) [io.vertx.vertx-core-3.8.4.jar:3.8.4]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328) [io.netty.netty-codec-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302) [io.netty.netty-codec-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241) [io.netty.netty-handler-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [io.netty.netty-transport-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [io.netty.netty-common-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [io.netty.netty-common-4.1.42.Final.jar:4.1.42.Final]
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty.netty-common-4.1.42.Final.jar:4.1.42.Final]
      	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
      

      This is later fixed when the status is set. But it looks bad to have the exception in the log because user might not understand it. This PR adds additional status check with exponential back off which backs off when HTTP 404 is returned. That solves the exception and makes the experience better for the user.

              Unassigned Unassigned
              scholzj JAkub Scholz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: