Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

java.nio.file.NoSuchFileException: /mysql/datadir


  • Trying to do a restore nosql db complete backup. ver 3.7.7
    And mango crashes and I receive this error:

    ERROR 2020-07-31T00:36:41,201 (com.infiniteautomation.mango.spring.components.DiskUsageMonitoringService.doPoll:159) - Unable to get Filestore partition usage
    java.nio.file.NoSuchFileException: /mysql/datadir
            at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[?:1.8.0_171]
            at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_171]
            at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_171]
            at sun.nio.fs.UnixFileStore.devFor(UnixFileStore.java:57) ~[?:1.8.0_171]
            at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:64) ~[?:1.8.0_171]
            at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:44) ~[?:1.8.0_171]
            at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51) ~[?:1.8.0_171]
            at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39) ~[?:1.8.0_171]
            at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368) ~[?:1.8.0_171]
            at java.nio.file.Files.getFileStore(Files.java:1461) ~[?:1.8.0_171]
            at com.infiniteautomation.mango.spring.components.DiskUsageMonitoringService.doPoll(DiskUsageMonitoringService.java:155) ~[mango-3.7.7.jar:?]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_171]
            at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_171]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_171]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_171]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
            at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
    
    

    EDIT: I realised I had accidentally clicked the incremental restore button. Don't know if that caused it but it may have something to do with trying to move 5GB of compressed NoSQL data...

    Fox


  • That shouldn't affect a restore. The DiskUsageMonitoringService is a service that runs periodically to compute the disk usage for Mango.

    What you are seeing is it fail because your MySQL instance is setup to have its data directory at /mysql/datadir and that file does not exist. The service attempts to find the data directory for MySQL by doing this query:

    select @@DATADIR

    Which should return the path to where it stores it's data.


  • Noted thanks. Is there anything I can put into the config so I'm not getting this error cropping up and throwing me off??

    Fox


  • I would be interested to find out if there is a configuration problem here or if Mango could be doing something better.

    Can you confirm:

    1. You are using MySQL
    2. The results of this query on that MySQL instance: select @@DATADIR
    3. The version of MySQL
    4. That /mysql/datadir does exist
    5. That the user running Mango has read access to /mysql/datadir

    Then I can provide more specific help I think.


  • @terrypacker said in java.nio.file.NoSuchFileException: /mysql/datadir:

    I would be interested to find out if there is a configuration problem here or if Mango could be doing something better.

    Can you confirm:

    1. You are using MySQL
    2. The results of this query on that MySQL instance: select @@DATADIR
    3. The version of MySQL
    4. That /mysql/datadir does exist
    5. That the user running Mango has read access to /mysql/datadir

    Then I can provide more specific help I think.

    1. Yes, 5.7.25 on a separate dedicated mysql server
    2. SELECT @@DATADIR
      /mysql/datadir/
    3. as above 5.7.25
    4. There is no /mysql/datadir
    5. err looks like mango is running as root...

  • I also get this error, but for the \rdsdbdata\db directory. We're running MySQL on Amazon RDS. I'm guessing Mango does not have permissions to view the file system, or is treating \rdsdbdata\db as a local directory when trying to view the usage?

    As Fox asked, any way to disable this check to save some errors in the log file?

    Thanks,
    Chad