Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19783

camel-salesforce - grpc will not resubscribe on connection failure if no messages have been received

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.1, 4.1.0
    • camel-salesforce
    • None
    • Unknown

    Description

      Relevant log:

      
      : io.grpc.StatusRuntimeException: UNAUTHENTICATED: An authentication exception occurred. Provide valid authentication via metadata headers. rpcId: d493e4d9-9ac9-4723-a9d9-9179e4d58067
      	at io.grpc.Status.asRuntimeException(Status.java:539)
      	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:491)
      	at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489)
      	at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453)
      	at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486)
      	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:567)
      	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:71)
      	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:735)
      	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:716)
      	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
      	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      2023-08-23T09:01:12.618+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Trailers:
      2023-08-23T09:01:12.618+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Trailer: date, Value: Wed, 23 Aug 2023 09:01:12 GMT
      2023-08-23T09:01:12.618+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Trailer: content-type, Value: application/grpc
      2023-08-23T09:01:12.618+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Trailer: rpc-id, Value: d493e4d9-9ac9-4723-a9d9-9179e4d58067
      2023-08-23T09:01:12.618+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Trailer: error-code, Value: sfdc.platform.eventbus.grpc.service.auth.error
      2023-08-23T09:01:12.619+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Trailer: type, Value: Subscribe
      2023-08-23T09:01:12.619+0000 ERROR 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" attempting login
      2023-08-23T09:01:12.986+0000  INFO 1 --- [main-EventThread] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Login successful
      2023-08-23T09:01:12.986+0000  INFO 1 --- [main-EventThread] com.redhat.sfdc.tools.outboundmessaging. : camel-breadcrumb-id="" request-id="" Forced login complete.
      2023-08-23T09:01:12.986+0000  WARN 1 --- [grpc-default-executor-1] org.apache.camel.component.salesforce.in : camel-breadcrumb-id="" request-id="" Not re-subscribing after error because replayId is null. Topic: /event/IE_Outbound__e
      

      The text "Not re-subscribing after error because replayId is null" is printed by the private class FetchResponseObserver. The replayId is also private and appears to only be set by the class itself when it receives a message. It is not set based upon the initialReplayId and it also will not make reasonable assumptions if there was no initialReplayId (eg, started with LATEST).

      As a result, it is extremely easy for this consumer to end up in a state with few obvious error messages, but no messages being consumed.

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            jsightle@redhat.com Jesse Sightler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: