-
Bug
-
Resolution: Not a Bug
-
Major
-
2.6.0.Final
-
None
-
False
-
None
-
False
-
Critical
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
Bug report
I'm new to debezium and Im testing out debezium server deployed on minikube with Dez Operator. I want to configure a pubsub sink and a postgres source. My Pubsub emulator is deployed on the same namespace with this configuration. The pubsub host works fine, I can create topics and subscription. But when I tried deploying debezium server, the container failed to start. What do I miss here?
001_pubsub.yaml 002_postgres_source.yaml
What Debezium connector do you use and what version?
Debezium Operator - quay.io/debezium/server:2.6
Deployed with Raw Kubernestes Manifests on minikube v1.33.1
What is the connector configuration?
spec:
image: quay.io/debezium/server:2.6
runtime:
environment:
vars:
- name: PUBSUB_EMULATOR_HOST
value: pubsub-service:8085 - name: PUBSUB_PROJECT_ID
value: abc
quarkus:
config:
log.console.json: false
kubernetes-config.enabled: true
kubernetes-config.secrets: postgresql-credentials
sink:
type: pubsub
config:
pubsub.project.id: abc
pubsub.address: pubsub-service:8085
source:
class: io.debezium.connector.postgresql.PostgresConnector
offset:
memory: {}
schemaHistory:
memory: {}
config:
database.hostname: postgresql
database.port: 5432
database.user: ${POSTGRES_USER}
database.password: ${POSTGRES_PASSWORD}
database.dbname: ${POSTGRES_DB}
topic.prefix: inventory
schema.include.list: inventory
table.include.list: inventory.customers
tombstones.on.delete: false
transforms:
- type: Reroute
config:
topic.regex: (.)inventory(.)
topic.replacement: dbserver
type: io.debezium.transforms.ByLogicalTableRouterWhat is the captured database version and mode of deployment?
(E.g. on-premises, with a specific cloud provider, etc.)
on premises
What behaviour do you expect?
debezium server publishes messages to pubsub topic `dbserver`
What behaviour do you see?
Pod cannot start, error trace:
ERROR [io.deb.emb.asy.AsyncEmbeddedEngine] (pool-8-thread-1) Engine has failed with : java.util.concurrent.ExecutionException: java.lang.NullPointerException
Do you see the same behaviour using the latest relesead Debezium version?
(Ideally, also verify with latest Alpha/Beta/CR version)
Yes, tried with quay.io/debezium/server:2.7.0.Final
Do you have the connector logs, ideally from start till finish?
(You might be asked later to provide DEBUG/TRACE level log)
2024-07-04 07:18:34,763 INFO [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-postgresconnector-inventory-change-event-source-coordinator) For table 'inventory.customers' using select statement: 'SELECT "id", "first_name", "last_name", "email" FROM "inventory"."customers"'
2024-07-04 07:18:34,764 INFO [io.deb.rel.RelationalSnapshotChangeEventSource] (pool-13-thread-1) Exporting data from table 'inventory.customers' (1 of 1 tables)
2024-07-04 07:18:34,773 INFO [io.deb.rel.RelationalSnapshotChangeEventSource] (pool-13-thread-1) Finished exporting 4 records for table 'inventory.customers' (1 of 1 tables); total duration '00:00:00.009'
2024-07-04 07:18:34,775 INFO [io.deb.pip.sou.AbstractSnapshotChangeEventSource] (debezium-postgresconnector-inventory-change-event-source-coordinator) Snapshot - Final stage
2024-07-04 07:18:34,775 INFO [io.deb.pip.sou.AbstractSnapshotChangeEventSource] (debezium-postgresconnector-inventory-change-event-source-coordinator) Snapshot completed
2024-07-04 07:18:34,782 INFO [io.deb.pip.ChangeEventSourceCoordinator] (debezium-postgresconnector-inventory-change-event-source-coordinator) Snapshot ended with SnapshotResult [status=COMPLETED, offset=PostgresOffsetContext [sourceInfoSchema=Schema{io.debezium.connector.postgresql.Source:STRUCT}, sourceInfo=source_info[server='inventory'db='debezium', lsn=LSN
, txId=842, timestamp=2024-07-04T07:18:34.734575Z, snapshot=FALSE, schema=inventory, table=customers], lastSnapshotRecord=true, lastCompletelyProcessedLsn=null, lastCommitLsn=null, streamingStoppingLsn=null, transactionContext=TransactionContext [currentTransactionId=null, perTableEventCount={}, totalEventCount=0], incrementalSnapshotContext=IncrementalSnapshotContext [windowOpened=false, chunkEndPosition=null, dataCollectionsToSnapshot=[], lastEventKeySent=null, maximumKey=null]]]
2024-07-04 07:18:34,784 INFO [io.deb.pip.ChangeEventSourceCoordinator] (debezium-postgresconnector-inventory-change-event-source-coordinator) Connected metrics set to 'true'
2024-07-04 07:18:34,787 INFO [io.deb.con.pos.PostgresSchema] (debezium-postgresconnector-inventory-change-event-source-coordinator) REPLICA IDENTITY for 'inventory.customers' is 'FULL'; UPDATE AND DELETE events will contain the previous values of all the columns
2024-07-04 07:18:34,792 INFO [io.deb.pip.sig.SignalProcessor] (debezium-postgresconnector-inventory-change-event-source-coordinator) SignalProcessor started. Scheduling it every 5000ms
2024-07-04 07:18:34,793 INFO [io.deb.uti.Threads] (debezium-postgresconnector-inventory-change-event-source-coordinator) Creating thread debezium-postgresconnector-inventory-SignalProcessor
2024-07-04 07:18:34,793 INFO [io.deb.pip.ChangeEventSourceCoordinator] (debezium-postgresconnector-inventory-change-event-source-coordinator) Starting streaming
2024-07-04 07:18:34,793 INFO [io.deb.con.pos.PostgresStreamingChangeEventSource] (debezium-postgresconnector-inventory-change-event-source-coordinator) Retrieved latest position from stored offset 'LSN{0/2450A50}'
2024-07-04 07:18:34,794 INFO [io.deb.con.pos.con.WalPositionLocator] (debezium-postgresconnector-inventory-change-event-source-coordinator) Looking for WAL restart position for last commit LSN 'null' and last change LSN 'LSN{0/2450A50}'
2024-07-04 07:18:34,833 INFO [io.deb.con.pos.con.PostgresConnection] (debezium-postgresconnector-inventory-change-event-source-coordinator) Obtained valid replication slot ReplicationSlot [active=false, latestFlushedLsn=LSN
, catalogXmin=773]
2024-07-04 07:18:34,834 INFO [io.deb.jdb.JdbcConnection] (pool-14-thread-1) Connection gracefully closed
2024-07-04 07:18:34,859 INFO [io.deb.uti.Threads] (debezium-postgresconnector-inventory-change-event-source-coordinator) Requested thread factory for connector PostgresConnector, id = inventory named = keep-alive
2024-07-04 07:18:34,859 INFO [io.deb.uti.Threads] (debezium-postgresconnector-inventory-change-event-source-coordinator) Creating thread debezium-postgresconnector-inventory-keep-alive
2024-07-04 07:18:34,863 INFO [io.deb.con.pos.PostgresSchema] (debezium-postgresconnector-inventory-change-event-source-coordinator) REPLICA IDENTITY for 'inventory.customers' is 'FULL'; UPDATE AND DELETE events will contain the previous values of all the columns
2024-07-04 07:18:34,863 INFO [io.deb.con.pos.PostgresStreamingChangeEventSource] (debezium-postgresconnector-inventory-change-event-source-coordinator) Processing messages
2024-07-04 07:18:35,218 ERROR [io.deb.emb.asy.AsyncEmbeddedEngine] (pool-8-thread-1) Engine has failed with : java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at io.debezium.embedded.async.AsyncEmbeddedEngine.runTasksPolling(AsyncEmbeddedEngine.java:462)
at io.debezium.embedded.async.AsyncEmbeddedEngine.run(AsyncEmbeddedEngine.java:206)
at io.debezium.server.DebeziumServer.lambda$start$1(DebeziumServer.java:178)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903)
at com.google.pubsub.v1.ProjectTopicName.<init>(ProjectTopicName.java:53)
at com.google.pubsub.v1.ProjectTopicName.<init>(ProjectTopicName.java:26)
at com.google.pubsub.v1.ProjectTopicName$Builder.build(ProjectTopicName.java:134)
at com.google.pubsub.v1.ProjectTopicName.of(ProjectTopicName.java:58)
at io.debezium.server.pubsub.PubSubChangeConsumer.lambda$handleBatch$2(PubSubChangeConsumer.java:234)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
at io.debezium.server.pubsub.PubSubChangeConsumer.handleBatch(PubSubChangeConsumer.java:234)
at io.debezium.embedded.async.ParallelSmtAndConvertBatchProcessor.processRecords(ParallelSmtAndConvertBatchProcessor.java:56)
at io.debezium.embedded.async.AsyncEmbeddedEngine$PollRecords.doCall(AsyncEmbeddedEngine.java:1155)
at io.debezium.embedded.async.AsyncEmbeddedEngine$PollRecords.doCall(AsyncEmbeddedEngine.java:1136)
at io.debezium.embedded.async.RetryingCallable.call(RetryingCallable.java:47)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 3 more
2024-07-04 07:18:35,220 INFO [io.deb.emb.asy.AsyncEmbeddedEngine] (pool-8-thread-1) Engine state has changed from 'POLLING_TASKS' to 'STOPPING'
2024-07-04 07:18:35,221 INFO [io.deb.con.com.BaseSourceTask] (pool-9-thread-1) Stopping down connector
2024-07-04 07:18:35,377 INFO [io.deb.jdb.JdbcConnection] (pool-15-thread-1) Connection gracefully closed
2024-07-04 07:18:35,378 INFO [io.deb.pip.ChangeEventSourceCoordinator] (debezium-postgresconnector-inventory-change-event-source-coordinator) Finished streaming
2024-07-04 07:18:35,378 INFO [io.deb.pip.ChangeEventSourceCoordinator] (debezium-postgresconnector-inventory-change-event-source-coordinator) Connected metrics set to 'false'
2024-07-04 07:18:35,380 INFO [io.deb.pip.sig.SignalProcessor] (pool-9-thread-1) SignalProcessor stopped
2024-07-04 07:18:35,381 INFO [io.deb.ser.DefaultServiceRegistry] (pool-9-thread-1) Debezium ServiceRegistry stopped.
2024-07-04 07:18:35,383 INFO [io.deb.jdb.JdbcConnection] (pool-16-thread-1) Connection gracefully closed
2024-07-04 07:18:35,385 INFO [io.deb.jdb.JdbcConnection] (pool-17-thread-1) Connection gracefully closed
2024-07-04 07:18:35,386 INFO [io.deb.emb.asy.AsyncEmbeddedEngine] (pool-8-thread-1) Stopped task #1 out of 1 tasks (it took 165 ms to stop the task).
2024-07-04 07:18:35,388 INFO [io.deb.emb.asy.AsyncEmbeddedEngine] (pool-8-thread-1) Engine is stopped.
2024-07-04 07:18:35,388 INFO [io.deb.emb.asy.AsyncEmbeddedEngine] (pool-8-thread-1) Engine state has changed from 'STOPPING' to 'STOPPED'
2024-07-04 07:18:35,388 ERROR [io.deb.ser.ConnectorLifecycle] (pool-8-thread-1) Connector completed: success = 'false', message = 'java.lang.NullPointerException', error = 'java.lang.NullPointerException': java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903)
at com.google.pubsub.v1.ProjectTopicName.<init>(ProjectTopicName.java:53)
at com.google.pubsub.v1.ProjectTopicName.<init>(ProjectTopicName.java:26)
at com.google.pubsub.v1.ProjectTopicName$Builder.build(ProjectTopicName.java:134)
at com.google.pubsub.v1.ProjectTopicName.of(ProjectTopicName.java:58)
at io.debezium.server.pubsub.PubSubChangeConsumer.lambda$handleBatch$2(PubSubChangeConsumer.java:234)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
at io.debezium.server.pubsub.PubSubChangeConsumer.handleBatch(PubSubChangeConsumer.java:234)
at io.debezium.embedded.async.ParallelSmtAndConvertBatchProcessor.processRecords(ParallelSmtAndConvertBatchProcessor.java:56)
at io.debezium.embedded.async.AsyncEmbeddedEngine$PollRecords.doCall(AsyncEmbeddedEngine.java:1155)
at io.debezium.embedded.async.AsyncEmbeddedEngine$PollRecords.doCall(AsyncEmbeddedEngine.java:1136)
at io.debezium.embedded.async.RetryingCallable.call(RetryingCallable.java:47)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2024-07-04 07:18:35,397 INFO [io.deb.ser.DebeziumServer] (main) Received request to stop the engine
2024-07-04 07:18:35,397 ERROR [io.deb.ser.DebeziumServer] (main) Exception while shuttting down Debezium [Error Occurred After Shutdown]: java.lang.IllegalStateException: Engine has been already shut down.
at io.debezium.embedded.async.AsyncEmbeddedEngine.close(AsyncEmbeddedEngine.java:243)
at io.debezium.server.DebeziumServer.stop(DebeziumServer.java:249)
at io.debezium.server.DebeziumServer_Observer_stop_d470e05516c8d86f955c7275c00cebdc903562ab.notify(Unknown Source)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:346)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:328)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:82)
at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:155)
at io.quarkus.arc.runtime.ArcRecorder$2.run(ArcRecorder.java:111)
at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:84)
at io.quarkus.runtime.StartupContext.close(StartupContext.java:73)
at io.quarkus.runner.ApplicationImpl.doStop(Unknown Source)
at io.quarkus.runtime.Application.stop(Application.java:208)
at io.quarkus.runtime.Application.stop(Application.java:155)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:227)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
at io.debezium.server.Main.main(Main.java:15)
2024-07-04 07:18:35,410 INFO [io.quarkus] (main) debezium-server-dist stopped in 0.021s
How to reproduce the issue using our tutorial deployment?
Yes
Feature request or enhancement
For feature requests or enhancements, provide this information, please:
Which use case/requirement will be addressed by the proposed feature?
<Your answer>
Implementation ideas (optional)
<Your answer>