2014-05-03 37 views
2

你好IM在接收數據時共同主辦,我能夠用ssh並運行以下命令捲曲:(56)未從對等

curl -O http://myurl.co.uk/customers/cron/invoices/gIsoaGANyWlJ 

,它似乎工作確定,並給出了下面的輸出這看起來很不錯,我

% Total % Received % Xferd Average Speed Time Time  Time Current 
          Dload Upload Total Spent Left Speed 
0 14 0 14 0  0  35  0 --:--:-- --:--:-- --:--:-- 35 

但是我使用了一個名爲reoccuringinvoices.sh 劇本的內容腳本運行它從cron是簡單地

#!/bin/bash 

curl -O http://myurl.co.uk/customers/cron/invoices/gIsoaGANyWlJ 

但是當我從cron運行此版本,它返回下列信息:

% Total % Received % Xferd Average Speed Time Time  Time Current 
          Dload Upload Total Spent Left Speed 

    0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:--  0 
    curl: (56) Failure when receiving data from the peer 

說實話林完全混淆和任何幫助,開始明白髮生了什麼,將不勝感激

+0

能不能請你告訴你所做的cron項?並且還請在'curl'請求的shell中顯示'env'的輸出。 – mofoe

+0

是否啓用SELinux?你是否從用戶運行cron任務? –

回答

-2

使用wget代替捲曲

wget的http://myurl.co.uk/customers/cron/invoices/gIsoaGANyWlJ

捲曲有寫權限?

也許創造捲曲日誌

curl -O http://myurl.co.uk/customers/cron/invoices/gIsoaGANyWlJ 2>&1 | tee curl.log 

或者在-v改變-O和查看日誌

curl -v http://myurl.co.uk/customers/cron/invoices/gIsoaGANyWlJ 2>&1 | tee curl.log