HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- data loss in the secure file transfer using java
Operating System - HP-UX
1825801
Members
2260
Online
109687
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2008 10:19 AM
10-07-2008 10:19 AM
data loss in the secure file transfer using java
Hi,
My java Appllication uses the sftp(secure file transfer protocol) for file transferring. when the load is high like 150 GB , data loss occuring for some files especially last chunk of data is missing.
Core file transfer code
while (true)
{
int read = bis.read(buffer); //Reading bytes into the byte array (buffer) from network stream (bis).
if (read==-1) {
break; //Break the loop, if there are no more bytes available in the InputStream.
}
bos.write(buffer,0,read); //Writing the same number of bytes what we read into buffer byte array into OutputStream
complete.update(buffer,0,read); //Giving the same number of bytes what we read above to the checksum calculation.
bytesSoFar += read; //Incrementing the bytes that we have read from the source.
//if the bytes transferred are equal to the source file size
If (bytesSoFar == fileInfo.getFileSize().intValue())
{
// Calculate the file checksum.
// Update DbAuditLog with checksum and no. of bytes read
}
else
{
// Update DbAuditLog with no. of bytes read
}
}
bos.flush();
Please help , why the data loss is happening when the big size files transfer
Note:
1.150 gb not a single file multiple files.
2.SFTP no java specific API, So connection is happening through java .io.sockect connection
Due to data loss, checksum also not correct.
This issue not occurring continuously.. some times whole transfer failing or success.
Is NFS mount plays any role when this occurrence happening .. OS is HP-UX ia64 itanium version.
OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005
HP-UX Secure Shell-A.04.30.007, HP-UX Secure Shell version
java version "1.5.0.05"
Now we are observing with glance tool which is provided by hp to analyze system activity
Application is running along with jconsole.
All the transaction are running under multithreaded way.. that means,most of the txns run multi threaded way , few txns run under singel thread. it depends on the threads available in the thread pool.
My java Appllication uses the sftp(secure file transfer protocol) for file transferring. when the load is high like 150 GB , data loss occuring for some files especially last chunk of data is missing.
Core file transfer code
while (true)
{
int read = bis.read(buffer); //Reading bytes into the byte array (buffer) from network stream (bis).
if (read==-1) {
break; //Break the loop, if there are no more bytes available in the InputStream.
}
bos.write(buffer,0,read); //Writing the same number of bytes what we read into buffer byte array into OutputStream
complete.update(buffer,0,read); //Giving the same number of bytes what we read above to the checksum calculation.
bytesSoFar += read; //Incrementing the bytes that we have read from the source.
//if the bytes transferred are equal to the source file size
If (bytesSoFar == fileInfo.getFileSize().intValue())
{
// Calculate the file checksum.
// Update DbAuditLog with checksum and no. of bytes read
}
else
{
// Update DbAuditLog with no. of bytes read
}
}
bos.flush();
Please help , why the data loss is happening when the big size files transfer
Note:
1.150 gb not a single file multiple files.
2.SFTP no java specific API, So connection is happening through java .io.sockect connection
Due to data loss, checksum also not correct.
This issue not occurring continuously.. some times whole transfer failing or success.
Is NFS mount plays any role when this occurrence happening .. OS is HP-UX ia64 itanium version.
OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005
HP-UX Secure Shell-A.04.30.007, HP-UX Secure Shell version
java version "1.5.0.05"
Now we are observing with glance tool which is provided by hp to analyze system activity
Application is running along with jconsole.
All the transaction are running under multithreaded way.. that means,most of the txns run multi threaded way , few txns run under singel thread. it depends on the threads available in the thread pool.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2008 10:37 AM
10-07-2008 10:37 AM
Re: data loss in the secure file transfer using java
Shalom,
Your ssh/sftp verion is very old.
That version is quite buggy I recall.
Make sure your code is solid and then look for OS and network causes.
SEP
Your ssh/sftp verion is very old.
That version is quite buggy I recall.
Make sure your code is solid and then look for OS and network causes.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP