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:
- You are using MySQL
- The results of this query on that MySQL instance:
select @@DATADIR
- The version of MySQL
- That /mysql/datadir does exist
- 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:
- You are using MySQL
- The results of this query on that MySQL instance:
select @@DATADIR
- The version of MySQL
- That /mysql/datadir does exist
- That the user running Mango has read access to /mysql/datadir
Then I can provide more specific help I think.
- Yes, 5.7.25 on a separate dedicated mysql server
- SELECT @@DATADIR
/mysql/datadir/ - as above 5.7.25
- There is no
/mysql/datadir
- 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 -
To get around my issue, we created a \rdsdbdata\db folder so Mango can read it, even though our DB is not local to the app server.
-
@cmusselm Sorry guys, there is no way to disable it without disabling all disk usage monitoring using the property:
internal.monitor.diskUsage.enabled=false