Urchin not processing logfiles

Matthias Pigulla  ·  29. April 2011

Now this one was hard to figure out... Apparently all of a sudden, our previously working Urchin installation stopped processing logfiles for all but one profile.

Neither this nor that article were helpful. All we got when running a profile was:


Urchin 6.603 (linux2.6_kernel) starting: 20110429 14:48:36



Urchin 6.603 (linux2.6_kernel) finishing: 20110429 14:48:36


File permissions on the logfiles were not an issue - Urchin would complain on that. Missing log sources would also be mentioned, but we just got nothing.

strace clearly showed that Urchin was seeing and stat()ing the logs, however it did not open them or otherwise try to analyze them.

It finally turned out that we had deleted a log filter we no longer needed and that was used by all except one profile (where it was missing by accident, fwiw). Urchin did not update the profile-to-filter assignment table in its MySQL configuration database.

When running the profile, it loads the filters to be applied from the database in a first step and then tries to get the filter definitions themselves in a second query. Obviously when it does not get all the definitions it expected it seems to fail pretty bad and does not even give an error message.

Once you know the cause of the problem, the solution is simple. Execute the following query <insert disclamer here> in the configuration database to clean up such dangling references.

delete a from uprofiles_ufilters a
       not exists (select 1 from uprofiles p where a.uspr_id = p.uspr_id)
    or not exists (select 1 from ufilters f where a.usfi_id = f.usfi_id) 

Avatar von Matthias Pigulla

Matthias Pigulla

Diplom-Wirtschaftsinformatiker, Geschäftsführer

Der strategische Kopf hinter unseren Softwaresystemen behält bei der Entwicklung und Betreuung komplexer Architekturen den Überblick, kümmert sich um die technische Infrastruktur oder berichtet über seine Erfahrungen und Erkenntnisse auf der Symfony User Group. Und wenn er abends damit fertig ist, entspannt der zweifache Vater entweder auf seiner Yogamatte oder lässt beim Fotografieren die Seele baumeln.