2012-07-09 82 views
0

我輸入對等命令後,它顯示了以下錯誤:錯誤「的參數數量不正確」,而用「謀殺」部署

** [out :: 172.23.99.7] Incorrect number of arguments 
** [out :: 172.23.99.7] 
** [out :: 172.23.99.7] Usage: 
** [out :: 172.23.99.7] python murder_client.py peer/seed out.torrent OUT.OUT 127.0.0.1 
** [out :: 172.23.99.7] 
** [out :: 172.23.99.7] The last parameter is the local ip address, normally 10.x.x.x 
** [out :: 172.23.99.7] 
** [out :: 172.23.99.5] Incorrect number of arguments 
** [out :: 172.23.99.5] 
** [out :: 172.23.99.5] Usage: 
** [out :: 172.23.99.5] python murder_client.py peer/seed out.torrent OUT.OUT 127.0.0.1 
** [out :: 172.23.99.5] 
** [out :: 172.23.99.5] The last parameter is the local ip address, normally 10.x.x.x 
** [out :: 172.23.99.5] 
** [out :: 172.23.98.78] Incorrect number of arguments 
** [out :: 172.23.98.78] 
** [out :: 172.23.98.78] Usage: 
** [out :: 172.23.98.78] python murder_client.py peer/seed out.torrent OUT.OUT 127.0.0.1 
** [out :: 172.23.98.78] 
** [out :: 172.23.98.78] The last parameter is the local ip address, normally 10.x.x.x 
** [out :: 172.23.98.78] 
command finished 

failed: "sh -c 'python /u/apps/example-app/shared/murder/murder_client.py peer  '\''/tmp/Test_2.tgz.torrent'\'' '\''/tmp/Test_2.tgz'\'' LC_ALL=C host 172.23.99.7 | awk '\\''/has address/ {print $4}'\\'' | head -n 1'" on 172.23.99.7; "sh -c 'python /u/apps/example-app/shared/murder/murder_client.py peer '\''/tmp/Test_2.tgz.torrent'\'' '\''/tmp/Test_2.tgz'\'' LC_ALL=C host 172.23.98.78 | awk '\\''/has address/ {print $4}'\\'' | head -n 1'" on 172.23.98.78; "sh -c 'python /u/apps/example-app/shared/murder/murder_client.py peer '\''/tmp/Test_2.tgz.torrent'\'' '\''/tmp/Test_2.tgz'\'' LC_ALL=C host 172.23.99.5 | awk '\\''/has address/ {print $4}'\\'' | head -n 1'" on 172.23.99.5 

正如你所看到的,它拋出一個「的參數數量不正確」錯誤在每個同伴。

之前的所有內容(創建torrent和啓動播種過程)都很好。

回答

0

我不認爲謀殺與IP地址主機定義兼容。該公司預計,可以用「主機」,因此這個小美女從你的日誌輸出解析的域名:

`LC_ALL=C host 172.23.99.5 | awk '\\''/has address/ {print $4}'\\'' | head -n 1'` 

你會發現運行,如果沒有反引號 - 即使是在與相應的DNS IP地址輸入 - 產生空輸出。這就是「錯誤的參數數量」錯誤來自的地方。

它看起來像github上有一個pull request使用ifconfig找出IP地址,而不是主機。如果你願意,你可以使用那個人的補丁,但它不能處理有多個接口的主機。在距離遠,最好的解決辦法是隻添加一些刻着DNS條目您的機器:)

編輯:

其實,我覺得這應該做的兩個IP地址的主機和DNS服務器定義的伎倆。

再參照pull request,更換主機行:

HOST = "LC_ALL=C host $CAPISTANO:HOST$ | awk '/has address/ { print $4 } // { print \"$CAPISTRANO:HOST$\" }' | head -n 1" 

如果主機名不解析爲IP地址,它會打印出Capistrano的主機服務器名,而你的情況會是IP地址。

相關問題