简体   繁体   English

通过Java在已安装位置进行文件写入操作在优胜美地上持续失败

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

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. 我的Web项目开发和调试设置要求在开发系统上运行的CentOS VM上安装文件位置,并将文件写入该安装位置。 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. 最近,我升级到优胜美地(10.10.3),现在在已安装位置上的文件写入操作会继续随机失败。 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. 任何帮助,想法,想法都将受到高度赞赏,否则我需要回到特立独行,这意味着失去我所有的数据和开发设置,然后在特立独行上再次进行。

Can you simply create a file in that location? 您可以简单地在该位置创建文件吗? Try this: File f=new File("the location"); 试试这个:File f = new File(“ the location”);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM