pyrotorque not starting
Similiar to https://github.com/kannibalox/pyrosimple/issues/41 After building with the latest pyrosimple@latest GIT I can no longer get pyrotorque to start.
rtorrent [ ~/.pyrosimple ]$ pyrotorque --debug --adopt-stale-pid-file
DEBUG:pyrosimple.scripts.pyrotorque.RtorrentQueueManager:Options: adopt_stale_pid_file=True, dry_run=False, log_file=None, log_level=10, no_fork=False, pid_file=None, print_completion=None, restart=False, run_once=None, status=False, stop=False, url=None
DEBUG:pyrosimple.config:Configuration file '/opt/rtorrent/.config/pyrosimple/config.py' not found.
ERROR:pyrosimple.scripts.pyrotorque.RtorrentQueueManager:Cannot lock pidfile: failed to create ~/.pyrosimple/run/pyrotorque.pid
INFO:pyrosimple.scripts.pyrotorque.RtorrentQueueManager:Total time: 0.334 seconds.
rtorrent [ ~ ]$ id
uid=1001(rtorrent) gid=1002(rtorrent) groups=1002(rtorrent)
rtorrent [ ~ ]$ ls -lna | grep pyrosimple
drwxr-xr-x 1 1001 1002 4096 Jan 19 17:44 .pyrosimple
rtorrent [ ~ ]$ ls -lna .pyrosimple/ | grep run
drwxr-xr-x 1 1001 1002 4096 Jan 19 19:52 run
rtorrent [ ~ ]$ touch ~/.pyrosimple/run/pyrotorque.pid
rtorrent [ ~ ]$ ls -lha ~/.pyrosimple/run/
total 12K
drwxr-xr-x 1 rtorrent rtorrent 4.0K Jan 19 19:59 .
drwxr-xr-x 1 rtorrent rtorrent 4.0K Jan 19 17:44 ..
-rw-r--r-- 1 rtorrent rtorrent 0 Jan 19 19:59 pyrotorque.pid
This was working fine before I updated to the latest git hash not sure what the problem is as you can see the permissions and user ID is fine/correct.
Hm, that's very strange, that code hasn't changed in a while, and I'm unable to reproduce it locally. If you remove the empty file manually, does it throw the same error?
Yes the example was just to show that I can manually create the PID file as the same user so not sure what the problem is.
Turns out I was too focused on the locking library, the issue ended up being that the config file wasn't expanding ~ properly anymore, should be fixed now.
I tested this again and still getting the same error.
Hm, I just double checked and the latest code should definitely fix the specific issue I mentioned, can you confirm for me that you are indeed setting a custom PID file in config.toml?
$ grep TORQUE._settings ~/.config/pyrosimple/config.toml -A 2
[TORQUE._settings]
pid_file = "~/.pyrosimple/run/pyrotorque.pid"
$ git checkout 42627cb719f5055f2c4b34409bcfff04fffe64ba
$ poetry run pyrotorque --adopt-stale-pid-file -v
ERROR:pyrosimple.scripts.pyrotorque.RtorrentQueueManager:Cannot lock pidfile: failed to create ~/.pyrosimple/run/pyrotorque.pid
$ git checkout main
$ poetry run pyrotorque --adopt-stale-pid-file -v
INFO:pyrosimple.scripts.pyrotorque.RtorrentQueueManager:Writing pid to /home/kannibalox/.pyrosimple/run/pyrotorque.pid and detaching process...
INFO:pyrosimple.scripts.pyrotorque.RtorrentQueueManager:Logging stderr/stdout to '/dev/null'
OK I see two problems here:
- I don't have this pid_file setting in my configuration so I added it
- There's no new version of pyrosimple so I dropped the pip install pyrosimple[torque] and just kept the pip install using git+https:// not sure what the problem will be w/o having also torque
Can we publish a new build w/ the fix so I can test it out?