pyinotify issue

2008-06-13 Thread AndreH
Good day,

I just installed pyinotify on my gentoo box.

When I test the library through "pyinotify.pv -v /tmp" under root,
everything works great, but when I try the same thing under my local
user account, I receive the following error:
Error: cannot watch . (WD=-1)

Not very helpful. I've tried VERBOSE=True mode, but it doens't provide
any additional information.

I also tried it for a directory in my home folder just to be sure it's
not a permission problem, but no luck.

Any ideas?

Regards,
Andre
--
http://mail.python.org/mailman/listinfo/python-list


Re: pyinotify issue

2008-06-17 Thread AndreH
On Jun 13, 3:39 pm, AndreH <[EMAIL PROTECTED]> wrote:
> Good day,
>
> I just installed pyinotify on my gentoo box.
>
> When I test the library through "pyinotify.pv -v /tmp" under root,
> everything works great, but when I try the same thing under my local
> user account, I receive the following error:
> Error: cannot watch . (WD=-1)
>
> Not very helpful. I've tried VERBOSE=True mode, but it doens't provide
> any additional information.
>
> I also tried it for a directory in my home folder just to be sure it's
> not a permission problem, but no luck.
>
> Any ideas?
>
> Regards,
> Andre

Ok I ended up solving my problem.

pyinotify is just a wrapper for the c lib, inotif.h. Installing the
inotify-tools package allows one to do better troubleshooting.

First, my kernel version was too old and did not allow inotify to be
executed at user-level. I bumped my kernel up to 2.6.24 and enabled
the user-level execution flag.

Then pyinotify worked once and failed for all consecutive retries.
inotifwatch said that my "maximum number of user watches" was maxed
out and that I should increase it under /proc/sys/fs/inotify/
max_user_watches.

Something must be wrong, since the max_user_watches was set to 8192. I
played around with this setting (sysctl -w
fs.inotify.max_user_watches=16843), pyinotify.py and inotifywatch, and
finally came the conclusion that pyinotify 0.7.0 was buggy. I got hold
of 0.7.1 which seems to have fixed this problem. Hopefully, I'm not
speaking too soon.
--
http://mail.python.org/mailman/listinfo/python-list


Re: pyinotify issue

2008-06-18 Thread AndreH
On Jun 17, 12:11 pm, AndreH <[EMAIL PROTECTED]> wrote:
> On Jun 13, 3:39 pm, AndreH <[EMAIL PROTECTED]> wrote:
>
>
>
> > Good day,
>
> > I just installed pyinotify on my gentoo box.
>
> > When I test the library through "pyinotify.pv -v /tmp" under root,
> > everything works great, but when I try the same thing under my local
> > user account, I receive the following error:
> > Error: cannot watch . (WD=-1)
>
> > Not very helpful. I've tried VERBOSE=True mode, but it doens't provide
> > any additional information.
>
> > I also tried it for a directory in my home folder just to be sure it's
> > not a permission problem, but no luck.
>
> > Any ideas?
>
> > Regards,
> > Andre
>
> Ok I ended up solving my problem.
>
> pyinotify is just a wrapper for the c lib, inotif.h. Installing the
> inotify-tools package allows one to do better troubleshooting.
>
> First, my kernel version was too old and did not allow inotify to be
> executed at user-level. I bumped my kernel up to 2.6.24 and enabled
> the user-level execution flag.
>
> Then pyinotify worked once and failed for all consecutive retries.
> inotifwatch said that my "maximum number of user watches" was maxed
> out and that I should increase it under /proc/sys/fs/inotify/
> max_user_watches.
>
> Something must be wrong, since the max_user_watches was set to 8192. I
> played around with this setting (sysctl -w
> fs.inotify.max_user_watches=16843), pyinotify.py and inotifywatch, and
> finally came the conclusion that pyinotify 0.7.0 was buggy. I got hold
> of 0.7.1 which seems to have fixed this problem. Hopefully, I'm not
> speaking too soon.

I spoke too soon.

pyinotify still seems to max out my number of user watches... I get
this message when I run inotifywatch after a pyinotify operation:

Establishing watches...
Failed to watch .; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/
proc/sys/fs/inotify/max_user_watches'.


Strange. I'll keep on troubleshooting.

--
http://mail.python.org/mailman/listinfo/python-list