Operating System - HP-UX
1821537 Members
2640 Online
109633 Solutions
New Discussion юеВ

gzip files getting corrupt from unix to windows server 2000

 
SOLVED
Go to solution
boomer_2
Super Advisor

gzip files getting corrupt from unix to windows server 2000

hi guys,
When i m ftp'ing some reports from my HP UNIX server rx4640 8gb ram,11i v2 to windows server 2000 my those gzip files r getting corrupted..

So what do i do for this problem...??
The reports r going from 10Mbps link to 64kbps ...is it the network issue or something else ?????
11 REPLIES 11
Matti_Kurkela
Honored Contributor

Re: gzip files getting corrupt from unix to windows server 2000

FTP has two transfer modes: binary and ASCII. With traditional FTP clients and servers, the default mode is ASCII.

Windows and HP-UX have a different line-ending format (Windows uses CR+LF while HP-UX uses LF only). If you use FTP's ASCII transfer mode when transferring files between Windows and HP-UX, FTP will automatically try to convert the line-ending format. If the file is not an ASCII file (for example, it's a gzipped file), the file is guaranteed to become corrupted.

Solution: if you use a command-line FTP program, use the FTP command "bin" before transferrring the file. If you use some GUI-based FTP program, find out how to set the correct transfer mode.

MK
MK
Steven E. Protter
Exalted Contributor

Re: gzip files getting corrupt from unix to windows server 2000

Shalom,

The ftp client in windows defaults to ascii.

This will trash your files.

If you use sftp, it is smart enough to tell the difference.

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
whiteknight
Honored Contributor

Re: gzip files getting corrupt from unix to windows server 2000

Boomer,

make sure when you ftp, transfer in binary mode.

WK
Problem never ends, you must know how to fix it
boomer_2
Super Advisor

Re: gzip files getting corrupt from unix to windows server 2000

hi guys,
I am damn sure that we r tranferring in binary mode only.......recently we have carried out a test of increasing my bandwidth from 64 kbps to 128 kbps which for that day the files did not get corrupt.........
so we r looking to test it for another 7 days and lets see........
i just wanted to make sure from my end that everythings fine as far as HPUX is concerned........and nothing else....
will keep u updated regarding this issue....

Thanx again Mr. Steve,Whiteknight,Matti
Jollyjet
Valued Contributor

Re: gzip files getting corrupt from unix to windows server 2000

Confirm ur files by unzipping in hp-ux and find any error ur reciving in hpux it happens the gzip has not completed successfully redo the action by doing tar and then gzip and covert to binary mode and transfer the file.
boomer_2
Super Advisor

Re: gzip files getting corrupt from unix to windows server 2000

hi Jollyjet,
i have confirmed no error is received when i unzip the files on my hpux server......infact what i tried is one more thing.......
i ftped the same reports of gzip format to one of my local server....and also the remote server which is 300 kms away frm us.....
And nw when i opened the files in my local server they r fine.........whereas when i tried to open it from the remote server they were not properly formatted........almost gone awry---
Steven Schweda
Honored Contributor

Re: gzip files getting corrupt from unix to windows server 2000

> When i m ftp'ing some reports [...]

How, exactly? Which system is the FTP
client, and which is the server? Which FTP
software is being used at each end?

> [...] those gzip files r getting corrupted..

Corrupted how? What is that actual symptom?

> So what do i do for this problem...??

Describing it clearly and in detail might be
a good first step.

As everyone else has said, ASCII-FTP is
probably the easiest way to corrupt a
non-text file.

> [...] we r tranferring in binary mode only

And you know this how? Faith? Evidence?

Have you compared the sizes of the files at
each end?

Can you look at the actual file data (easier
with a small file), to see what happened?
"od" or something similar should exist on the
HP-UX side. I don't know what exists on
Windows for this purpose, but if you have any
FTP software there (or perhaps some other
method), you could re-transfer a bad file
back to the HP-UX system for comparison.
Bill Hassell
Honored Contributor
Solution

Re: gzip files getting corrupt from unix to windows server 2000

Sounds like you have very serious network problems. You'll need to get your network administrator to measure the reliability of the link. You can do a very simple test with ping -- packet loss more than 0% indicates an unreliable link. If you cannot improve the link, you may have to use a dialup modem instead, choose another carrier for your data or setup a checksum procedure on the Windows side and have the Windows server requrest a retransmission of the file(s) or break up the file into smaller pieces and retransmit the ones that fail their checksum.


Bill Hassell, sysadmin
Arturo Galbiati
Esteemed Contributor

Re: gzip files getting corrupt from unix to windows server 2000

Hi,
to check if the gzip archives are really corrupted, perform a cksum prior to put on your windows server, copy back the file to th unix server and redo the cksum. if the results are different you lost data over the network.
HTH,
Art
Ganesh Balraman
Regular Advisor

Re: gzip files getting corrupt from unix to windows server 2000

HI ,

WE CAN SOLVE THIS ISSUE IF IT IS AGAIN GOING TO BE USED BACK IN THE UNIX MACHINE.(ASSUMING GZIP FILE TRANSFERRED TO WINDOWS IS FOR BACKUP PURPOSE ONLY.).

IF ABOVE IS THE CASE AFTER CREATING THE ZIP FILE. TAR THE DIRECTORY WHERE FILE IS STORED.

THIS WILL NOT CORUPT THE FILE.

REGDS
GANESH
boomer_2
Super Advisor

Re: gzip files getting corrupt from unix to windows server 2000

Hi guys,
Bill was abssolutely right..its a huge n/w issue which we have fwd to d network team and they r working on it.............
myself too verified by putting d same reports on my local server as well as over the n/w remote server......
i got the following error attached herewith.......