Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Solace Connect plugin crashes in Strimzi #10705

Closed
kbreit-insight opened this issue Oct 11, 2024 · 2 comments
Closed

[Bug]: Solace Connect plugin crashes in Strimzi #10705

kbreit-insight opened this issue Oct 11, 2024 · 2 comments

Comments

@kbreit-insight
Copy link

Bug Description

Note: I am starting this with Strimzi but the issue may need to exist in Kafka Connect or Solace instead.

I am trying to deploy the Solace Kafka source connector (https://github.com/SolaceProducts/pubsubplus-connector-kafka-source) to Strimzi/Kafka. However, it crashes and provides a Java traceback. Also, someone submitted an issue in 2022 to the Solace connector (SolaceProducts/pubsubplus-connector-kafka-source#41) that came up with Confluent, but seems to be a similar problem.

Steps to reproduce

  1. Deploy Strimzi.
  2. Create a KafkaConnect resource.
  3. Create a KafkaConnector custom resource.
  4. Wait for pods to come up and watch the logs of the connect pod.
  5. Here are the logs.

Expected behavior

It shouldn't crash.

Strimzi version

0.43.0

Kubernetes version

1.29.8

Installation method

Helm chart

Infrastructure

AKS

Configuration files and logs

apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnect
metadata:
  name: solace
  namespace: kafka
  annotations:
    strimzi.io/use-connector-resources: "true"
spec:
  bootstrapServers: 10.100.12.5:31030
  build:
    plugins:
      - name: solace
        artifacts:
          - type: zip
            url: https://solaceproducts.github.io/pubsubplus-connector-kafka-source/downloads/pubsubplus-connector-kafka-source-3.1.0.zip
    output:
      type: docker
      image: your_registry.azurecr.io/your_repo/kafka-connect-solace:0.0.2
      pushSecret: acr-creds
  template:
    pod:
      imagePullSecrets:
        - name: acr-creds
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnector
metadata:
  name: solace-source-connector
  namespace: kafka
  labels:
    strimzi.io/cluster: solace
spec:
  class: com.solace.connector.kafka.connect.source.SolaceSourceConnector
  tasksMax: 1
  config:
    value.converter: org.apache.kafka.connect.converters.ByteArrayConverter
    key.converter: org.apache.kafka.connect.storage.StringConverter
    kafka.topic: swim
    sol.host: tcps://your_host.example.com
    sol.username: your_user
    sol.password: p@ssword
    sol.vpn_name: vpn_name
    sol.topics: some_topic
2024-10-10 13:28:49,532 INFO [solace-source-connector|task-0] ==================Initialize Connector properties (com.solace.connector.kafka.connect.source.SolaceSourceConnectorConfig) [task-thread-solace-source-connector-0]
2024-10-10 13:28:49,533 ERROR [solace-source-connector|task-0] WorkerSourceTask{id=solace-source-connector-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask) [task-thread-solace-source-connector-0]
org.apache.kafka.connect.errors.ConnectException: Encountered exception in creating the message processor.
	at com.solace.connector.kafka.connect.source.SolaceSourceTask.start(SolaceSourceTask.java:74)
	at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.initializeAndStart(AbstractWorkerSourceTask.java:278)
	at org.apache.kafka.connect.runtime.WorkerTask.doStart(WorkerTask.java:175)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:224)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:280)
	at org.apache.kafka.connect.runtime.AbstractWorkerSourceTask.run(AbstractWorkerSourceTask.java:78)
	at org.apache.kafka.connect.runtime.isolation.Plugins.lambda$withClassLoader$1(Plugins.java:237)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	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:840)
Caused by: org.apache.kafka.common.KafkaException: Could not find a public no-argument constructor for com.solace.connector.kafka.connect.source.SolMessageProcessorIF
	at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:401)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:397)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:436)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:421)
	at com.solace.connector.kafka.connect.source.SolaceSourceTask.start(SolaceSourceTask.java:71)
	... 11 more
Caused by: java.lang.NoSuchMethodException: com.solace.connector.kafka.connect.source.SolMessageProcessorIF.<init>()
	at java.base/java.lang.Class.getConstructor0(Class.java:3585)
	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
	at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:399)
	... 15 more

Additional context

No response

@scholzj
Copy link
Member

scholzj commented Oct 11, 2024

As I explained on Slack ... this has nothing to do with Strimzi. It is an error from a connector you get when running it in Kafka Connect. Strimzi code has nothing to do with this. This should be closed.

@kbreit-insight
Copy link
Author

I was able to resolve this problem. Instead of using SolaceSourceConnector I moved to ``SolaceSampleSourceConnector` and it resolved the problem. I'm thinking the former needs to be extended into custom connectors, which is why it didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants