473,498 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pyinotify issue

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
Jun 27 '08 #1
3 1708
On Jun 13, 3:39 pm, AndreH <aha...@gmail.comwrote:
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.
Jun 27 '08 #2
On Jun 17, 12:11 pm, AndreH <aha...@gmail.comwrote:
On Jun 13, 3:39 pm, AndreH <aha...@gmail.comwrote:
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.

Jun 27 '08 #3
AndreH <ah****@gmail.com>:
On Jun 17, 12:11 pm, AndreH <aha...@gmail.comwrote:
>On Jun 13, 3:39 pm, AndreH <aha...@gmail.comwrote:
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'.
inotify itself doesn't have support for recursive watches. If you are
recursively watching a single directory, each subdirectory is added as
single, separate watch. If you're watching large directories for changes,
it may well be, that there is no bug in inotify, but you're really hitting
the watch limit (which is one of the reasons, why stuff like locate can't
be implemented on top of the inotify mechanism). Still, it sounds very
unlikely, that there are directories containing more than 8192
sub-directories, but did you consider this?

--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5203
by: Paul Mateer | last post by:
Hi, I have been running some queries against a table in a my database and have noted an odd (at least it seems odd to me) performance issue. The table has approximately 5 million rows and...
7
3276
by: George Hester | last post by:
Please take a look at this google artcle: http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9 The op was having trouble with...
2
2451
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
0
3526
by: Kevin Spencer | last post by:
Hi all, I am working on a service that uploads METAR weather information to the National Weather Service FTP site. The service I'm authoring is hosted on a Windows 200 server, and the NWS FTP...
2
2800
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
5
2492
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
0
2201
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
0
828
by: =?iso-8859-1?q?S=E9bastien?= Weber | last post by:
Hello, I'm actually writing an application with pyinotify which watchs a directory. Pyinotify lets me know the events (access, modify, suppression, etc.) on and in the directory, but not the...
13
3472
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.