rTorrent and XML-RPC
Micah R Ledbetter
vlack at vlack.com
Wed Nov 25 00:26:37 UTC 2009
Hello.
I am ultimately trying to install rtgui 0.2.7, which is a frontend for the rtorrent bit torrent client. I'm running FreeBSD 7.1-RELEASE-p2, and I've installed apache22, mod_scgi, xmlrpc-c-devel, and rtorrent-devel from ports. rtorrent works great on the CLI as-is; I've been using it for downloading torrents for months with no problems.
However, to make rtgui work, I have to get XML-RPC working within rtorrent first, and that's the entirety of my problem - this post isn't actually about rtgui at all. Instead, it's about a problem I'm having with XML-RPC, either in rtorrent itself, or in Apache or mod_scgi... I can't actually tell which.
Here's what I've done so far:
I've added this line to .rtorrent.rc:
> scgi_port = 127.0.0.1:5000
Now, when I start up rtorrent, it logs this information:
> (17:07:59) XMLRPC initialized with 517 functions.
> (17:07:59) The SCGI socket is bound to a specific network device yet may still pose a security risk, consider using 'scgi_local'.
I assume that this means that XML-RPC is working properly with rtorrent, but I have no way to test this.
I'm also running Apache 2.2, and I've added the following lines to httpd.conf:
> LoadModule scgi_module libexec/apache22/mod_scgi.so
> (...snip...)
> SCGIMount "/RPC2" 127.0.0.1:5000
However, when I restart apache, I get the following message in the error log, repeated once every few seconds:
> [Tue Nov 24 17:15:56 2009] [error] [client 127.0.0.1] File does not exist: /usr/local/www/htdoc/default/RPC2
I have tried to use the xmlrpc command line binary[0] to test Apache's XML-RPC connection to rtorrent[1], but it gives me an error message.
> me at box> cd /usr/ports/net/xmlrpc-c-devel/work/xmlrpc-c-1.18.00/tools/xmlrpc/
> me at box> ./xmlrpc localhost system.listMethods
> Failed. Call failed. HTTP response code is 404, not 200. (XML-RPC fault code -504)
And now I'm in over my head.
Has anyone successfully installed rtorrent + xmlrpc support on FreeBSD before, and, if so, would you be willing to steer me in the right direction? I feel like I must be missing something simple (in large part because I could find nothing useful on Google when I searched for that Apache error message, of course replacing "/usr/local/www/htdoc/default" with an asterisk), but I've been banging my head against the wall for quite a while and I could use some help. Searching for the xmlrpc error message has also turned up nothing.
One thing in particular I'm confused about is where it's actually broken. Is XML-RPC support working in rtorrent, but failing in Apache/mod_scgi? Or is it broken in rtorrent despite the messages that rtorrent is presenting, such that when Apache tries to connect to rtorrent via XML-RPC, it doesn't work through no fault of Apache's or mod_scgi's? If someone knows a way to test this, I'd also appreciate hearing it.
Thanks very much.
- Micah
[0] I can't tell if I'm missing something or what, but the port for xmlrpc-c-devel doesn't seem to install the xmlrpc binary anywhere, even though it does build it, so I'm just calling it from the build directory.
[1] This procedure is outlined on rtorrent's XML-RPC wiki page: <http://libtorrent.rakshasa.no/wiki/RTorrentXMLRPCGuide>. In particular, the system.listMethods call is a valid function, per that page.
More information about the freebsd-questions
mailing list