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

Connector failing because of region being null, despite having a default or even when defined #65

Open
greg-swift-yohana opened this issue Feb 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@greg-swift-yohana
Copy link

Description

I am trying to run the connector in Confluent Cloud, and it is experiencing a NPE preventing it from starting.

Aside from sensitive values here is what the config looks like:

{
  "nr.region": "US",
  "topics": "device_log",
  "transforms": "renamefield,eventtype,flatten",
  "transforms.eventtype.static.field": "eventType",
  "transforms.eventtype.static.value": "deviceEvent",
  "transforms.eventtype.type": "org.apache.kafka.connect.transforms.InsertField$Value",
  "transforms.flatten.delimiter": ".",
  "transforms.flatten.type": "org.apache.kafka.connect.transforms.Flatten$Value",
  "transforms.renamefield.renames": "time:event.timestamp",
  "transforms.renamefield.type": "org.apache.kafka.connect.transforms.ReplaceField$Value"
}

Steps to Reproduce

  1. Upload connector to Confluent Cloud
  2. Configure the connector (see above)
  3. Start it
  4. Look at the logs

Expected Behaviour

I expect it to get further, and probably start complaining about the timestamp being incompatible 😆

Relevant Logs / Console output

See attachment, but this seems to be the main issue:

{
  "message": "Cannot invoke \"String.toUpperCase()\" because \"region\" is null",
}
with the stack trace:
java.lang.NullPointerException: Cannot invoke "String.toUpperCase()" because "region" is null
	at com.newrelic.telemetry.SenderConfiguration$SenderConfigurationBuilder.setRegion(SenderConfiguration.java:158)
	at com.newrelic.telemetry.TelemetrySinkTask.start(TelemetrySinkTask.java:101)
	at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:325)
	at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:227)
	at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:284)
	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)

Your Environment

newrelic-kafka-connector v2.3.2
kafka system: Confluent Cloud standard with hosted Connect

Additional context

New Relic Event Sink_2024-02-02T17 57 50.027Z.csv

@greg-swift-yohana greg-swift-yohana added the bug Something isn't working label Feb 2, 2024
@greg-swift-yohana
Copy link
Author

So... I'm not sure why but it seems to have started working.

@stalbot15
Copy link

Seeing this behavior when upgrading from connector version 2.1.0 -> 2.3.3. It works when the nr.region is defined explicitly in the connector config, but I get a NPE otherwise. This seems to contradict the config docs which list the setting as non-required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants