Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to conect to socket #1

Closed
stupidloud opened this issue Aug 18, 2020 · 2 comments
Closed

unable to conect to socket #1

stupidloud opened this issue Aug 18, 2020 · 2 comments

Comments

@stupidloud
Copy link

my start.sh is

#!/bin/sh -
RTR_ROOT=`pwd`
/usr/bin/env \
  RTR_CERT_PATH="$RTR_ROOT/cert/cert.pem" \
  RTR_RETR_INTERVAL=5 \
  RTR_SHORT_CACHE_TTL=5 \
  RTR_LISTEN_HOST="0.0.0.0" \
  RTR_LISTEN_PORT=8765 \
  SOCK_PATH="/home/rtorrent/.session/rpc.socket" \
  RTR_PID_PATH="$RTR_ROOT/wss_server.pid" \
  RTR_LOG_PATH="$RTR_ROOT/rtr_wss_server.log" \
  RTR_SECRET_KEY_SHA1="a8fdc205a9f19cc1c7507a60c4f01b13d11d7fd0" \
  RTR_PLUGINS_DISK_USAGE_PATHS="/" \
  python3 $RTR_ROOT/server_wss.py $@

and the socket is there,

ll /home/rtorrent/.session/rpc.socket
srwxrwxrwx 1 root root 0 Aug 19 03:34 /home/rtorrent/.session/rpc.socket

I tried to change SOCK_PATH to unix:///home/rtorrent/.session/rpc.socket but still failed.

2020-08-19 04:27:47|ERROR|277|[Errno 2] No such file or directory
Traceback (most recent call last):
File "/root/src/rtremote/server_wss.py", line 259, in global_data_updater
data = remote.get_global()
File "/root/src/rtremote/remote.py", line 32, in get_global
g = self.rpc.global_data(['system.api_version'])
File "/root/src/rtremote/rpc.py", line 99, in global_data
data = self.system_multicall(commands)
File "/root/src/rtremote/rpc.py", line 57, in system_multicall
resp = scgi.post(body)
File "/root/src/rtremote/scgi.py", line 38, in post
sock = self.get_connected_socket()
File "/root/src/rtremote/scgi.py", line 33, in get_connected_socket
sock.connect(self.host_port.replace('unix:', '').replace('local:', ''))
FileNotFoundError: [Errno 2] No such file or directory
2020-08-19 04:34:39|ERROR|277|[Errno 2] No such file or directory
Traceback (most recent call last):
File "/root/src/rtremote/server_wss.py", line 259, in global_data_updater
data = remote.get_global()
File "/root/src/rtremote/remote.py", line 32, in get_global
g = self.rpc.global_data(['system.api_version'])
File "/root/src/rtremote/rpc.py", line 99, in global_data
data = self.system_multicall(commands)
File "/root/src/rtremote/rpc.py", line 57, in system_multicall
resp = scgi.post(body)
File "/root/src/rtremote/scgi.py", line 38, in post
sock = self.get_connected_socket()
File "/root/src/rtremote/scgi.py", line 33, in get_connected_socket
sock.connect(self.host_port.replace('unix:', '').replace('local:', ''))
FileNotFoundError: [Errno 2] No such file or directory

@Trogious
Copy link
Owner

The correct env var for socket is: RTR_SCGI_SOCKET_PATH. Apologies for the mistake in the start.sh sample. Will change.

@Trogious
Copy link
Owner

Fixed in v1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants