我们使用数字代码来表示服务器上发生了什么问题。  下面是一个当前使用的错误代码表:

Error Code Retriable Description
UNKNOWN_SERVER_ERROR -1 False The server experienced an unexpected error when processing the request.
NONE 0 False
OFFSET_OUT_OF_RANGE 1 False The requested offset is not within the range of offsets maintained by the server.
CORRUPT_MESSAGE 2 True This message has failed its CRC checksum, exceeds the valid size, has a null key for a compacted topic, or is otherwise corrupt.
UNKNOWN_TOPIC_OR_PARTITION 3 True This server does not host this topic-partition.
INVALID_FETCH_SIZE 4 False The requested fetch size is invalid.
LEADER_NOT_AVAILABLE 5 True There is no leader for this topic-partition as we are in the middle of a leadership election.
NOT_LEADER_OR_FOLLOWER 6 True For requests intended only for the leader, this error indicates that the broker is not the current leader. For requests intended for any replica, this error indicates that the broker is not a replica of the topic partition.
REQUEST_TIMED_OUT 7 True The request timed out.
BROKER_NOT_AVAILABLE 8 False The broker is not available.
REPLICA_NOT_AVAILABLE 9 True The replica is not available for the requested topic-partition. Produce/Fetch requests and other requests intended only for the leader or follower return NOT_LEADER_OR_FOLLOWER if the broker is not a replica of the topic-partition.
MESSAGE_TOO_LARGE 10 False The request included a message larger than the max message size the server will accept.
STALE_CONTROLLER_EPOCH 11 False The controller moved to another broker.
OFFSET_METADATA_TOO_LARGE 12 False The metadata field of the offset request was too large.
NETWORK_EXCEPTION 13 True The server disconnected before a response was received.
COORDINATOR_LOAD_IN_PROGRESS 14 True The coordinator is loading and hence can't process requests.
COORDINATOR_NOT_AVAILABLE 15 True The coordinator is not available.
NOT_COORDINATOR 16 True This is not the correct coordinator.
INVALID_TOPIC_EXCEPTION 17 False The request attempted to perform an operation on an invalid topic.
RECORD_LIST_TOO_LARGE 18 False The request included message batch larger than the configured segment size on the server.
NOT_ENOUGH_REPLICAS 19 True Messages are rejected since there are fewer in-sync replicas than required.
NOT_ENOUGH_REPLICAS_AFTER_APPEND 20 True Messages are written to the log, but to fewer in-sync replicas than required.
INVALID_REQUIRED_ACKS 21 False Produce request specified an invalid value for required acks.
ILLEGAL_GENERATION 22 False Specified group generation id is not valid.
INCONSISTENT_GROUP_PROTOCOL 23 False The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.
INVALID_GROUP_ID 24 False The configured groupId is invalid.
UNKNOWN_MEMBER_ID 25 False The coordinator is not aware of this member.
INVALID_SESSION_TIMEOUT 26 False The session timeout is not within the range allowed by the broker (as configured by group.min.session.timeout.ms and group.max.session.timeout.ms).
REBALANCE_IN_PROGRESS 27 False The group is rebalancing, so a rejoin is needed.
INVALID_COMMIT_OFFSET_SIZE 28 False The committing offset data size is not valid.
TOPIC_AUTHORIZATION_FAILED 29 False Topic authorization failed.
GROUP_AUTHORIZATION_FAILED 30 False Group authorization failed.
CLUSTER_AUTHORIZATION_FAILED 31 False Cluster authorization failed.
INVALID_TIMESTAMP 32 False The timestamp of the message is out of acceptable range.
UNSUPPORTED_SASL_MECHANISM 33 False The broker does not support the requested SASL mechanism.
ILLEGAL_SASL_STATE 34 False Request is not valid given the current SASL state.
UNSUPPORTED_VERSION 35 False The version of API is not supported.
TOPIC_ALREADY_EXISTS 36 False Topic with this name already exists.
INVALID_PARTITIONS 37 False Number of partitions is below 1.
INVALID_REPLICATION_FACTOR 38 False Replication factor is below 1 or larger than the number of available brokers.
INVALID_REPLICA_ASSIGNMENT 39 False Replica assignment is invalid.
INVALID_CONFIG 40 False Configuration is invalid.
NOT_CONTROLLER 41 True This is not the correct controller for this cluster.
INVALID_REQUEST 42 False This most likely occurs because of a request being malformed by the client library or the message was sent to an incompatible broker. See the broker logs for more details.
UNSUPPORTED_FOR_MESSAGE_FORMAT 43 False The message format version on the broker does not support the request.
POLICY_VIOLATION 44 False Request parameters do not satisfy the configured policy.
OUT_OF_ORDER_SEQUENCE_NUMBER 45 False The broker received an out of order sequence number.
DUPLICATE_SEQUENCE_NUMBER 46 False The broker received a duplicate sequence number.
INVALID_PRODUCER_EPOCH 47 False Producer attempted to produce with an old epoch.
INVALID_TXN_STATE 48 False The producer attempted a transactional operation in an invalid state.
INVALID_PRODUCER_ID_MAPPING 49 False The producer attempted to use a producer id which is not currently assigned to its transactional id.
INVALID_TRANSACTION_TIMEOUT 50 False The transaction timeout is larger than the maximum value allowed by the broker (as configured by transaction.max.timeout.ms).
CONCURRENT_TRANSACTIONS 51 False The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing.
TRANSACTION_COORDINATOR_FENCED 52 False Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer.
TRANSACTIONAL_ID_AUTHORIZATION_FAILED 53 False Transactional Id authorization failed.
SECURITY_DISABLED 54 False Security features are disabled.
OPERATION_NOT_ATTEMPTED 55 False The broker did not attempt to execute this operation. This may happen for batched RPCs where some operations in the batch failed, causing the broker to respond without trying the rest.
KAFKA_STORAGE_ERROR 56 True Disk error when trying to access log file on the disk.
LOG_DIR_NOT_FOUND 57 False The user-specified log directory is not found in the broker config.
SASL_AUTHENTICATION_FAILED 58 False SASL Authentication failed.
UNKNOWN_PRODUCER_ID 59 False This exception is raised by the broker if it could not locate the producer metadata associated with the producerId in question. This could happen if, for instance, the producer's records were deleted because their retention time had elapsed. Once the last records of the producerId are removed, the producer's metadata is removed from the broker, and future appends by the producer will return this exception.
REASSIGNMENT_IN_PROGRESS 60 False A partition reassignment is in progress.
DELEGATION_TOKEN_AUTH_DISABLED 61 False Delegation Token feature is not enabled.
DELEGATION_TOKEN_NOT_FOUND 62 False Delegation Token is not found on server.
DELEGATION_TOKEN_OWNER_MISMATCH 63 False Specified Principal is not valid Owner/Renewer.
DELEGATION_TOKEN_REQUEST_NOT_ALLOWED 64 False Delegation Token requests are not allowed on PLAINTEXT/1-way SSL channels and on delegation token authenticated channels.
DELEGATION_TOKEN_AUTHORIZATION_FAILED 65 False Delegation Token authorization failed.
DELEGATION_TOKEN_EXPIRED 66 False Delegation Token is expired.
INVALID_PRINCIPAL_TYPE 67 False Supplied principalType is not supported.
NON_EMPTY_GROUP 68 False The group is not empty.
GROUP_ID_NOT_FOUND 69 False The group id does not exist.
FETCH_SESSION_ID_NOT_FOUND 70 True The fetch session ID was not found.
INVALID_FETCH_SESSION_EPOCH 71 True The fetch session epoch is invalid.
LISTENER_NOT_FOUND 72 True There is no listener on the leader broker that matches the listener on which metadata request was processed.
TOPIC_DELETION_DISABLED 73 False Topic deletion is disabled.
FENCED_LEADER_EPOCH 74 True The leader epoch in the request is older than the epoch on the broker.
UNKNOWN_LEADER_EPOCH 75 True The leader epoch in the request is newer than the epoch on the broker.
UNSUPPORTED_COMPRESSION_TYPE 76 False The requesting client does not support the compression type of given partition.
STALE_BROKER_EPOCH 77 False Broker epoch has changed.
OFFSET_NOT_AVAILABLE 78 True The leader high watermark has not caught up from a recent leader election so the offsets cannot be guaranteed to be monotonically increasing.
MEMBER_ID_REQUIRED 79 False The group member needs to have a valid member id before actually entering a consumer group.
PREFERRED_LEADER_NOT_AVAILABLE 80 True The preferred leader was not available.
GROUP_MAX_SIZE_REACHED 81 False The consumer group has reached its max size.
FENCED_INSTANCE_ID 82 False The broker rejected this static consumer since another consumer with the same group.instance.id has registered with a different member.id.
ELIGIBLE_LEADERS_NOT_AVAILABLE 83 True Eligible topic partition leaders are not available.
ELECTION_NOT_NEEDED 84 True Leader election not needed for topic partition.
NO_REASSIGNMENT_IN_PROGRESS 85 False No partition reassignment is in progress.
GROUP_SUBSCRIBED_TO_TOPIC 86 False Deleting offsets of a topic is forbidden while the consumer group is actively subscribed to it.
INVALID_RECORD 87 False This record has failed the validation on broker and hence will be rejected.
UNSTABLE_OFFSET_COMMIT 88 True There are unstable offsets that need to be cleared.
THROTTLING_QUOTA_EXCEEDED 89 True The throttling quota has been exceeded.
PRODUCER_FENCED 90 False There is a newer producer with the same transactionalId which fences the current one.
RESOURCE_NOT_FOUND 91 False A request illegally referred to a resource that does not exist.
DUPLICATE_RESOURCE 92 False A request illegally referred to the same resource twice.
UNACCEPTABLE_CREDENTIAL 93 False Requested credential would not meet criteria for acceptability.
INCONSISTENT_VOTER_SET 94 False Indicates that the either the sender or recipient of a voter-only request is not one of the expected voters
INVALID_UPDATE_VERSION 95 False The given update version was invalid.
FEATURE_UPDATE_FAILED 96 False Unable to update finalized features due to an unexpected server error.
PRINCIPAL_DESERIALIZATION_FAILURE 97 False Request principal deserialization failed during forwarding. This indicates an internal error on the broker cluster security setup.
SNAPSHOT_NOT_FOUND 98 False Requested snapshot was not found
POSITION_OUT_OF_RANGE 99 False Requested position is not greater than or equal to zero, and less than the size of the snapshot.
UNKNOWN_TOPIC_ID 100 True This server does not host this topic ID.
DUPLICATE_BROKER_REGISTRATION 101 False This broker ID is already in use.
BROKER_ID_NOT_REGISTERED 102 False The given broker ID was not registered.
INCONSISTENT_TOPIC_ID 103 True The log's topic ID did not match the topic ID in the request
INCONSISTENT_CLUSTER_ID 104 False The clusterId in the request does not match that found on the server
TRANSACTIONAL_ID_NOT_FOUND 105 False The transactionalId could not be found
FETCH_SESSION_TOPIC_ID_ERROR 106 True The fetch session encountered inconsistent topic ID usage
我们使用数字代码来表示服务器上发生了什么问题。 下面是一个当前使用的错误代码表: Error Code Retriable Description UNKNOWN_SERVER_ERROR -1 False The server experienced an unexpected error when processing the request. NONE 0 False OFFSET_OUT_OF_RANGE 1 F.. 1.1 概述 我是 cancel savepoint 之后重启不行,直接启动又没事 cancel savepoint 之后重启不行 指定了 从savepoint, -s 指定了 地址 就是要 恢复状态,然后 就出现上述 错误 错误 如下:Caused by: org.apache. kafka .common.errors.InvalidPidMappingException: The producer attempted to use a producer id which is not curre 网站监视器是用于定期监视与预配置网站的状态有关的某些统计信息的系统。 关于网站状态检查的以下参数得以保留: url :网站网址已检查 error_code :由于访问该站点而导致的 错误 代码 。 它包括200 OK。 如果存在与HTTP不直接相关的 错误 ,则将使用其他 错误 代码 ,例如404(用于DNS名称解析失败)或599(用于TCP连接超时)。 如果尝试访问url时出现的 错误 不是前面提到的任何 错误 ,则将使用默认值-1。 response_time :向URL发出GET请求时的响应时间。 regex_pattern :当GET请求成功时,将应用于响应HTML有效负载的模式。 matched_text :响应HTML有效负载中的匹配文本,带有指定的regex_pattern。 该解决方案是通过使用微服务的事件驱动架构来实现的。 它由两个微服务组成:监视器和使用者。
org.apache. kafka .common.errors.ProducerFencedException: Producer attempted an operation with an old
Flight_delay_prediction_web_app 大数据Web应用程序的 代码 ,可使用Python,Flask,Apache Spark, Kafka ,MongoDB,ElasticSearch,d3.js,scikit-learn,MLlib和Apache Airflow预测美国航空公司的延误。 对于这个项目,我遵循了《敏捷数据科学2.0》(Russell Jurney的书)一书,学习了如何从前端到后端构建和实现完整的数据科学产品。 在该项目中,我还将检查所有 代码 ,识别并修复一些 错误 ,以使应用程序的某些部分按预期工作。 流浪汉/ Virtualbox安装 使用Vagrant和Virtualbox,安装过程需要几分钟。 注意:Vagrant / Virtualbox方法需要9GB的可用RAM,这意味着要关闭16GB Macbook Pro上的大多数程序。 如果您没有关闭
这是一个示例存储库,展示了如何设置 Java 项目以使用 Kafka Spout ,它现在是 Storm 0.9.3 版的一部分。 在撰写本文时在线的其他示例要么是 错误 的(过时的),要么展示了如何在本地模式下使用 Kafka Spout 但不是针对单独的 Kafka 系统的“集群模式”,或者令人困惑,因为它们添加了许多多余的东西(和在 Scala 中做例子)。 这个例子是在“做最简单的事情,可以工作”的脉络。 正确设置 pom 以便 Storm 和 Kafka 之间不兼容的日志库不会在头脑中拍摄拓扑是最困难的部分(我生命中失去了一天的时间来解决这个问题)。 所以这可能是最脆弱的部分 - 它可能会在其他系统和其他版本(过去或未来)上损坏。 这些拓扑是基于 P. Taylor Goetz 的一书的第 1 章的基本字数拓扑。 有两个版本: 一个使用内存中的SentenceSpout (取 如果有问题可以留言指正,不过要给出经过验证的结论。 一、Producer发送消息时报错 :Topic {{topic_name}} not present in metadata after 60000 ms 在利用 Kafka Template发送数据时 代码 如下: ListenableFuture<SendResult<String, String>> future = kafk 签出和建设 要检出项目并从源 代码 进行构建,请执行以下操作: git clone git://github.com/spring-projects/spring- kafka .git cd spring- kafka ./gradlew build 建议使用Java SE 7或更高版本来构建项目。 如果在构建期间遇到内存不足 错误 ,请增加Gradle的可用堆和permgen: GRADLE_OPTS='-XX:MaxPermSize=1024m -Xmx1024m' 要将jar生成并安装到本地Maven缓存中: ./gradlew install 要构建API Javadoc(结果将在build/api ): ./gradlew api 要构建参考文档(结果将在build/reference ): ./gradlew reference 要构建完整的发行版,包括-dist import org.apache. kafka .clients.consumer.ConsumerConfig; import org.apache. kafka .clients.consumer.ConsumerRecord; import org.apache. kafka .clients.consumer.ConsumerRecords; import org.apache. kafka .clients.consumer. Kafka Consumer; import java.time.Duration; import java.util.Arrays; import java.util.Properties; public class Kafka ConsumerExample { public static void main(String[] args) { Properties properties = new Properties(); properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); properties.put(ConsumerConfig.GROUP_ID_CONFIG, "test-group"); properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, "org.apache. kafka .common.serialization.StringDeserializer"); properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, "org.apache. kafka .common.serialization.StringDeserializer"); Kafka Consumer<String, String> consumer = new Kafka Consumer<>(properties); consumer.subscribe(Arrays.asList("test-topic")); while (true) { ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100)); for (ConsumerRecord<String, String> record : records) { System.out.println("Key: " + record.key() + ", Value: " + record.value()); 在这段 代码 中,我们创建了一个 ` Kafka Consumer` 对象,并使用 `subscribe` 方法订阅了一个名为 "test-topic" 的主题。然后,我们在一个死循环中不断调用 `poll` 方法,以从 Kafka 服务器中获取消息。每当收到消息时,我们都会打印出消息的键和值。 请注意,上面的 代码 仅仅是一个简单的示例,它不适用于生产环境。在实际的应用程序中,您可能需要处理更多的 错误 处理和异常处理