0

管理者ガイドで説明されているように、nifi.processor.scheduling.timeout は本当にデフォルトで無限に設定されていますか? コードを見ると、60 秒後にタイムアウトしているようです。起動 (リソースのロード) に少し時間がかかるプロセッサがあり、「OnScheduled の待機中にタイムアウトしました」というエラーが発生しています。起動時に失敗することがあり、その後も同じエラーで失敗し続ける理由を理解しようとしているだけです。

本当に奇妙です。すべてのプロセッサの電源を切り、インスタンスをバウンスしてプロセッサを個別に起動すると、問題が解消されるようです。ただし、それらがすべてオンの状態でインスタンスを再起動すると、エラーが発生します。

簡単に別のものになる可能性がありますが、起動シーケンスは機能しているようです。

NIFI管理者

NIFI プロセッサ コード

タイムアウトエラーが見つかったNIFI Githubのコードスニペット

    String timeoutString = NiFiProperties.getInstance().getProperty(NiFiProperties.PROCESSOR_SCHEDULING_TIMEOUT);
long onScheduleTimeout = timeoutString == null ? 60000
        : FormatUtils.getTimeDuration(timeoutString.trim(), TimeUnit.MILLISECONDS);
Future<?> taskFuture = callback.invokeMonitoringTask(task);
try {
    taskFuture.get(onScheduleTimeout, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
    LOG.warn("Thread was interrupted while waiting for processor '" + this.processor.getClass().getSimpleName()
            + "' lifecycle OnScheduled operation to finish.");
    Thread.currentThread().interrupt();
    throw new RuntimeException("Interrupted while executing one of processor's OnScheduled tasks.", e);
} catch (TimeoutException e) {
    taskFuture.cancel(true);
    LOG.warn("Timed out while waiting for OnScheduled of '"
            + this.processor.getClass().getSimpleName()
            + "' processor to finish. An attempt is made to cancel the task via Thread.interrupt(). However it does not "
            + "guarantee that the task will be canceled since the code inside current OnScheduled operation may "
            + "have been written to ignore interrupts which may result in runaway thread which could lead to more issues "
            + "eventually requiring NiFi to be restarted. This is usually a bug in the target Processor '"
            + this.processor + "' that needs to be documented, reported and eventually fixed.");
    throw new RuntimeException("Timed out while executing one of processor's OnScheduled task.", e);
} catch (ExecutionException e){
    throw new RuntimeException("Failed while executing one of processor's OnScheduled task.", e);
} finally {
    callback.postMonitor();
}
4

0 に答える 0