[
https://issues.apache.org/jira/browse/NIFI-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906886#comment-15906886
]
Puspendu Banerjee commented on NIFI-3579:
-----------------------------------------
[~mosermw] Please note, even though drive D exists as a logical drive but
mountvol could not find it and saying "NO MOUNT POINTS".
BTW, D drive is permanently mounted via Session Manager in Windows and can be
verified at registry
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS
Devices"
I think, you are using standard windows installation without much modification
on drives, mount points and partitions :). Can you please run following 2
commands and pass the information.
{noformat}
PS C:\Users\puspendu> mountvol
Possible values for VolumeName along with current mount points are:
\\?\Volume{ebf1d1c4-99f2-428b-bee6-627f10c83e59}\
C:\
\\?\Volume{141fd1e8-48d6-46e5-b72c-b4d27c6bbacc}\
*** NO MOUNT POINTS ***
======================================================================
PS C:\Users\puspendu> WMIC LOGICALDISK where drivetype!=4 get
deviceid,FileSystem,description
Description DeviceID FileSystem
Local Fixed Disk C: NTFS
Local Fixed Disk D: NTFS
{noformat}
It seems the issue is similar to an open JDK bug :
https://bugs.openjdk.java.net/browse/JDK-8165852
Following are the reference to same kind of issue in *Non-Windows* System but
sounds related:
# https://bugs.openjdk.java.net/browse/JDK-8165323 - cannot get FileStore in
chroot environment
# https://bugs.openjdk.java.net/browse/JDK-8165852 - cannot get FileStore for a
file in overlayfs in Docker
# https://bugs.openjdk.java.net/browse/JDK-8166162 - cannot get FileStore if
device of path is not in /proc/mounts
#
http://hg.openjdk.java.net/jdk9/dev/jdk/file/65042b713b12/src/java.base/linux/classes/sun/nio/fs/LinuxFileStore.java
# http://mail.openjdk.java.net/pipermail/nio-dev/2016-October/003915.html
So, I think the PR corresponding to this ticket will take care of both of the
scenarios without any harm.
> Nifi Failed to Start: nio Files.getFileStore(Path) is buggy in Windows
> ----------------------------------------------------------------------
>
> Key: NIFI-3579
> URL: https://issues.apache.org/jira/browse/NIFI-3579
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.2.0, 1.1.1
> Environment: Win 10 with Oracle JDK 1.8.0_121 on NTFS
> Reporter: Puspendu Banerjee
> Assignee: Puspendu Banerjee
> Priority: Critical
> Labels: windows
> Attachments: nifi-app.log
>
>
> Nifi is failing to start due to IOException originating from
> FileSystemRepository during calls to {code:java}
> Files.getFileStore(path).getTotalSpace();
> Files.getFileStore(path).getUsableSpace();
> {code} with a read-access denied status.
> It looks like a buggy JDK implementation as on the other hand the following
> code is yielding result:
> {code:java}
> path.toFile().getTotalSpace();
> path.toFile().getUsableSpace();
> {code}
> Interestingly, the both of the codes are yielding same results for C:\ or
> System Drive.
> *sample*
> {code:java}
> import java.io.File;
> import java.io.IOException;
> import java.nio.file.Files;
> import java.nio.file.Path;
> import java.nio.file.Paths;
> import java.util.Arrays;
> import static java.lang.System.out;
> public class Blah {
> public static void main(String [] args) throws IOException{
> String [] _paths= {"D:\\workspace\\nifi", "c:\\Program Files"};
> final float divisor=1024 * 1024 * 1024f;
> for(String _path : _paths) {
> try {
> Path path = Paths.get(_path);
> out.println(path.toFile().getTotalSpace() /divisor + "GB");
> out.println(Files.getFileStore(path).getTotalSpace()/divisor
> +"GB");
> }catch (Exception ex){
> ex.printStackTrace();
> }
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)