Can't launch LottaNZB as regular user (FileLockAcquisitionError)

Asked by Jongi

When I run LottaNZB as root for the first time, it asks me what mode I want to run in it in. When I run it as a regular user I get the following error:

Traceback (most recent call last):
  File "/usr/bin/lottanzb", line 8, in <module>
    lottanzb.main()
  File "/usr/lib/python2.5/site-packages/lottanzb/lottanzb.py", line 114, in main
    lockAcquired = __lock.acquire()
  File "/usr/lib/python2.5/site-packages/lottanzb/util.py", line 425, in acquire
    raise (self.FileLockAcquisitionError, "Error acquiring lock: %s" % self.fddr())
lottanzb.util.FileLockAcquisitionError

Question information

Language:
English Edit question
Status:
Solved
For:
LottaNZB Edit question
Assignee:
No assignee Edit question
Solved by:
Severin H
Solved:
Last query:
Last reply:
Revision history for this message
Jongi (jongitech) said :
#1

Fedora 9 (32 bit)

Revision history for this message
Sander Tuit (avirulence) said :
#2

Could you try to kill LottaNZB (as root, since it seems that it's
still running). However, you should never run LottaNZB as root, just
as a normal user. If this doesn't work, please let us know. Severin
might know what's wrong.

Thanks for reporting this issue.

Sander

On Tue, Sep 9, 2008 at 21:20, Jongi <email address hidden> wrote:
> Question #44653 on LottaNZB changed:
> https://answers.launchpad.net/lottanzb/+question/44653
>
> Jongi gave more information on the question:
> Fedora 9 (32 bit)
>
> --
> You received this question notification because you are an answer
> contact for LottaNZB.
>

Revision history for this message
Jongi (jongitech) said :
#3

See below, no program with hella, lotta or nzb in its name is running:

[jongi@Jongi-Laptop Downloads]$ ps aux | grep lotta
jongi 10592 0.0 0.0 4120 692 pts/1 R+ 19:45 0:00 grep lotta
[jongi@Jongi-Laptop Downloads]$ ps aux | grep nzb
jongi 10812 0.0 0.0 4120 696 pts/1 S+ 19:45 0:00 grep nzb
[jongi@Jongi-Laptop Downloads]$ ps aux | grep hella
jongi 10905 0.0 0.0 4120 680 pts/1 R+ 19:45 0:00 grep hella
[jongi@Jongi-Laptop Downloads]$ lottanzb
Traceback (most recent call last):
  File "/usr/bin/lottanzb", line 8, in <module>
    lottanzb.main()
  File "/usr/lib/python2.5/site-packages/lottanzb/lottanzb.py", line 114, in main
    lockAcquired = __lock.acquire()
  File "/usr/lib/python2.5/site-packages/lottanzb/util.py", line 425, in acquire
    raise (self.FileLockAcquisitionError, "Error acquiring lock: %s" % self.fddr())
lottanzb.util.FileLockAcquisitionError
[jongi@Jongi-Laptop Downloads]$

Revision history for this message
Best Severin H (severinh) said :
#4

Hi Jongi,

LottaNZB creates a so called lock file on your machine once launched to prevent itself from being launch multiple times. It's the file lottanzb.lock in /tmp.

Normally this file should be deleted once LottaNZB is shut down, but I just noticed that our code doesn't do this. And that's exactly what led to the bug you encountered. In normal cases, this file would just be deleted and recreated when LottaNZB is launched again (that's why nobody has reported a bug yet), but this wasn't possible in your case because the second time you started LottaNZB, it didn't have the rights to delete this file anymore.

In conclusion: Remove this file in /tmp with root privileges and never ever run LottaNZB as root again. ;-)

We, in turn, will make sure that in future versions of LottaNZB, this lock will be released properly when LottaNZB is shut down.

I'll create a bug report out of your question. Thanks a lot for reporting this issue.

Revision history for this message
Jongi (jongitech) said :
#5

Thanks Severin Heiniger, that solved my question.