Islandora book batch preprocess command problem

116 views
Skip to first unread message

Peter MacDonald

unread,
Apr 16, 2016, 10:38:48 AM4/16/16
to islandora
Islandora 7.1.6
Drupal: 7.43
Drush: 8

I'm trying to ingest book records using Drush, but Drush is having a problem finding the "islandora_book_batch_preprocess" function.

Drush CAN find that function when I give it this command:

$ drush help islandora_book_batch_preprocess

I know it finds it because Drush's responds with a list of the required parameters for that function.

But Drush canNOT find it when I invoke that function in the following command:

$ drush -v -user=<admin_user> --uri=http://localhost islandora_book_batch_preprocess --content_models=islandora:bookCModel --namespace=BeiMss --parent=BeiMss:root --type=zip --do_not_generate_ocr --target=/home/lisham/tmp/0Packets.zip

Drush's response:
"The drush command 'islandora_book_batch_preprocess' could not be found."

This is a multi-site installation so I made sure that the Islandora Book Batch module was enabled on every site. I've also tried many different --uri values, but stil Drush says it cannot find that command.

Question: Is there special I need to do because this is a multi-site setup?

Thanks,
Peter MacDonald

Brad Spry

unread,
Apr 17, 2016, 8:42:32 AM4/17/16
to islandora
Peter,

Do you have drush installed for all users, for example in /usr/local/drush?

Do you have a drushrc.php config file, in say /usr/local/drush/drushrc.php?

I find having a drushrc.php solves a lot of woes.


Brad

Peter MacDonald

unread,
Apr 17, 2016, 10:22:26 AM4/17/16
to isla...@googlegroups.com
Thanks Brad.

I'll look into that next.

Peter

--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/b36d78d9-f916-4895-ba98-bff06db8eeba%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Peter MacDonald,
Library Information Systems Specialist
Hamilton College Library
Clinton, New York
315 859-4493
pmacdona-hamilton (Skype)

Rosemary Le Faive

unread,
Apr 19, 2016, 11:28:25 AM4/19/16
to islandora
Are you on 1.7?

We changed --target to --scan_target in Drush 8 [1].

Peter MacDonald

unread,
Apr 19, 2016, 12:02:58 PM4/19/16
to isla...@googlegroups.com
Rosie:

This Islandora site is running on HEAD (a few months old, though).
Drush  is 8.0.3.

$ drush help islandora_book_batch_preprocess

this command output shows that "--target" is the correct parameter name to use.

When I try --scan_target, Drush says it is not a valid argument.

So my problem seems to be something else.

Thanks for the suggestion.

Peter


For more options, visit https://groups.google.com/d/optout.

Betsy Coles

unread,
Apr 26, 2016, 9:18:48 PM4/26/16
to islandora

If it's any comfort to you, Peter, I am having the same problem, also on a multisite installation, also running HEAD (quite recent).  The only other thing I can think of that might be relevant is that I've recently upgraded drush to 7.2 because of a recent thread about older versions being deprecated.  I get reasonable results from 'drush help islandora_book_batch_preprocess' and I get specific complaints if I get a parameter wrong. I get a second error message about drush not being able to start (bootstrap) the database, although this is a working site with content.  I have also tried many variants of the 'uri' parameter.

Here's my command and its output:

[drupal7]# drush -v --user=<user> --uri=http://maccready.library.caltech.edu islandora_book_batch_preprocess --content_models=islandora:bookCModel --namespace=pbm --parent=islandora:293 --do_not_generate_ocr --type=zip --target=/home/<user>/maccready/DATA/Series7/PBM_7_1/batch__PBM_7_1_1.zip

The drush command 'islandora_book_batch_preprocess' could not be found.  Run    [error]
`drush cache-clear drush` to clear the commandfile cache if you have installed
new extensions.
Drush was not able to start (bootstrap) the Drupal database.                    [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured
database. In this case you can select another site with a working database setup
by specifying the URI to use with the --uri parameter on the command line. See
`drush topic docs-aliases` for details.
 * connect the database through a socket. The socket file may be wrong or the
php-cli may have no access to it in a jailed shell. See

Drush was attempting to connect to:
 Drupal version         :  7.43
 Site URI               :  http://maccready.library.caltech.edu
 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php.ini
 PHP OS                 :  Linux
 Drush script           :  /root/.composer/vendor/drush/drush/drush.php
 Drush version          :  7.2.0
 Drush temp directory   :  /tmp
 Drush configuration    :
 Drush alias files      :
 Drupal root            :  /var/www/html/drupal7
 Site path              :  sites/maccready.library.caltech.edu
 

p37

unread,
Apr 27, 2016, 4:04:28 PM4/27/16
to isla...@googlegroups.com
Betsy,

   I was just trying a drush command in vagrant and was getting the same error, but I had upgradded the drush to 7.2.  I tried it on a test server here and it failed there too, and once again it had been recently upgraded to drush 7.2.  I changed vagrant and the server back to drush 6 and it seems to be working.

Paul C
UT Library

--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.

Betsy Coles

unread,
Apr 27, 2016, 5:29:39 PM4/27/16
to isla...@googlegroups.com
Downgrading to drush 6 did the trick for me too -- command is working now!  Thank you, Paul.

Betsy

William Conlin

unread,
Jul 15, 2016, 11:42:52 AM7/15/16
to islandora
We are also running a multisite config. and are having bootstrap problems. I've installed drush6 and drush7 (our default was 8).

This was a great resource for adding different drush versions. I'm still stuck with the same problem, drush doesn't know the command icbp or islandora_compound_batch_preprocess.

Is it possible something in the icbp.drush.inc file of 
Reply all
Reply to author
Forward
0 new messages