输入peer命令后,显示以下错误:
** [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
正如您所看到的,它会在每个对等方上抛出“参数数量不正确”错误。
之前的一切(创建洪流和启动播种过程)都运行良好。
答案 0 :(得分: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地址。