aria2的RPC模式提示错误,请问是什么原因?

上网、浏览、聊天、下载等
回复
slime09
帖子: 18
注册时间: 2008-03-20 9:27

aria2的RPC模式提示错误,请问是什么原因?

#1

帖子 slime09 » 2013-08-03 7:36

我想按网上教程开启aria2的rpc模式,log日志里出现如下错误:

代码: 全选

2013-07-30 23:40:10.044958 ERROR - [HttpListenCommand.cc:115]IPv6 RPC: failed to bind port 6800
Exception: [SocketCore.cc:310] errorCode=1 Failed to bind a socket, cause: 未知的名称或服务
2013-07-30 23:43:06.587394 ERROR - [HttpListenCommand.cc:115]IPv6 RPC: failed to bind port 6800
Exception: [SocketCore.cc:310] errorCode=1 Failed to bind a socket, cause: 未知的名称或服务
2013-07-30 23:47:04.827537 ERROR - [HttpListenCommand.cc:115]IPv6 RPC: failed to bind port 6800
Exception: [SocketCore.cc:310] errorCode=1 Failed to bind a socket, cause: 未知的名称或服务
2013-08-02 14:40:58.379851 ERROR - [HttpListenCommand.cc:115]IPv6 RPC: failed to bind port 6800
Exception: [SocketCore.cc:310] errorCode=1 Failed to bind a socket, cause: 未知的名称或服务
2013-08-02 14:44:11.141573 ERROR - [HttpListenCommand.cc:115]IPv6 RPC: failed to bind port 6800
Exception: [SocketCore.cc:310] errorCode=1 Failed to bind a socket, cause: Name or service not known
在浏览器输入网址http://192.168.1.2:6800/jsonrpc?jsoncallback=1测试时回显:

代码: 全选

1({"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"})
使用WEB前端http://ziahamza.github.io/webui-aria2/ 无法访问。
我的网址经过测试是可以在外网访问的。
我的aria2.conf是这样的:

代码: 全选

#Aria2 configuration

# RPC Setting
#
enable-rpc=true
rpc-listen-all=true
rpc-allow-origin-all=true
rpc-listen-port=6800
rpc-user=user
rpc-passwd=password


# General Setting
#
dir=/mnt/disk1/downloads
input-file=/mnt/disk1/aria2/aria2.session
save-session=/mnt/disk1/aria2/aria2.session
save-session-interval=60
log=/mnt/disk1/aria2/aria2.log
log-level=warn
#event-poll=select
disk-cache=16M
#enable-mmap=true
file-allocation=none
peer-id-prefix=-UT2210-
user-agent=uTorrent/2210(25130)

# Connection Setting
#
continue=true
max-connection-per-server=5
max-concurrent-downloads=3
min-split-size=1M
split=5
max-overall-download-limit=0
max-overall-upload-limit=50K
max-upload-limit=20
lowest-speed-limit=20K
auto-save-interval=120
check-certificate=false

# BT/PT Setting
#
bt-require-crypto=true
bt-max-peers=300
enable-peer-exchange=true
bt-enable-lpd=true
enable-dht=true
listen-port=48028
dht-listen-port=48028
follow-torrent=true
force-save=true
bt-seed-unverified=true
bt-save-metadata=true
bt-hash-check-seed=true
bt-remove-unselected-file=false
bt-stop-timeout=900
seed-ratio=1
seed-time=525600
执行方式是在rc.local里面加入语句:

代码: 全选

aria2c --conf-path=path/to/aria2/aria2.conf
单独执行这条语句时,报错与log日志里的一样。
我的环境是cubieboard预装的ubuntu。
请问如何解决?
PS:我是第一次使用aria2.
谢谢。
slime09
帖子: 18
注册时间: 2008-03-20 9:27

Re: aria2的RPC模式提示错误,请问是什么原因?

#2

帖子 slime09 » 2013-08-05 7:30

自己解决了,没看清错误提示,把ipv6禁掉就好了。
maoyj
帖子: 11
注册时间: 2006-12-28 7:02

Re: aria2的RPC模式提示错误,请问是什么原因?

#3

帖子 maoyj » 2014-01-10 3:25

我遇到了一样的问题。

1、硬件是“HuaWei HG255D”,软件是“OpenWrt-DreamBox 20120828”,自带aria2 1.15.1-1,没有安装网页界面。

2、我启用命令是
aria2c --enable-rpc --rpc-listen-all --disable-ipv6=true
,返回结果和你一样是

代码: 全选

1({"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"})
3、已经禁用了ipv6,在putty里面也没有任何错误提示,只有

代码: 全选

2014-01-10 03:12:29.121575 NOTICE - IPv4 RPC: listening to port 6800
4、反复尝试启动命令加入更多设置,比如
aria2c --enable-rpc --rpc-listen-all --disable-ipv6=true --d
ir=/mnt/sda1/downloads --rpc-allow-origin-all
无果

5、没有任何下载队列。尝试使用chrome的百度网盘插件,但是测试通不过,无法使用。

请问:
1、在浏览器中测试

代码: 全选

http://192.168.1.1:6800/jsonrpc?jsoncallback=1
,正常的返回结果应该是什么样的?
2、能给予我一点提示么?网络上返回“Parse error”的只有这个页面这唯一的搜索结果。
ProteinPig
帖子: 1
注册时间: 2009-04-04 4:08

Re: aria2的RPC模式提示错误,请问是什么原因?

#4

帖子 ProteinPig » 2014-01-10 3:40

和楼上一样
禁掉IPv6还是出现错误
回复