File write operations through java on a mounted location keeps on failing on Yosemite

109 views Asked by At

My web project development and debugging setup requires mounting a file location on CentOS VM running on my development system and writing files to that mounted location. Everything used to work fine till few days back when I was on maverick. Recently I upgraded to Yosemite(10.10.3) and now file write operations on the mounted location keeps on failing randomly. Failure is not consistent but occurs with a very high frequency and my development setup is almost rendered useless. The same file operation which times out once or twice may succeed on the second or third try so the problem is not that mounted location gets unmounted because I do not mount the location even in the later attempts and file write succeeds automatically on its own.

I keep on getting following stack trace( I am only pasting few relevant calls from top of the call stack)

Caused by: java.io.IOException: Operation timed out
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:345)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1489)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1465)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1440)

Could anyone help me with what is wrong with Yosemite or something wrong that I am doing. Any help, ideas, thoughts will be highly appreciated otherwise I need to go back to maverick which would mean loosing all my data and development setup and doing it again on maverick.

1

There are 1 answers

3
Sylas Lo On

Can you simply create a file in that location? Try this: File f=new File("the location");