scheme registry

1,114 views
Skip to first unread message

iman teimoornegad

unread,
Feb 8, 2016, 4:44:53 AM2/8/16
to Confluent Platform
hi
i have problem with scheme registry . zookeeper and Kafka server run successfully but the third step :scheme registry fails
here is the error please give me a hand
tnx


root@imax-All-Series:/home/imax# cd confluent/confluent-2.0.0
root@imax-All-Series:/home/imax/confluent/confluent-2.0.0#  ./bin/schema-registry-start ./etc/schema-registry/schema-registry.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/imax/confluent/confluent-2.0.0/share/java/confluent-common/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/imax/confluent/confluent-2.0.0/share/java/schema-registry/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[2016-02-08 13:14:28,846] INFO SchemaRegistryConfig values:
    master.eligibility = true
    port = 8081
    kafkastore.timeout.ms = 500
    kafkastore.init.timeout.ms = 60000
    debug = false
    kafkastore.zk.session.timeout.ms = 30000
    schema.registry.zk.namespace = schema_registry
    request.logger.name = io.confluent.rest-utils.requests
    metrics.sample.window.ms = 30000
    kafkastore.topic = _schemas
    avro.compatibility.level = backward
    shutdown.graceful.ms = 1000
    access.control.allow.origin =
    response.mediatype.preferred = [application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, application/json]
    metrics.jmx.prefix = kafka.schema.registry
    host.name = imax-All-Series
    metric.reporters = []
    kafkastore.commit.interval.ms = -1
    kafkastore.connection.url = localhost:2181
    metrics.num.samples = 2
    response.mediatype.default = application/vnd.schemaregistry.v1+json
    kafkastore.topic.replication.factor = 3
 (io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig:135)
[2016-02-08 13:14:29,259] INFO Initialized the consumer offset to -1 (io.confluent.kafka.schemaregistry.storage.KafkaStoreReaderThread:86)
[2016-02-08 13:14:29,662] WARN The replication factor of the schema topic _schemas is less than the desired one of 3. If this is a production environment, it's crucial to add more brokers and increase the replication factor of the topic. (io.confluent.kafka.schemaregistry.storage.KafkaStore:205)
[2016-02-08 13:14:29,713] ERROR Server died unexpectedly:  (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:51)
org.apache.kafka.common.KafkaException: Failed to construct kafka producer
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:321)
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:181)
    at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:147)
    at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:164)
    at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:55)
    at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:37)
    at io.confluent.rest.Application.createServer(Application.java:109)
    at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:43)
Caused by: org.apache.kafka.common.config.ConfigException: DNS resolution failed for url in bootstrap.servers: PLAINTEXT://imax-All-Series:9092
    at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:49)
    at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:269)
    ... 7 more

Ewen Cheslack-Postava

unread,
Feb 8, 2016, 12:49:28 PM2/8/16
to Confluent Platform
iman,

It looks like you've specified bootstrap.servers=PLAINTEXT://imax-All-Series:9092. This setting should not contain the security protocol, which is specified by the security.protocol setting for clients. To use plaintext, which is the default, simply specify bootstrap.servers=imax-All-Series:9092.

-Ewen

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/282a5255-c976-49df-bf33-6e32ee1486cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Ewen

iman teimoornegad

unread,
Feb 8, 2016, 1:06:40 PM2/8/16
to confluent...@googlegroups.com

Tnx Ewen i think u are right but were should i correct this config? I mean in server.properties?or other config files

You received this message because you are subscribed to a topic in the Google Groups "Confluent Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/confluent-platform/mTXwU6G-2zQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to confluent-platf...@googlegroups.com.

To post to this group, send email to confluent...@googlegroups.com.

Ewen Cheslack-Postava

unread,
Feb 8, 2016, 5:33:52 PM2/8/16
to Confluent Platform
It looks like you are passing that config in schema-registry.properties, so you'll want to change it there.

-Ewen


For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Ewen

iman teimoornegad

unread,
Feb 8, 2016, 5:43:04 PM2/8/16
to confluent...@googlegroups.com

Tnx Ewen i will check it out in a few hours and inform u about result
Really realyy tnx mn

iman teimoornegad

unread,
Feb 9, 2016, 1:01:45 AM2/9/16
to confluent...@googlegroups.com

Ewen you were right .the bootstrap url was in server.properties.i just disable the metioned line and problem vanished..tnq man you are great

iman teimoornegad

unread,
Feb 13, 2016, 1:28:00 PM2/13/16
to confluent...@googlegroups.com
hi Ewen
how can i add monitoring functionalities to my producer ,consumer or kafka server to be able measring the delay od reiceived message and also delivery of message?
i want to use JMX with confluent MBeans but i have no idea how to do it

ABDELOUHAB Mohammed

unread,
Feb 15, 2016, 12:11:06 PM2/15/16
to Confluent Platform
Hello,

I have the same probleme,and i remove the properties 

#listeners=PLAINTEXT://:9092 in server.properties
and activate the properties :
# The port the socket server listens on
port=9092

# Hostname the broker will bind to. If not set, the server will bind to all interfaces
host.name=localhost

in the same properties file(server.properties)

Michael Strate

unread,
Mar 17, 2016, 1:45:14 PM3/17/16
to Confluent Platform
Hi Ewen - I believe I am having the exact same problem, however, I don't appear to be passing that bootstrap.servers config setting to either the Kafka broker or SchemaRegistry service.  Adding the correct setting as you mentioned above does not make any difference in the error message.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.



--
Thanks,
Ewen

--
You received this message because you are subscribed to a topic in the Google Groups "Confluent Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/confluent-platform/mTXwU6G-2zQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to confluent-platform+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.

To post to this group, send email to confluent...@googlegroups.com.



--
Thanks,
Ewen

Ryan P

unread,
Mar 22, 2016, 5:43:28 PM3/22/16
to Confluent Platform
Michael, 

I dug into this a little deeper to see if some improvements could be made to the config parser to keep this from happening. In the end I discovered that the URL Scheme is actually stripped prior to throwing org.apache.kafka.common.config.ConfigException. 

Take a look at the ClientUtils class here :


You will notice that two static methods are used to break down each url passed in to the parseAndValidateAddresses method referenced above:

org.apache.kafka.common.utils.Utils.getHost
org.apache.kafka.common.utils.Utils.getPort 

These two methods leverage the a Java regex utility to parse the URL into the appropriate pieces.  Regex is a pain in the butt to read so I wrote a very simple test case to test this functionality out. 

Running it yields the following results:

Full:PLAINTEXT://127.0.0.1:9092
Host:127.0.0.1
Port:9092
false 

As you can see here the fact that despite the fact I included the protocol "PLAINTEXT://" in my URL the ClientUtils object was still able to accurately parse and resolve my address. 

With that said the error message you are getting in incredibly specific and may actually be the result of a DNS issue. You may want to consider providing the full error stack you are getting and perhaps trying validating the configuration with nslookup [hostname].

Mohan Golagani

unread,
Jan 31, 2018, 2:49:37 PM1/31/18
to Confluent Platform
Hi Ewen,

While bringing up the schema-registry we are receiving the following error message on both servers. I have searched many blogs and found no solution. Could you please review and let me know the fix for this issue.

[2018-01-31 13:21:32,707] ERROR Server died unexpectedly:  (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:52)
org.apache.kafka.common.config.ConfigException: No supported Kafka endpoints are configured. Either kafkastore.bootstrap.servers must have at least one endpoint matching kafkastore.security.protocol or broker endpoints loaded from ZooKeeper must have at least one endpoint matching kafkastore.security.protocol.
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.endpointsToBootstrapServers(KafkaStore.java:350)
        at io.confluent.kafka.schemaregistry.storage.KafkaStore.<init>(KafkaStore.java:138)
        at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.<init>(KafkaSchemaRegistry.java:150)
        at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:54)
        at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:38)
        at io.confluent.rest.Application.createServer(Application.java:157)
        at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:44)

Thanks
Mohan 
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platform+unsub...@googlegroups.com.



--
Thanks,
Ewen
Reply all
Reply to author
Forward
0 new messages