I am running Arch on a Raspberry Pi 4 following this installation guide. I am running Apache2.4, rTorrent and ruTorrent as described by the wiki.archlinux.org pages. When I use an scgi_port in .rtorrent.rc and /rutorrent/conf/config.php I have no problem with the communication between the two. However, I would like to use a socket instead of a port and I've had no problem doing this using other distributions.
I have the following packages:
$this->bbcode_second_pass_code('', 'aur/mod_scgi 1.15-1 (+8 0.01%) (Installed)
community/xmlrpc-c 1:1.43.08-2 [installed]
community/rtorrent 0.9.8-1 [installed]
aur/rutorrent 3.9-1 (+124 0.00%) (Installed)')
I have the following modules loaded in httpd.conf:
$this->bbcode_second_pass_code('', 'LoadModule scgi_module modules/mod_scgi.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule xml2enc_module modules/mod_xml2enc.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule php7_module modules/libphp7.so
LoadModule fcgid_module modules/mod_fcgid.so')
The following port configuration does work:
.rtorrent.rc:
$this->bbcode_second_pass_code('', 'scgi_port = 127.0.0.1:5000')
config.php:
$this->bbcode_second_pass_code('', '$scgi_port = 5000;
$scgi_host = "127.0.0.1";')
httpd.conf:
$this->bbcode_second_pass_code('', 'ProxyPass /RPC2 scgi://127.0.0.1:5000')
With this configuration, I can successfully run $this->bbcode_second_pass_code('', 'xmlrpc localhost system.listMethods')
The following sockt configuration does not work:
.rtorrent.rc:
$this->bbcode_second_pass_code('', 'scgi_local = /home/user/.sessions/rtorrent.socket
schedule2 = scgi_permission, 0, 0, "execute.nothrow=chmod,\"g+w,o=\",/home/user/.sessions/rtorrent.socket"')
config.php:
$this->bbcode_second_pass_code('', '$scgi_port = 0;
$scgi_host = "unix:///home/user/.sessions/rtorrent.socket";')
I get an error when running the xmlrpc test command using this configuration:
$this->bbcode_second_pass_code('', 'Failed. Call failed. HTTP POST to URL 'http://localhost/RPC2' failed. HTTP response code is 503, not 200. (XML-RPC fault code -504)
')I have used this socket configuration both with and without the ProxyPass line in httpd.conf, I have tried setting socket permissions to 777, I have added the http user to usergroup of the rtorrent user, and I have tried changing the socket ownership to the http user. No matter what I do, I cannot seem to get this to work.
I do not get any errors in the apache log, but I do see the standard error output in the rutorrent log:
$this->bbcode_second_pass_code('', 'No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.')
I would be very grateful indeed if somebody could provide some insight into my issue and how I should go about rectifying it. Please let me know if there is any other information I can provide to help narrow down the issue. Thank you in advance!