LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-13-2013, 09:03 AM   #1
rahul.sdabahar@gmail.com
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
Lightbulb tar: Archive contains obsolescent base-64 headers


I have transferred file using ftp client. there is difference in size.
machine 1.
-rw-r--r-- 1 root root 13059879 Aug 13 08:39 file.tar.gz


import org.apache.commons.net.ftp.FTPClient;
FTPClient client = new FTPClient();
FileInputStream fis = null;
try {

client.connect(ip);
client.login("userd","pwd");
client.setFileTransferMode(FTPClient.COMPRESSED_TRANSFER_MODE);
String workingdir=Property.getThemeWorkingDir().trim();
String themefilename=Property.getThemeFileName().trim();
client.changeWorkingDirectory(workingdir);
String filename = workingdir+themefilename;
File f=new File(filename);
fis = new FileInputStream(f);
client.storeFile(themefilename,fis);

} catch (IOException e) {
log.error(e.getStackTrace());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
l
} finally {
try {
if (fis != null) {
fis.close();
}
client.logout();
client.disconnect();
} catch (IOException e) {

}
}

machine 2:
-rw-r--r-- 1 root root 3948485 Aug 13 08:39 file.tar.gz

tar -zxvf file.tar.gz

error:
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers

gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
tar: Error exit delayed from previous errors


Please help me in finding solution
 
Old 08-13-2013, 03:25 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by rahul.sdabahar@gmail.com View Post
I have transferred file using ftp client. there is difference in size.
machine 1.
-rw-r--r-- 1 root root 13059879 Aug 13 08:39 file.tar.gz

machine 2:
-rw-r--r-- 1 root root 3948485 Aug 13 08:39 file.tar.gz
If you'd like us to help, you have to provide details, and ask a clear question. You say you used "FTP Client"...but don't tell us which one. You don't say what FTP server software you're using, on what version/distro of Linux, either. And over what kind of network link? Without details, there's nothing we can tell you.
Quote:
import org.apache.commons.net.ftp.FTPClient;
FTPClient client = new FTPClient();
FileInputStream fis = null;
try {

client.connect(ip);
client.login("userd","pwd");
client.setFileTransferMode(FTPClient.COMPRESSED_TRANSFER_MODE);
String workingdir=Property.getThemeWorkingDir().trim();
String themefilename=Property.getThemeFileName().trim();
client.changeWorkingDirectory(workingdir);
String filename = workingdir+themefilename;
File f=new File(filename);
fis = new FileInputStream(f);
client.storeFile(themefilename,fis);

} catch (IOException e) {
log.error(e.getStackTrace());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
l
} finally {
try {
if (fis != null) {
fis.close();
}
client.logout();
client.disconnect();
} catch (IOException e) {

}
}
And what is all this, and what does it have to do with this?
Quote:
tar -zxvf file.tar.gz

error:
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers

gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
tar: Error exit delayed from previous errors
...and this makes sense, since the file transfer obviously got corrupted...unless you have a valid file, it won't uncompress.
 
Old 08-14-2013, 12:46 AM   #3
rahul.sdabahar@gmail.com
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
using commons-net-1.0.0.jar
Linux version: 2.6.18.3 for both machine. These are connected vie LAN.

Please let me know if you need more details...
 
Old 08-14-2013, 08:40 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by rahul.sdabahar@gmail.com View Post
using commons-net-1.0.0.jar
Linux version: 2.6.18.3 for both machine. These are connected vie LAN.

Please let me know if you need more details...
You've not provided ANY of the details asked for, so yes, you need to still provide details.
  • You told us the KERNEL version...how about the version/distro (like CentOS 6.3, or Ubuntu 10.04??)
  • What FTP server software are you using?
  • What FTP Client are you using?
  • 'Connected via LAN' tells us nothing: are they on the same subnet? Different? Firewall(s) in place on either? ANYTHING? Can you ping/SSH between the two boxes?
You give a .jar file name above, but don't tell us where you got it, or how its being used exactly. You also don't tell us (assuming this is a web-based FTP), what information (if any), you see in the Apache log files/error log files/FTP logs on either side.

Do an experiment: go to a command-line on the Linux system that's sending the file, and type in "ftp <ip address of OTHER Linux server>". Log in, change your sending mode to binary by typing in "binary" at the prompt, then "put /path/to/filename.tar.gz", and see if it works. If so, then you've ruled out the network, firewalls, and FTP server, and the error(s) are on your web page.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar: Archive contains obsolescent base-64 headers ev64 LinuxQuestions.org Member Success Stories 10 12-01-2011 04:12 AM
Error in TAR - tar: GNU features wanted on incompatible archive format. kuldeep.k Linux - General 3 08-14-2009 11:09 AM
VSTPD and tar: Archive contains obsolescent base-64 headers app1mvf Linux - General 1 08-11-2008 02:01 AM
tar and gtar fail: Archive contains obsolescent base-64 headers duderancher Linux - Enterprise 4 03-12-2008 02:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration