confluentinc / bottledwater-pg

Change data capture from PostgreSQL into Kafka
http://blog.confluent.io/2015/04/23/bottled-water-real-time-integration-of-postgresql-and-kafka/
Apache License 2.0
2 stars 0 forks source link

Failed to register key schema #133

Closed jmedinillaparadigma closed 7 years ago

jmedinillaparadigma commented 7 years ago

Hello,

I'm trying to run the quickstart and I'm not getting any message into Kafka. Having a look filed I've found this error:

bottledwater-avro_1 | /usr/local/bin/bottledwater-docker-wrapper.sh: Running: /usr/local/bin/bottledwater --postgres=host=postgres port=5432 dbname=postgres user=postgres --broker=kafka:9092 --allow-unkeyed --output-format=avro --schema-registry=http://schema-registry:8081 --topic-config=message.timeout.ms=2000 bottledwater-avro_1 | [INFO] Writing messages to Kafka in Avro format bottledwater-avro_1 | [INFO] Created replication slot "bottledwater", capturing consistent snapshot "00000273-1". bottledwater-avro_1 | INFO: bottledwater_export: Table public.test is keyed by index test_pkey bottledwater-avro_1 | [INFO] Registering metadata for table test (relid 16393) bottledwater-avro_1 | [INFO] Opening Kafka topic "test" for table "test" bottledwater-avro_1 | [ERROR] Failed to register key schema: Could not send schema to registry: Failed to connect to schema-registry port 8081: Connection refused bottledwater-avro_1 | [FATAL] Client error: error in table_schema callback for relid 16393 bottledwater-avro_1 | [INFO] Dropping replication slot since the snapshot did not complete successfully. bottledwater-avro_1 | /usr/local/bin/bottledwater-docker-wrapper.sh: Setting option --allow-unkeyed bottledwater-avro_1 | /usr/local/bin/bottledwater-docker-wrapper.sh: Setting option --output-format=avro bottledwater-avro_1 | /usr/local/bin/bottledwater-docker-wrapper.sh: Detected schema registry, setting --schema-registry=http://schema-registry:8081 bottledwater-avro_1 | /usr/local/bin/bottledwater-docker-wrapper.sh: Running: /usr/local/bin/bottledwater --postgres=host=postgres port=5432 dbname=postgres user=postgres --broker=kafka:9092 --allow-unkeyed --output-format=avro --schema-registry=http://schema-registry:8081 --topic-config=message.timeout.ms=2000 bottledwater-avro_1 | [INFO] Writing messages to Kafka in Avro format bottledwater-avro_1 | [INFO] Created replication slot "bottledwater", capturing consistent snapshot "000002AB-1". bottledwater-avro_1 | [FATAL] While reading snapshot: PGRES_FATAL_ERROR: ERROR: function bottledwater_export(table_pattern := text, allow_unkeyed := boolean, error_policy := text) does not exist bottledwater-avro_1 | LINE 1: SELECT bottledwater_export(table_pattern := $1, allow_unkeye... bottledwater-avro_1 | ^ bottledwater-avro_1 | HINT: No function matches the given name and argument types. You might need to add explicit type casts. bottledwater-avro_1 | bottledwater-avro_1 | [INFO] Dropping replication slot since the snapshot did not complete successfully.

I've checked that the database and the table are created properly. Also, the logs from the schema registry looks good:

schema-registry_1 | [2017-03-08 08:37:09,706] INFO Successfully elected the new master: {"host":"schema-registry","port":8081,"master_eligibility":true,"version":1} (io.confluent.kafka.schemaregistry.zookeeper.ZookeeperMasterElector:83) ... schema-registry_1 | [2017-03-08 08:37:10,739] INFO Server started, listening for requests... (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:45)

Can anyone help me out with this problem?

Thanks!

jmedinillaparadigma commented 7 years ago

I've already fixed this problem. Thanks.