Demian,

 

You are right! When I login as root to run deletes.php, there is no any error message coming out.

 

Can you tell me the location of  cache folder so that I can use chown to give write permission to VuFind’s cache?

Is that cache folder in /usr/local/vufind2/data/cache ?

 

Thanks!

 

 

Andy Tang
Systems/Electronic Resources Librarian
Randolph C. Watson Library
Kilgore College
1100 Broadway
Kilgore, TX 75662
Telephone:  (903) 983-8240
Fax:  (903) 983-8638
Email: atang@kilgore.edu

 

 

 

From: Demian Katz [mailto:demian.katz@villanova.edu]
Sent: Friday, August 09, 2013 3:03 PM
To: Andy Tang; vufind-general@lists.sourceforge.net
Subject: RE: how to make deletes.php work!

 

You are running the utility using an account that does not have write permission to VuFind's cache.  This can be a challenging problem to overcome in VuFind 2.0/2.0.1, but VuFind 2.1 will simplify it by maintaining a separate cache for CLI purposes.  See this JIRA ticket:

http://vufind.org/jira/browse/VUFIND-839

- Demian


From: Andy Tang [ATang@kilgore.edu]
Sent: Friday, August 09, 2013 3:29 PM
To: vufind-general@lists.sourceforge.net
Subject: [VuFind-General] how to make deletes.php work!

I am doing automation in Vufind server.

 

When I setup delete function in Redhat server, I meet the error like below.

How to solve this problem. Any help is appreciated!

 

 

*********************************************************************************************************************************

[watson@library util]$ /usr/bin/php deletes.php /tmp/marc_data/deleted.bib.marc

======================================================================

   The application has thrown an exception!

======================================================================

Zend\ServiceManager\Exception\ServiceNotCreatedException

An exception was raised while creating "Solr"; no instance returned

----------------------------------------------------------------------

/usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:860

#0 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(983): Zend\ServiceManager\ServiceManager->createServiceViaCallback(Array, 'solr', 'Solr')

#1 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->createFromFactory('solr', 'Solr')

#2 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(557): Zend\ServiceManager\ServiceManager->doCreate('Solr', 'solr')

#3 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(481): Zend\ServiceManager\ServiceManager->create(Array)

#4 /usr/local/vufind2/module/VuFind/src/VuFind/Search/BackendManager.php(104): Zend\ServiceManager\ServiceManager->get('Solr', false)

#5 /usr/local/vufind2/module/VuFind/src/VuFind/Solr/Writer.php(186): VuFind\Search\BackendManager->get('Solr')

#6 /usr/local/vufind2/module/VuFind/src/VuFind/Solr/Writer.php(116): VuFind\Solr\Writer->getConnector('Solr')

#7 /usr/local/vufind2/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(358): VuFind\Solr\Writer->deleteRecords('Solr', Array)

#8 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): VuFindConsole\Controller\UtilController->deletesAction()

#9 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))

#10 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

#11 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#12 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#13 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request), Object(Zend\Console\Response))

#14 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))

#15 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

#16 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#17 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(309): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#18 /usr/local/vufind2/public/index.php(59): Zend\Mvc\Application->run()

#19 /usr/local/vufind2/util/deletes.php(33): require_once('/usr/local/vufi...')

#20 {main}

======================================================================

   Previous Exception(s):

======================================================================

exception 'Zend\Cache\Exception\InvalidArgumentException' with message 'Cache directory '/usr/local/vufind2/local/cache/searchspecs' not writable' in /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Cache/Storage/Adapter/FilesystemOptions.php:134

Stack trace:

#0 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(104): Zend\Cache\Storage\Adapter\FilesystemOptions->setCacheDir('/usr/local/vufi...')

#1 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(57): Zend\Stdlib\AbstractOptions->__set('cache_dir', '/usr/local/vufi...')

#2 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(32): Zend\Stdlib\AbstractOptions->setFromArray(Array)

#3 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Cache/Storage/Adapter/FilesystemOptions.php(116): Zend\Stdlib\AbstractOptions->__construct(Array)

#4 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Cache/Storage/Adapter/Filesystem.php(73): Zend\Cache\Storage\Adapter\FilesystemOptions->__construct(Array)

#5 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Cache/StorageFactory.php(137): Zend\Cache\Storage\Adapter\Filesystem->setOptions(Array)

#6 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Cache/StorageFactory.php(70): Zend\Cache\StorageFactory::adapterFactory('filesystem', Array)

#7 /usr/local/vufind2/module/VuFind/src/VuFind/Cache/Manager.php(135): Zend\Cache\StorageFactory::factory(Array)

#8 /usr/local/vufind2/module/VuFind/src/VuFind/Config/SearchSpecsReader.php(79): VuFind\Cache\Manager->getCache('searchspecs')

#9 /usr/local/vufind2/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php(301): VuFind\Config\SearchSpecsReader->get('searchspecs.yam...')

#10 /usr/local/vufind2/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php(278): VuFind\Search\Factory\AbstractSolrBackendFactory->loadSpecs()

#11 /usr/local/vufind2/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php(139): VuFind\Search\Factory\AbstractSolrBackendFactory->createQueryBuilder()

#12 /usr/local/vufind2/module/VuFind/src/VuFind/Search/Factory/SolrDefaultBackendFactory.php(81): VuFind\Search\Factory\AbstractSolrBackendFactory->createBackend(Object(VuFindSearch\Backend\Solr\Connector))

#13 /usr/local/vufind2/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php(122): VuFind\Search\Factory\SolrDefaultBackendFactory->createBackend(Object(VuFindSearch\Backend\Solr\Connector))

#14 [internal function]: VuFind\Search\Factory\AbstractSolrBackendFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'solr', 'Solr')

#15 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(853): call_user_func(Array, Object(Zend\ServiceManager\ServiceManager), 'solr', 'Solr')

#16 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(983): Zend\ServiceManager\ServiceManager->createServiceViaCallback(Array, 'solr', 'Solr')

#17 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->createFromFactory('solr', 'Solr')

#18 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(557): Zend\ServiceManager\ServiceManager->doCreate('Solr', 'solr')

#19 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(481): Zend\ServiceManager\ServiceManager->create(Array)

#20 /usr/local/vufind2/module/VuFind/src/VuFind/Search/BackendManager.php(104): Zend\ServiceManager\ServiceManager->get('Solr', false)

#21 /usr/local/vufind2/module/VuFind/src/VuFind/Solr/Writer.php(186): VuFind\Search\BackendManager->get('Solr')

#22 /usr/local/vufind2/module/VuFind/src/VuFind/Solr/Writer.php(116): VuFind\Solr\Writer->getConnector('Solr')

#23 /usr/local/vufind2/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php(358): VuFind\Solr\Writer->deleteRecords('Solr', Array)

#24 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): VuFindConsole\Controller\UtilController->deletesAction()

#25 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))

#26 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

#27 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#28 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#29 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Console\Request), Object(Zend\Console\Response))

#30 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))

#31 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

#32 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#33 /usr/local/vufind2/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(309): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

#34 /usr/local/vufind2/public/index.php(59): Zend\Mvc\Application->run()

#35 /usr/local/vufind2/util/deletes.php(33): require_once('/usr/local/vufi...')

#36 {main}

[watson@library util]$

 

 

Thanks!

 

 

Andy Tang
Systems/Electronic Resources Librarian
Randolph C. Watson Library
Kilgore College
1100 Broadway
Kilgore, TX 75662
Telephone:  (903) 983-8240
Fax:  (903) 983-8638
Email: atang@kilgore.edu