- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Curl Question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО06-08-2009 10:47 AM
тАО06-08-2009 10:47 AM
I am getting the following mail through a cron job with curl in it.
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
....
curl: (52) Empty reply from server
The script executes just fine but don't know why for few days I have started getting these emails with the curl progress report (meter) in it. I tested the script on the command line and the progress report doesnt show.
Any clues?
Thanks,
Allan
Solved! Go to Solution.
- Tags:
- curl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:12 AM
тАО06-08-2009 11:12 AM
Re: Curl Question
A return code of <52> means that the server didn't reply. If you wish, when you execute your script via a crontask, you could redirect STDERR to /dev/null. Remember, 'cron' has no terminal association and thus any unredirected STDOUT or STDERR is mailed to the initiating user.
#!/usr/bin/sh
[ -t 0 ] || exec 2>/dev/null
/usr/bin/curl ....
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:12 AM
тАО06-08-2009 11:12 AM
Re: Curl Question
check this link there is a discussion about this issue.
link :
http://curl.haxx.se/mail/archive-2007-05/0021.html
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:19 AM
тАО06-08-2009 11:19 AM
Re: Curl Question
what does this cron job do exactly ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:22 AM
тАО06-08-2009 11:22 AM
Re: Curl Question
Thanks Folks,
Do u know why I get the progress report abt the curl in an email from cron but not on the terminal (if I do it from the command line).
Allan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:28 AM
тАО06-08-2009 11:28 AM
SolutionFrom the 'curl' manpages:
/* begin quote */
cur normally displays a progress meter during operations, indicating the amount of transferred data, transfer speeds and estimated time left, etc.
However, since curl displays this data to the terminal by default, if you invoke curl to do an operation and it is about to write data to the terminal, it disables the progress meter as otherwise it would mess up
the output mixing progress meter and response data.
If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redirect (>), -o [file] or similar.
...
-s/--silent
Silent mode. Don├в t show progress meter or error messages. Makes Curl mute.
/* end quote */
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2009 11:31 AM
тАО06-08-2009 11:31 AM
Re: Curl Question
Regards,
Allan