Failed to send HTTP request to endpoint: http://localhost:8081/subjects/test-value/versions

1,975 views
Skip to first unread message

MR

unread,
Jun 16, 2017, 11:08:34 PM6/16/17
to Confluent Platform
Hello All,

I am getting this error when I am trying to push data through Console Producer. Does anyone know how to resolve this error? Also why is schema registry sending HTTP request to localhost when I specified server name?

Thanks in advance.

Error Message:

ERROR Failed to send HTTP request to endpoint: http://localhost:8081/subjects/test-value/versions (io.confluent.kafka.schemaregistry.client.rest.RestService)
java.net.ConnectException: Connection refused (Connection refused)

Here is the relevant information from logs:

[2017-06-16 23:02:41,816] INFO SchemaRegistryConfig values:
    metric.reporters = []
    kafkastore.sasl.kerberos.kinit.cmd = /usr/bin/kinit
    response.mediatype.default = application/vnd.schemaregistry.v1+json
    kafkastore.ssl.trustmanager.algorithm = PKIX
    authentication.realm =
    ssl.keystore.type = JKS
    kafkastore.topic = _schemas
    metrics.jmx.prefix = kafka.schema.registry
    kafkastore.ssl.enabled.protocols = TLSv1.2,TLSv1.1,TLSv1
    kafkastore.topic.replication.factor = 3
    ssl.truststore.password =
    kafkastore.timeout.ms = 500
    host.name = ryelxsmddjs1
    kafkastore.bootstrap.servers = []
    schema.registry.zk.namespace = schema_registry
    kafkastore.sasl.kerberos.ticket.renew.window.factor = 0.8
    kafkastore.sasl.kerberos.service.name =
    ssl.endpoint.identification.algorithm =
    compression.enable = false
    kafkastore.ssl.truststore.type = JKS
    avro.compatibility.level = backward
    kafkastore.ssl.protocol = TLS
    kafkastore.ssl.provider =
    kafkastore.ssl.truststore.location =
    response.mediatype.preferred = [application/vnd.schemaregistry.v1+json, application/vnd.schemaregistry+json, application/json]
    kafkastore.ssl.keystore.type = JKS
    ssl.truststore.type = JKS
    kafkastore.ssl.truststore.password =
    access.control.allow.origin =
    ssl.truststore.location =
    ssl.keystore.password =
    port = 8081
    kafkastore.ssl.keystore.location =
    master.eligibility = true
    ssl.client.auth = false
    kafkastore.ssl.keystore.password =
    kafkastore.security.protocol = PLAINTEXT
    ssl.trustmanager.algorithm =
    authentication.method = NONE
    request.logger.name = io.confluent.rest-utils.requests
    ssl.key.password =
    kafkastore.zk.session.timeout.ms = 30000
    kafkastore.sasl.mechanism = GSSAPI
    kafkastore.sasl.kerberos.ticket.renew.jitter = 0.05
    kafkastore.ssl.key.password =
    zookeeper.set.acl = false
    authentication.roles = [*]
    metrics.num.samples = 2
    ssl.protocol = TLS
    kafkastore.ssl.keymanager.algorithm = SunX509
    kafkastore.connection.url = ryelxsmddjs1:2181,ryelxsmddjs2:2181,ryelxsmddjs3:2181/kafka
    debug = false
    listeners = [http://ryelxsmddjs1.rye.avon.com:8081]
    ssl.provider =
    ssl.enabled.protocols = []
    shutdown.graceful.ms = 1000
    ssl.keystore.location =
    ssl.cipher.suites = []
    kafkastore.ssl.endpoint.identification.algorithm =
    kafkastore.ssl.cipher.suites =
    access.control.allow.methods =
    kafkastore.sasl.kerberos.min.time.before.relogin = 60000
    ssl.keymanager.algorithm =
    metrics.sample.window.ms = 30000
    kafkastore.init.timeout.ms = 60000
 (io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig)
[2017-06-16 23:02:42,943] INFO Initializing KafkaStore with broker endpoints: PLAINTEXT://ryelxsmddjs1:9092,PLAINTEXT://ryelxsmddjs2:9092,PLAINTEXT://ryelxsmddjs3:9092 (io.confluent.kafka.schemaregistry.storage.KafkaStore)
[2017-06-16 23:02:43,325] INFO Initialized last consumed offset to -1 (io.confluent.kafka.schemaregistry.storage.KafkaStoreReaderThread)
[2017-06-16 23:02:43,330] INFO [kafka-store-reader-thread-_schemas], Starting  (io.confluent.kafka.schemaregistry.storage.KafkaStoreReaderThread)
[2017-06-16 23:02:43,517] INFO Wait to catch up until the offset of the last message at 4 (io.confluent.kafka.schemaregistry.storage.KafkaStore)
[2017-06-16 23:02:43,553] INFO Created schema registry namespace ryelxsmddjs1:2181,ryelxsmddjs2:2181,ryelxsmddjs3:2181/schema_registry (io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry)
[2017-06-16 23:02:43,680] INFO Logging initialized @2559ms (org.eclipse.jetty.util.log)
[2017-06-16 23:02:43,765] INFO Adding listener: http://ryelxsmddjs1.rye.avon.com:8081 (io.confluent.rest.Application)
[2017-06-16 23:02:43,885] INFO jetty-9.2.12.v20150709 (org.eclipse.jetty.server.Server)
[2017-06-16 23:02:44,689] INFO HV000001: Hibernate Validator 5.1.2.Final (org.hibernate.validator.internal.util.Version)
[2017-06-16 23:02:44,871] INFO Started o.e.j.s.ServletContextHandler@a8e6492{/,null,AVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler)
[2017-06-16 23:02:44,885] INFO Started NetworkTrafficServerConnector@758a34ce{HTTP/1.1}{ryelxsmddjs1.rye.avon.com:8081} (org.eclipse.jetty.server.NetworkTrafficServerConnector)
[2017-06-16 23:02:44,886] INFO Started @3767ms (org.eclipse.jetty.server.Server)
[2017-06-16 23:02:44,886] INFO Server started, listening for requests... (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain)
[2017-06-16 23:04:05,281] ERROR Failed to send HTTP request to endpoint: http://localhost:8081/subjects/test-value/versions (io.confluent.kafka.schemaregistry.client.rest.RestService)
java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at java.net.Socket.connect(Socket.java:538)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
    at sun.net.www.http.HttpClient.New(HttpClient.java:339)
    at sun.net.www.http.HttpClient.New(HttpClient.java:357)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:142)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:188)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:245)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:237)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:232)
    at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.registerAndGetId(CachedSchemaRegistryClient.java:59)
    at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:91)
    at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:72)
    at io.confluent.kafka.formatter.AvroMessageReader.readMessage(AvroMessageReader.java:158)
    at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:57)
    at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)

Ewen Cheslack-Postava

unread,
Jun 28, 2017, 2:41:57 AM6/28/17
to Confluent Platform
Can you verify that the REST proxy is running? It looks like the REST proxy is failing to communicate with the schema registry, which suggests the schema registry isn't running locally.

-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-platform+unsub...@googlegroups.com.
To post to this group, send email to confluent-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/2ceebb93-e2e5-485b-8577-254f06a6a234%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Masud Sikder

unread,
Nov 16, 2017, 5:46:04 AM11/16/17
to Confluent Platform
Please make sure you have configured the following in the Kafka Properties

advertised.listeners=PLAINTEXT://your.host.name:9092
Reply all
Reply to author
Forward
0 new messages