Hello I have a problem when I use this way to nuke...
# all-things-deployment
m
Hello I have a problem when I use this way to nuke all the metadata. 1. drop table metadata_aspect_v2 and drop table metadata_index. Run docker/mysql/init.sql in my mysql instance 2. delete all indices in my openserarch instance. Then run elasticsearch-setup upon it. 3. Restart the datahub-gms
plus1 1
Copy code
16:22:36.938 [main] ERROR c.l.metadata.boot.BootstrapManager:32 - Caught exception while executing bootstrap step IngestRootUserStep. Exiting...
org.apache.kafka.common.errors.SerializationException: Error registering Avro schema: {"type":"record","name":"MetadataAuditEvent","namespace":"com.linkedin.pegasus2avro.mxe","doc":"Kafka event for capturing update made to an entity's metadata.","fields":[{"name":"auditHeader","type":["null",{"type":"record","name":"KafkaAuditHeader","namespace":"com.linkedin.events","doc":"This header records information about the context of an event as it is emitted into kafka and is intended to be used by the kafka audit application.  For more information see go/kafkaauditheader","fields":[{"name":"time","type":"long","doc":"The time at which the event was emitted into kafka.","compliance":[{"policy":"EVENT_TIME"}]},{"name":"server","type":{"type":"string","avro.java.string":"String"},"doc":"The fully 
...
...
...
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Schema being registered is incompatible with an earlier schema for subject "schema_registry_metadata_audit_event-value"; error code: 409
	at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:292)
	at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:351)
	at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:494)
	at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:485)
	at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:458)
	at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.registerAndGetId(CachedSchemaRegistryClient.java:206)
	at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:268)
	at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:244)
	at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:74)
	at io.confluent.kafka.serializers.KafkaAvroSerializer.serialize(KafkaAvroSerializer.java:59)
	at org.apache.kafka.common.serialization.Serializer.serialize(Serializer.java:62)
	at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:902)
	at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:862)
	at com.linkedin.metadata.dao.producer.EntityKafkaMetadataEventProducer.produceMetadataAuditEvent(EntityKafkaMetadataEventProducer.java:104)
	at com.linkedin.metadata.entity.EntityService.produceMetadataAuditEventForKey(EntityService.java:543)
	at com.linkedin.metadata.entity.EntityService.produceMetadataAuditEvent(EntityService.java:521)
	at com.linkedin.metadata.entity.EntityService.sendEventForUpdateAspectResult(EntityService.java:357)
	at com.linkedin.metadata.entity.EntityService.ingestAspect(EntityService.java:323)
	at com.linkedin.metadata.boot.steps.IngestRootUserStep.execute(IngestRootUserStep.java:67)
	at com.linkedin.metadata.boot.BootstrapManager.start(BootstrapManager.java:30)
	at com.linkedin.metadata.boot.BootstrapManagerApplicationListener.onApplicationEvent(BootstrapManagerApplicationListener.java:29)
	at com.linkedin.metadata.boot.BootstrapManagerApplicationListener.onApplicationEvent(BootstrapManagerApplicationListener.java:16)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:921)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:554)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:888)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:357)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1443)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1407)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:821)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:276)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:407)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
	at org.eclipse.jetty.server.Server.doStart(Server.java:371)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.runner.Runner.run(Runner.java:520)
	at org.eclipse.jetty.runner.Runner.main(Runner.java:565)
ANTLR Tool version 4.5 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.5 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.5 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.5 used for parser compilation does not match the current runtime version 4.82022/03/31 16:22:37 Command exited with error: exit status 1
Looks like confluent schema registry is complaining about incompatibility of earlier schema. How can I nuke schema registry states?
l
you probably want to use the schema registry API to remove the schema associated with the topic
e
you can delete a whole subject by running
Copy code
curl --location --request DELETE '<http://localhost:8081/subjects/MetadataChangeLog_Versioned_v1-value>'
replace domain with the domain for your schema registry!
plus1 1
in your case the subject should be “schema_registry_metadata_audit_event-value”
m
Thanks for your prompt support. It works!