向终结点发送http请求失败:http://kafkatestserver:8081/主题/主题名称/版本
属性如下:
schemaRegistryEndPoint = http://kafkatestserver:8081
spring.cloud.stream.default.contentType = application/*+avro
spring.cloud.stream.kafka.binder.brokers = vs-kafkabroker-9093-testenv-datacenter.organizationname.com:9093
当我试图通过本地主机运行producer应用程序时,将一个记录生成到kafka集群的同一个目的地,一切正常。当我将它部署在测试服务器上并尝试发送一条消息时,问题就出现了,这个异常发生了。
任何输入都会有帮助。
下面是stacktrace
java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_191]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_191]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_191]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_191]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_191]
at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_191]
at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[?:1.8.0_191]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:1.8.0_191]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:1.8.0_191]
at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) ~[?:1.8.0_191]
at sun.net.www.http.HttpClient.New(HttpClient.java:339) ~[?:1.8.0_191]
at sun.net.www.http.HttpClient.New(HttpClient.java:357) ~[?:1.8.0_191]
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220) ~[?:1.8.0_191]
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) ~[?:1.8.0_191]
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) ~[?:1.8.0_191]
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984) ~[?:1.8.0_191]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334) ~[?:1.8.0_191]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309) ~[?:1.8.0_191]
at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:178) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:235) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:326) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:318) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.schemaregistry.client.rest.RestService.registerSchema(RestService.java:313) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.registerAndGetId(CachedSchemaRegistryClient.java:119) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.register(CachedSchemaRegistryClient.java:156) [kafka-schema-registry-client-5.1.0.jar!/:?]
at io.confluent.kafka.serializers.AbstractKafkaAvroSerializer.serializeImpl(AbstractKafkaAvroSerializer.java:79) [kafka-avro-serializer-5.1.0.jar!/:?]
at io.confluent.kafka.serializers.KafkaAvroSerializer.serialize(KafkaAvroSerializer.java:53) [kafka-avro-serializer-5.1.0.jar!/:?]
at org.apache.kafka.common.serialization.ExtendedSerializer$Wrapper.serialize(ExtendedSerializer.java:65) [kafka-clients-2.0.1.jar!/:?]
at org.apache.kafka.common.serialization.ExtendedSerializer$Wrapper.serialize(ExtendedSerializer.java:55) [kafka-clients-2.0.1.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:841) [kafka-clients-2.0.1.jar!/:?]
at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:803) [kafka-clients-2.0.1.jar!/:?]
at org.springframework.kafka.core.DefaultKafkaProducerFactory$CloseSafeProducer.send(DefaultKafkaProducerFactory.java:433) [spring-kafka-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.kafka.core.KafkaTemplate.doSend(KafkaTemplate.java:372) [spring-kafka-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.kafka.core.KafkaTemplate.send(KafkaTemplate.java:209) [spring-kafka-2.2.2.RELEASE.jar!/:2.2.2.RELEASE]
at org.springframework.integration.kafka.outbound.KafkaProducerMessageHandler.handleRequestMessage(KafkaProducerMessageHandler.java:382) [spring-integration-kafka-3.1.0.RELEASE.jar!/:3.1.0.RELEASE]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:123) [spring-integration-core-5.1.1.RELEASE.jar!/:5.1.1.
暂无答案!
目前还没有任何答案,快来回答吧!