Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to apply new FileOutputStream to report directly to Input/output error by java in docker

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to apply new FileOutputStream to java in docker to report Input/output error directly. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

A java application running in a docker container is a scheduled task, which pulls remote file packages and saves them to this machine every day, named decrypt-20181020.

On this very day, the task failed and java prompted an exception: java.io.FileNotFoundException: / tmp/decrypt-20181020 Input/output error

Cause by:... Com.pollyduan.job.GetFileService:54

Find the code for the corresponding line:

FileOutputStream out = new FileOutputStream (targetFile)

In general, new an OutputStream should not report an error in any way, after all, no read or write operation has been started.

It's weird, normal the day before and the day after.

Enter the tmp directory in bash:

Touch decrypt-20181020touch: cannot touch `decrypt-20181020': Input/output error

The other file names are fine.

There is plenty of hard disk space

View the device troubleshooting log:

# dmesg... [72458282.116220] EXT4-fs error (device dm-6): htree_dirblock_to_tree:914: inode # 2097766: block 8397500: comm bash: bad entry in directory: rec_len is smaller than minimal-offset=0 (335872), inode=0, rec_len=0, name_len=0

Search to Stack Overflow, see that restart can be solved. As the business is running, there is no attempt, I will try to update it later.

At present, the temporary file name modification is temporarily resolved.

About how to use new FileOutputStream in docker to directly report to Input/output error to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report