Item13798: Save has issues when {SolrPlugin}{EnableOnSaveUpdates} is set
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: SolrPlugin
Branches:
When saving a modification in a topic, I got this on the browser :
Attention
Erreur lors de l'enregistrement de la page
During save of Clients/Fiff.WebHome an error was found by the version control system.
L'opération save a échoué en raison d'une erreur interne
And in
working/logs/error.log
:
| 2015-10-06T14:48:50+02:00 error | mkdir /home/data/www/doc.4next.ch/working/work_areas/SolrPlugin/stringifier_cache/Default: Permission denied at /usr/share/perl5/Cache/FileBackend.pm line 222.
at /usr/share/perl/5.14/File/Path.pm line 207.
File::Path::_mkpath(HASH(0x5123580), ARRAY(0x5124e68)) called at /usr/share/perl/5.14/File/Path.pm line 173
File::Path::_mkpath(HASH(0x5123580), ARRAY(0x5123b20)) called at /usr/share/perl/5.14/File/Path.pm line 173
File::Path::_mkpath(HASH(0x5123580), ARRAY(0x51235e0)) called at /usr/share/perl/5.14/File/Path.pm line 173
File::Path::_mkpath(HASH(0x5123580), ARRAY(0x5123538)) called at /usr/share/perl/5.14/File/Path.pm line 154
File::Path::mkpath("/home/data/www/doc.4next.ch/working/work_areas/SolrPlugin/str"..., 0, 511) called at /usr/share/perl5/Cache/FileBackend.pm line 222
Cache::FileBackend::_Create_Directory("/home/data/www/doc.4next.ch/working/work_areas/SolrPlugin/str"..., 63) called at /usr/share/perl5/Cache/FileBackend.pm line 520
Cache::FileBackend::_Make_Path("/home/data/www/doc.4next.ch/working/work_areas/SolrPlugin/str"..., 63) called at /usr/share/perl5/Cache/FileBackend.pm line 678
Cache::FileBackend::_write_data(Cache::FileBackend=HASH(0x51181a0), "/home/data/www/doc.4next.ch/working/work_areas/SolrPlugin/str"..., ARRAY(0x5123430)) called at /usr/share/perl5/Cache/FileBackend.pm line 139
Cache::FileBackend::store(Cache::FileBackend=HASH(0x51181a0), "Default", "uD5a2rYonnXixLekXrJHqw", Cache::Object=HASH(0x5123370)) called at /usr/share/perl5/Cache/BaseCache.pm line 295
Cache::BaseCache::set_object(Cache::FileCache=HASH(0x5117e70), "uD5a2rYonnXixLekXrJHqw", Cache::Object=HASH(0x5123220)) called at /usr/share/perl5/Cache/BaseCache.pm line 278
Cache::BaseCache::set(Cache::FileCache=HASH(0x5117e70), "uD5a2rYonnXixLekXrJHqw", "") called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 1055
Foswiki::Plugins::SolrPlugin::Index::getStringifiedVersion(Foswiki::Plugins::SolrPlugin::Index=HASH(0x3aa5cf8), "Clients.Fiff", "WebHome", "DirectedGraphPlugin_1.png") called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 753
Foswiki::Plugins::SolrPlugin::Index::indexAttachment(Foswiki::Plugins::SolrPlugin::Index=HASH(0x3aa5cf8), "Clients.Fiff", "WebHome", HASH(0x32257e0), ARRAY(0x495f9b0)) called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 625
Foswiki::Plugins::SolrPlugin::Index::indexTopic(Foswiki::Plugins::SolrPlugin::Index=HASH(0x3aa5cf8), "Clients.Fiff", "WebHome", Foswiki::Meta=HASH(0x30c03d0), "%META:TOPICINFO{author=\"michel\" comment=\"\" date=\"1444135730\" "...) called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 275
Foswiki::Plugins::SolrPlugin::Index::updateTopic(Foswiki::Plugins::SolrPlugin::Index=HASH(0x3aa5cf8), "Clients/Fiff", "WebHome", Foswiki::Meta=HASH(0x30c03d0), "%META:TOPICINFO{author=\"michel\" comment=\"\" date=\"1444135730\" "...) called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins/SolrPlugin/Index.pm line 129
Foswiki::Plugins::SolrPlugin::Index::afterSaveHandler(Foswiki::Plugins::SolrPlugin::Index=HASH(0x3aa5cf8), "Clients/Fiff", "WebHome", Foswiki::Meta=HASH(0x30c03d0), "%META:TOPICINFO{author=\"michel\" comment=\"\" date=\"1444135730\" "...) called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins/SolrPlugin.pm line 265
Foswiki::Plugins::SolrPlugin::afterSaveHandler("%META:TOPICINFO{author=\"michel\" comment=\"\" date=\"1444135730\" "..., "WebHome", "Clients/Fiff", undef, Foswiki::Meta=HASH(0x30c03d0)) called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugin.pm line 310
Foswiki::Plugin::invoke(Foswiki::Plugin=HASH(0x2862430), "afterSaveHandler", "%META:TOPICINFO{author=\"michel\" comment=\"\" date=\"1444135730\" "..., "WebHome", "Clients/Fiff", undef, Foswiki::Meta=HASH(0x30c03d0)) called at /home/data/www/doc.4next.ch/lib/Foswiki/Plugins.pm line 380
Foswiki::Plugins::dispatch(Foswiki::Plugins=HASH(0x1f45ce0), "afterSaveHandler", "%META:TOPICINFO{author=\"michel\" comment=\"\" date=\"1444135730\" "..., "WebHome", "Clients/Fiff", undef, Foswiki::Meta=HASH(0x30c03d0)) called at /home/data/www/doc.4next.ch/lib/Foswiki/Meta.pm line 2014
Foswiki::Meta::save(Foswiki::Meta=HASH(0x30c03d0)) called at /home/data/www/doc.4next.ch/lib/Foswiki/UI/Save.pm line 684
Foswiki::UI::Save::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try(CODE(0x328b648), HASH(0x328b8e8)) called at /home/data/www/doc.4next.ch/lib/Foswiki/UI/Save.pm line 702
Foswiki::UI::Save::save(Foswiki=HASH(0x1f45a40)) called at /home/data/www/doc.4next.ch/lib/Foswiki/UI.pm line 374
Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416
eval {...} called at /usr/share/perl5/Error.pm line 408
Error::subs::try(CODE(0x11f9c30), HASH(0x1f45500)) called at /home/data/www/doc.4next.ch/lib/Foswiki/UI.pm line 500
Foswiki::UI::_execute(Foswiki::Request=HASH(0x1ee2b78), CODE(0x1f81b00), "save", 1) called at /home/data/www/doc.4next.ch/lib/Foswiki/UI.pm line 326
Foswiki::UI::handleRequest(Foswiki::Request=HASH(0x1ee2b78)) called at /home/data/www/doc.4next.ch/lib/Foswiki/Engine/CGI.pm line 99
Foswiki::Engine::CGI::run(Foswiki::Engine::CGI=HASH(0x17e04c8)) called |
I see also that the
stringifier_cache
dir in
working/work_areas/SolrPlugin
belongs to root, probably causing the issue.
When following your instructions about setting up Solr indexing I was working as root, so that may explain this (not always easy to work as www-data)
Now I've
chown -R www-data:www-data stringifier_cache/
an all seems ok. I still prefer to open this task since maybe there is something to modify to avoid this issue.
Finally (!) I wanted to let you know that I have slightly modified
http://foswiki.org/Extensions/SolrPlugin : one typo and a minor correction to some shell lines to install Solr... hope this is ok for you ! let me know if I should have done that another way.
--
MichelMallejac - 06 Oct 2015
You probably executed a foswiki script as root. That's why the temporary files and the caches get the wrong ownership. Any further execution of foswiki via the web server is then done as user www-data ... and fails to read/write the files created by root when called on the commandline. Good news, it is all your fault
With regards to the docu fixes that you did on
SolrPlugin and
StringifierContrib, did you see the disclaimer at the top of those two topics saying that these are created automatically and that any changes to them done on foswiki.org will be lost when these topics are auto-created the next time?
You probably didn't.
I tried to figure out what changes you actually did ... which was not easy as there were a lot of bogus whitespace changes probably due to the use of the wysiwyg editor. Whatever typo you fix in the docu better report them here in the Tasks web, best as a patch. But, please, do not edit the docu in the Extensions web. Please reopen a new task for the docu fixes as this one is, as I said, a no-action-required.
--
MichaelDaum - 06 Oct 2015
Yes, got it for Solr, thanks !
Regarding the doc : no I am not using wysiwig editor, I hate it
I will open a new task for these docu fixes, but I am surprised that you could not see them ! see for instance :
http://foswiki.org/bin/compare/Extensions/StringifierContrib?rev1=13;rev2=14 in the
Backend for PDF
section.
Finally : I am supposed to close this Task since it is in No Action Required state ? Or is there some kind of "garbagge collector" - human or not - doing the job ?
One last : how can I generate a topic change patch ??
--
MichelMallejac - 06 Oct 2015
Tasks in "No action required" state are left that way just fine and will be omitted from the various queries that we use. "Closed" means that it was relevant and was actually fixed in a release of something. So far the volumes are low enough, we don't do garbage collection. Sometimes they are useful for people to see the resolution to similar problems.
Regarding topic changes. Our source code for distributed foswiki and extensions are all in github. So you could fork the repository on
http://github.com, and then generate a pull request to incorporate your suggested patch.
--
GeorgeClark - 07 Oct 2015