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

pyrotorque not starting #75

Open
Aqualie opened this issue Jan 19, 2025 · 6 comments
Open

pyrotorque not starting #75

Aqualie opened this issue Jan 19, 2025 · 6 comments

Comments

@Aqualie
Copy link

Aqualie commented Jan 19, 2025

Similiar to #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.

@kannibalox
Copy link
Owner

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?

@Aqualie
Copy link
Author

Aqualie commented Jan 21, 2025

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.

@kannibalox
Copy link
Owner

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.

@Aqualie
Copy link
Author

Aqualie commented Jan 31, 2025

I tested this again and still getting the same error.

@kannibalox
Copy link
Owner

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'

@kannibalox kannibalox reopened this Feb 1, 2025
@Aqualie
Copy link
Author

Aqualie commented Feb 2, 2025

OK I see two problems here:

  1. I don't have this pid_file setting in my configuration so I added it
  2. 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

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