Apache Kafka 用 Anypoint Connector (Apache Kafka Connector) をトラブルシューティングするには、スローされる一般的な例外メッセージの解釈について理解しておく必要があります。
Unresolved include directive in modules/ROOT/pages/kafka-connector-troubleshooting.adoc - include::connectors::partial$ssl-logs.adoc[]
Unresolved include directive in modules/ROOT/pages/kafka-connector-troubleshooting.adoc - include::connectors::partial$verbose-exception-logs.adoc[]
Unresolved include directive in modules/ROOT/pages/kafka-connector-troubleshooting.adoc - include::connectors::partial$verbose-logs-com.adoc[]
一般的なエラーのトラブルシューティング
Apache Kafka Connector の一般的なエラーとその解決方法のリストを次に示します。
SSL キーストアを読み込めなかった
Kafka Connector 設定でクラスパスから必要なトラストストアファイルを読み込めない場合、次のエラーが表示されます。
org.mule.runtime.api.connection.ConnectionException: Failed to load SSL keystore
連動関係がバンドルされた Kafka Connector 設定では、必要なトラストストアファイルがクラスパスで使用できても接続を確立できません。
このエラーを解決する手順は、次のとおりです。
Kafka Connector 設定を使用して、必要なトラストストアファイルをメインアプリケーションを追加します。
clientDNSLookUp プロパティのトラブルシューティング
Kafka Connector バージョン 3.0.0 以降、コネクタの下位互換性を確保するために [DNS Lookup (DNS ルックアップ)] 項目のデフォルト値が削除されました。Kafka Connector では、以前のバージョンと同じ値が保持されますが、各値が次のプロパティに対応するようになりました。
| Value (値) | プロパティ |
|---|---|
DEFAULT |
use_all_dns_ips |
USE_ALL_DNS_IPS |
use_all_dns_ips |
RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY |
resolve_canonical_bootstrap_servers_only |
Null 値のパブリッシュのトラブルシューティング
Publish 操作では、入力として null を受け取ると、空のバイト配列をパブリッシュします。
この問題を回避するために、コネクタでは mule.kafka.publish.useNull ブール値システムプロパティを設定できます。
-
true に設定すると、コネクタは値として null を使用してメッセージをパブリッシュします。 -
false に設定するか、まったく設定しない場合、コネクタは空のバイト配列値を使用してメッセージをパブリッシュします。
システムプロパティの設定方法についての詳細は、「システムプロパティの使用」を参照してください。
スローされる一般的な例外メッセージの理解
スローされる一般的な例外メッセージとその解釈方法のリストを次に示します。
-
KAFKA:ALREADY_COMMITTED
A commit fails because the commit is already performed. (コミットがすでに実行されているため、コミットが失敗しました。)
-
KAFKA:AUTHENTICATION_ERROR(SECURITY)
An authentication error is thrown. (認証エラーがスローされました。)
-
KAFKA:AUTHORIZATION_ERROR(CLIENT_SECURITY)
An authorization error occurred due to the client configuration or permissions. (クライアントの設定または権限が原因で認証エラーが発生しました。)
-
KAFKA:COMMIT_FAILED
A commit fails with an unrecoverable error. (回復不能なエラーでコミットが失敗しました。)
-
KAFKA:CONNECTIVITY
Either a connection could not be established or there is a connectivity error. (接続を確立できなかったか、接続エラーがあります。)
-
KAFKA:ILLEGAL_STATE
The consumer is not subscribed to any topics, and no manually assigned partitions are set to consume from. (コンシューマーがトピックにサブスクライブされておらず、手動で割り当てられたパーティションがコンシューム元として設定されていません。)
-
KAFKA:INPUT_TOO_LARGE
The input is too large for the broker. (ブローカーの入力が長すぎます。)
-
KAFKA:INVALID_ACK_MODE
An acknowledgement (ACK) or negative acknowledgement (NACK) operation is run over a consumer that is not in `MANUAL` mode. (MANUAL モードでないコンシューマーで肯定応答 (ACK) または否定応答 (NACK) 操作が実行されています。)
-
KAFKA:INVALID_CONFIGURATION
An invalid configuration value is set for the consumer or the producer. (コンシューマーまたはプロデューサーに無効な設定値が定義されています。)
-
KAFKA:INVALID_CONNECTION
The referenced connection is invalid. (参照されている接続が無効です。)
-
KAFKA:INVALID_INPUT
The parameters set for the operation are incorrect. (操作に設定されているパラメーターが正しくありません。)
-
KAFKA:INVALID_OFFSET
The partition number set for the operation is less than `0`, is above the number of partitions, or is an invalid value. (操作に設定されているパーティション番号が 0 より小さいか、パーティション数を上回っているか、無効な値です。)
-
KAFKA:INVALID_TOPIC
The topic selected for the operation is invalid, and there is no automatic generation of said topic. (操作に選択されたトピックが無効で、トピックの自動生成がありません。)This might also imply an invalid character in the topic name. (トピック名に無効な文字が含まれている可能性もあります。)
-
KAFKA:INVALID_TOPIC_PARTITION
The topic partition combination selected for the operation is invalid, and there is no automatic generation of topics. (操作に選択されたトピックパーティションの組み合わせが無効で、トピックの自動生成がありません。)This might also imply an invalid character in the topic name, or a non-existing partition. (トピック名に無効な文字が含まれているか、パーティションが存在しない可能性もあります。)
-
KAFKA:NO_POLL_MADE
No poll was made. (ポーリングが行われませんでした。)
-
KAFKA:NOT_FOUND
For consume operations, the poll does not bring any records for the configured timeouts. (Consume 操作のポーリングで、設定されたタイムアウト中にレコードが取得されませんでした。)
-
KAFKA:OUT_OF_RANGE
There is no reset policy defined, and the offsets for these partitions are either larger or smaller than the range of offsets the server has for the given partition. (リセットポリシーが定義されておらず、これらのパーティションのオフセットが、サーバーの特定のパーティションのオフセットの範囲よりも大きくなっているか、小さくなっています。)
-
KAFKA:PREVIOUS_ASSIGNATION
subscribe() is called previously with topics or pattern without a subsequent call to unsubscribe(). (トピックまたはパターンがあり、unsubscribe() への後続のコールがない subscribe() が以前にコールされています。)
-
KAFKA:PRODUCER_FENCED
Another producer with the same `transactional.id` is active. (同じ transactional.id を持つ別のプロデューサーがアクティブになっています。)
-
KAFKA:RETRY_EXHAUSTED
The maximum number of retries for the operation is reached. (操作の最大再試行回数に達しました。)
-
KAFKA:SESSION_NOT_FOUND
No associated session is found when executing an operation. (関連付けられたセッションが操作の実行時に見つかりませんでした。)
-
KAFKA:TIMEOUT
A specific request takes longer than the configuration timeout values. (特定の要求に設定タイムアウト値よりも長い時間がかかっています。)