Menu

#285 Couldn't get RPC woking

closed
nobody
None
5
2014-08-18
2012-08-08
Roman
No

I'm running Ubuntu 11.04 (Natty). Spent quite some time trying to get XML RPC interface working. Tried example from manual with few versions.
With aria2-1.15.1 there was folowing error:

xmlrpclib.ServerProxy('http://localhost:6800/rpc').aria2.getVersion()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xmlrpclib.py", line 1224, in call
return self.send(self.name, args)
File "xmlrpclib.py", line 1575, in request
verbose=self.
verbose
File "xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "xmlrpclib.py", line 1312, in single_request
response.msg,
xmlrpclib.ProtocolError: <ProtocolError for="" localhost:6800="" rpc:="" 404="" Not="" Found="">

With versions aria2-1.14.* - aria2-1.15.0 :

import xmlrpclib
xmlrpclib.ServerProxy('http://127.0.0.1:6800/rpc').aria2.getVersion()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xmlrpclib.py", line 1224, in call
return self.send(self.name, args)
File "xmlrpclib.py", line 1575, in request
verbose=self.
verbose
File "xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "xmlrpclib.py", line 1294, in single_request
response = h.getresponse(buffering=True)
File "httplib.py", line 1027, in getresponse
response.begin()
File "httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "httplib.py", line 371, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''

However version aria2-1.13.0 won't even compile:

g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I../lib -I../intl -DLOCALEDIR=\"/usr/local/share/locale\" -DCA_BUNDLE=\"\" -DHAVE_CONFIG_H -g -O2 -MT OptionHandlerImpl.o -MD -MP -MF .deps/OptionHandlerImpl.Tpo -c -o OptionHandlerImpl.o OptionHandlerImpl.cc
OptionHandlerImpl.cc: In member function ‘virtual void aria2::ChecksumOptionHandler::parseArg(aria2::Option&, const std::string&)’:
OptionHandlerImpl.cc:430:7: error: ‘MessageDigest’ has not been declared
make[2]: [OptionHandlerImpl.o] Error 1
make[2]: Leaving directory /home/romkansk/source/aria2/aria2-1.13.0/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/romkansk/source/aria2/aria2-1.13.0'
make:
[all] Error 2

Discussion

  • tujikawa

    tujikawa - 2012-08-11

    A possible reason of this error is that aria2 was not built with XML library.
    Run aria2c -v and check "Enabled Features" includes "XML-RPC".

     
  • Roman

    Roman - 2012-08-12

    You seem to be right. In aria2c -v output "Enabled Features:" are followed by empty line. Can you please help with activating RPC?

    P.S. Sorry I started this topic in bugs, i sould've started it in support requests.

     
  • Roman

    Roman - 2012-08-12

    I've forgot to mention that I have libxml2 installed from Ubuntu repository. Current version 2.7.8.

     
  • Roman

    Roman - 2012-08-12

    Apparently I've forgot to install dev versions of libraries. Everything seems to work as it should now. Sorry for bothering, it was all my fault. Anyway thanks for quick reply.

     

Log in to post a comment.