[ 
https://issues.apache.org/jira/browse/NIFI-3678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960875#comment-15960875
 ] 

ASF subversion and git services commented on NIFI-3678:
-------------------------------------------------------

Commit 292dd1d66b1726794f0d34523578727ea3a7fe08 in nifi's branch 
refs/heads/master from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=292dd1d ]

NIFI-3678: Ensure that we catch EOFException when reading header information 
from WAL Partition files; previously, we caught EOFExceptions when reading a 
'record' from the WAL but not when reading header info

NIFI-3678: If we have a transaction ID but then have no more data written to 
Partition file, we end up with a NPE. Added logic to avoid this and instead 
return null for the next record when this happens

This closes #1656.

Signed-off-by: Bryan Bende <bbe...@apache.org>


> NiFi may fail to startup if shutdown while FlowFile Repository partition is 
> full
> --------------------------------------------------------------------------------
>
>                 Key: NIFI-3678
>                 URL: https://issues.apache.org/jira/browse/NIFI-3678
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 1.2.0
>
>
> A user from the users list posted that they are seeing the following stack 
> trace when trying to startup NiFi:
> {code}
> 2017-02-03 16:04:48,588 ERROR [main] o.a.nifi.controller.StandardFlowService 
> Failed to load flow from cluster due to: 
> org.apache.nifi.cluster.ConnectionException: Failed to connect node to 
> cluster due to: java.io.IOExcept 
> ion: Unable to read Record Schema from stream 
> org.apache.nifi.cluster.ConnectionException: Failed to connect node to 
> cluster due to: java.io.IOException: Unable to read Record Schema from stream 
>         at 
> org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:901)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.controller.StandardFlowService.load(StandardFlowService.java:493)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:770) 
> [nifi-jetty-1.1.0.jar:1.1.0] 
>         at org.apache.nifi.NiFi.<init>(NiFi.java:156) 
> [nifi-runtime-1.1.0.jar:1.1.0] 
>         at org.apache.nifi.NiFi.main(NiFi.java:262) 
> [nifi-runtime-1.1.0.jar:1.1.0] 
> Caused by: java.io.IOException: Unable to read Record Schema from stream 
>         at 
> org.apache.nifi.repository.schema.RecordSchema.readFrom(RecordSchema.java:117)
>  ~[nifi-schema-utils-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.controller.repository.SchemaRepositoryRecordSerde.readHeader(SchemaRepositoryRecordSerde.java:100)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         at 
> org.wali.MinimalLockingWriteAheadLog$Partition.getRecoveryStream(MinimalLockingWriteAheadLog.java:1005)
>  ~[nifi-write-ahead-log-1.1.0.jar:1.1.0] 
>         at 
> org.wali.MinimalLockingWriteAheadLog$Partition.getNextRecoverableTransactionId(MinimalLockingWriteAheadLog.java:1016)
>  ~[nifi-write-ahead-log-1.1.0.jar:1.1.0] 
>         at 
> org.wali.MinimalLockingWriteAheadLog.recoverFromEdits(MinimalLockingWriteAheadLog.java:430)
>  ~[nifi-write-ahead-log-1.1.0.jar:1.1.0] 
>         at 
> org.wali.MinimalLockingWriteAheadLog.recoverRecords(MinimalLockingWriteAheadLog.java:301)
>  ~[nifi-write-ahead-log-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.controller.repository.WriteAheadFlowFileRepository.loadFlowFiles(WriteAheadFlowFileRepository.java:346)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.controller.FlowController.initializeFlow(FlowController.java:700)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:701)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.controller.StandardFlowService.loadFromConnectionResponse(StandardFlowService.java:872)
>  ~[nifi-framework-core-1.1.0.jar:1.1.0] 
>         ... 4 common frames omitted 
> Caused by: java.io.EOFException: null 
>         at java.io.DataInputStream.readFully(DataInputStream.java:197) 
> ~[na:1.8.0_111] 
>         at java.io.DataInputStream.readUTF(DataInputStream.java:609) 
> ~[na:1.8.0_111] 
>         at java.io.DataInputStream.readUTF(DataInputStream.java:564) 
> ~[na:1.8.0_111] 
>         at 
> org.apache.nifi.repository.schema.RecordSchema.readField(RecordSchema.java:126)
>  ~[nifi-schema-utils-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.repository.schema.RecordSchema.readField(RecordSchema.java:144)
>  ~[nifi-schema-utils-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.repository.schema.RecordSchema.readField(RecordSchema.java:144)
>  ~[nifi-schema-utils-1.1.0.jar:1.1.0] 
>         at 
> org.apache.nifi.repository.schema.RecordSchema.readFrom(RecordSchema.java:111)
>  ~[nifi-schema-utils-1.1.0.jar:1.1.0] 
>         ... 13 common frames omitted 
> {code}
> It appears that we do not properly handle Exceptions that are thrown when 
> reading the header information from a Partition file.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to