LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2013, 08:48 AM   #1
LQParsons
Member
 
Registered: Feb 2010
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 38

Rep: Reputation: 0
Cygwin scp Null Body OK?


Hi.
In my setup I have a Win/XP, under which I have Cygwin, in which I run a little shell script every morning that creates a simple HTML page reorganizing my Day, my Week, and my Month plans. At the end of the script, it does a SCP of it to my Linux system, posting it on the public site of one of my web-sites.

Cygwin has occasionally, now nearly always says
Code:
scp May2013.html dparsons@misty.etc:/home/dparsons/public_html/Calendar
dparsons@misty.etc's password:
Null message body; hope that's ok
The file is not transferred.

When I set the verbose flag (-v) I get
Code:
debug1: Sending command: scp -v -t /home/dparsons/public_html/Calendar
Null message body; hope that's ok
The file I assure you is there, is missing and is replaced with the -t


My Linux is CentOS, but I don't think that matters, the error appears to be on this end.

Just for laughs, I went to the cygwin site, downloaded and installed the latest version, so I think I have the latest. I checked the forums, there and here, I don't have any more clues.

Any insight?

-doug

Last edited by LQParsons; 05-12-2013 at 09:06 AM.
 
Old 05-12-2013, 09:40 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,795

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
"null message body" looks like a message from a mailer, probably you can find some ideas here: https://www.zimbra.com/forums/admini...ersion-38.html
 
Old 05-13-2013, 12:37 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,412

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Have you checked the src file to see if its empty?
Try turning on debug for the script;
Code:
#!/bin/bash
set -xv  # this shows you what the parser is doing
<rest of script here>
 
Old 05-13-2013, 08:52 AM   #4
LQParsons
Member
 
Registered: Feb 2010
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 38

Original Poster
Rep: Reputation: 0
File Physically there with correct permissions

ChrisM01:
Yes, the file, I assure you, is there, has permissions of 666, I've opened the file directly and it generates the appropriate HTML page.
Your question gave me a thought, so I did do an
$ scp nonExistantFile (mumble)
and it came up with the same null body message.
It's as though SCP is no longer seeing the file, so I even explicitly identified it as
$ scp ./(mumble)
to no avail.

I removed the 'bash' filter by typing in the command directly at the prompt, using the -v option of SCP which gave the debug information enclosed in the original post.
 
Old 05-13-2013, 08:57 AM   #5
LQParsons
Member
 
Registered: Feb 2010
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 38

Original Poster
Rep: Reputation: 0
Pan64:
Yes, it looks like a mail error, but mail's not involved.

This adds to my confusion, the message is almost "You've got an error, guess where"

I checked out your suggested link (and several similar), not giving me more clues.

<.sigh>
 
Old 05-13-2013, 09:01 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,795

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
ok, so I have no clue at all. In such cases I would try strace to look behind the walls. Maybe it will give you some additional information. Also increase debug level on both client and server side and look for errors in /var/log... (Multiple -v options increase the verbosity. The maximum is 3)
 
1 members found this post helpful.
Old 05-14-2013, 08:14 AM   #7
LQParsons
Member
 
Registered: Feb 2010
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 38

Original Poster
Rep: Reputation: 0
Thumbs up Solved, personal function name conflicted

Thanks Pan64.

Turned out one of the functions I defined have in my .bash_profile
Code:
dn()
{
  echo ${1%/*}
}
caused a name conflicted.
I commented it out and all works.

100 years ago, learning BASH, the book talked about functions, and described 'bn' for basename and 'dn' for directory name, which wasn't implemented in cygwin's bash at the time.
I coded them in as a learning exercise and to have around as a sample for whenever I wanted to put a function in a BASH-script. I have long since no longer needed them; functions are now a natural part of my shell programming.

Like I said, it's been there since forever causing no discernible problems and only recently did it begin causing things like "scp" to barf.

Thanks again for the "-vvv" and "$ strace", I didn't know about the depth of verbosity and had forgotten using system trace; though they didn't directly point me to my error and fix, they got me to look at things and one thing led to another.

One more question, "Linux Questions" wants me to mark this problem as solved. How do I go about this? Do I mark your last reply as "solved" ?
 
Old 05-14-2013, 08:18 AM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,795

Rep: Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888Reputation: 2888
top line, look for thread tools and the last line inside.
glad to hear you find the solution
(and if you really want to say thanks just click on yes)
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cygwin scp file copy counters stop incrementing/decrementing blainemiller Linux - Server 3 06-15-2011 04:51 PM
Any SCP client (on Windows/Cygwin) support UTF-8 encoding of filenames? drroot Linux - Software 3 01-04-2011 01:47 PM
cygwin scp problem dexznrl Linux - Newbie 2 08-10-2009 11:03 AM
SCP to windows with cygwin Bth8 Linux - Networking 1 04-14-2009 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration