[greenstone-users] Re: Client-CLI Re: Greenstone 2.83 for Linux, 64-bit or 32-bit?

From Anupama of Greenstone Team
DateWed Oct 27 14:00:49 2010
Subject [greenstone-users] Re: Client-CLI Re: Greenstone 2.83 for Linux, 64-bit or 32-bit?
In-Reply-To (AANLkTimnZa24-yE6mdLY1kp45GDHNTR7x7TH657fWM+r-mail-gmail-com)
Hi Xiao,

Fingers crossed, but I think we fixed it now. The environment wasn't set
up properly for the remote server. Please try the following:

1. Open up the following file in a text editor:
<your server machine's Greenstone installation folder>/cgi-bin/gsdlCGI.pm


2. Go down to the lines in gsdlCGI.pm that say:

> my $gsdl_bin_os = &util::filename_cat($gsdlhome,"bin",$gsdlos);
> &util::envvar_append("PATH",$gsdl_bin_os);

> # If the "perlpath" property is set in the gsdl(3)site.cfg config
file, it is
> # prepended to PATH only if the same perl bin dir path is not already
on PATH env
> my $perl_bin_dir = $self->get_perl_path($optional);


3. Now, in the empty line between, insert the following 2 lines. Make
sure to take out the ">", which I've put in the following to show line
breaks.

> # MAGICK_HOME needs to be set for the remote server to be able to
convert images
> $ENV{'MAGICK_HOME'} = &util::filename_cat($gsdl_bin_os,"imagemagick");


4. That means your file would now contain:

my $gsdl_bin_script = &util::filename_cat($gsdlhome,"bin","script");
&util::envvar_append("PATH",$gsdl_bin_script);

my $gsdl_bin_os = &util::filename_cat($gsdlhome,"bin",$gsdlos);
&util::envvar_append("PATH",$gsdl_bin_os);

# MAGICK_HOME needs to be set for the remote server to be able to
convert images
$ENV{'MAGICK_HOME'} = &util::filename_cat($gsdl_bin_os,"imagemagick");

# If the "perlpath" property is set in the gsdl(3)site.cfg config file,
it is
# prepended to PATH only if the same perl bin dir path is not already on
PATH env
my $perl_bin_dir = $self->get_perl_path($optional);


5. Save the file and close it in your editor.


6. Go back to a client-GLI and try to rebuild that image collection now
(the collection which was set to create thumbnails).


Does thumbnail generation work now? (If not, please reply and tell us in
what manner it goes wrong.)


> and yesterday evening I met Sally Jo! We had a lovely chit
> chat. :-)

Awesome! I'm glad to hear it. I love talking to her as well.

All the best,
Anupama

Xiao Hu wrote:
> Hi Anupama,
>
> Thank you so much for your reply! And thanks for replicating the
> problem. I was a bit slow in replying because I am now in the ASIST
> conference and yesterday evening I met Sally Jo! We had a lovely chit
> chat. :-)
>
> As for the thumbnail problem, yes. I got the same messages after setting
> the verbosity to 4. After the messages you copied, I also got the
> following:
>
> import.pl <http://import.pl>> SCREEN result: convert:
> UnableToOpenConfigureFile `delegates.xml'.
> import.pl <http://import.pl>> convert:
> NoDecodeDelegateForThisImageFormat
> `/home/xiaohu/Greenstone/collect/xiao-photo/import/Boston City Flow.jpg'.
> import.pl <http://import.pl>> convert: MissingAnImageFilename
> `/home/xiaohu/Greenstone/tmp/F264.jpeg'.
> import.pl <http://import.pl>>
> import.pl <http://import.pl>> ...error encounterd
> import.pl <http://import.pl>> Couldn't find screenview file
> /home/xiaohu/Greenstone/tmp/F264.jpeg
> import.pl <http://import.pl>> DirectoryPlugin: file
> /home/xiaohu/Greenstone/collect/xiao-photo/import/metadata.xml was
> blocked for read
>
> Thanks very much for helping on this. Please let me know if I can help
> on anything.
>
> Cheers,
> Xiao
>
> On Mon, Oct 25, 2010 at 11:46 PM, Anupama of Greenstone Team
> <greenstone_team@cs.waikato.ac.nz
> <mailto:greenstone_team@cs.waikato.ac.nz>> wrote:
>
> Hi Xiao,
>
> I am able to reproduce the problem here on a Linux server against a
> Linux client.
>
>
> I set the "verbosity" parameter to 4, in GLI (client) > Create Panel
> > Import Options to the left hand side. When I build with this, it
> gives me errors of the following nature, when it tries to build
> thumbnails for my images:
>
> import.pl <http://import.pl>> identify
> "/myprefixpath/Greenstone283/collect/me-img1/import/Cheetah.jpg" 2>&1
> import.pl <http://import.pl>> identify: UnableToOpenConfigureFile
> `delegates.xml'.
> import.pl <http://import.pl>> identify:
> NoDecodeDelegateForThisImageFormat
> `/myprefixpath/Greenstone283/collect/me-img1/import/Cheetah.jpg'.
> import.pl <http://import.pl>>
> import.pl <http://import.pl>> file:
> /myprefixpath/Greenstone283/collect/me-img1/import/Cheetah.jpg:
> unknown, unknown, unknown, unknown
> import.pl <http://import.pl>> THUMB: convert -interlace plane
> -verbose -geometry 100x100
> "/myprefixpath/Greenstone283/collect/me-img1/import/Cheetah.jpg"
> "/myprefixpath/Greenstone283/tmp/F615.gif"
> import.pl <http://import.pl>> Converting image Cheetah.jpg to:
> THUMB gif ...
>
> import.pl <http://import.pl>> Error: processing command failed.
> Exit status 256
> import.pl <http://import.pl>> Command was: convert -interlace
> plane -verbose -geometry 100x100
> "/myprefixpath/Greenstone283/collect/me-img1/import/Cheetah.jpg"
> "/myprefixpath/Greenstone283/tmp/F615.gif"
>
> Is this similar to what happens when you turn up the verbosity level
> of your Import Options?
>
> I am still investigating.
>
> Regards,
> Anupama
>
>
>
>
> Anupama of Greenstone Team wrote:
>
> Hi Xiao,
>
> I don't yet know what's going on. I will make sure to test this
> with 2.84 for the upcoming release, but could you try the same
> on the server machine itself: instead of running it from the
> command line, can you try running normal GLI on the server
> machine and see if it completes properly, or whether it fails
> with the same error that the client-GLI failed with from the
> remote machine?
>
> I will definitely have a look at it after the release we're
> working on or maybe if I have some free time in the evenings.
>
> Regards,
> Anupama
>
>
> Xiao Hu wrote:
>
> Hi Anupama,
>
> It might not be related to 64-bit or 32-bit, as I found a
> strange phenomenon:
> When I logged on the server and used command line, the
> thumbnail was converted:
>
> perl full-import.pl <http://full-import.pl>
> <http://full-import.pl> -collectdir
> "/home/xiaohu/Greenstone/collect" -gli -language "en" xiao-photo
> <Import>
> Removing current contents of the archives directory...
> <File n=''>
> Global file scan checking directory:
> /home/xiaohu/Greenstone/collect/xiao-photo/import
> <File n='Boston City Flow.jpg'>
> <File n='metadata.xml'>
> <File n=''>
> <File n='Boston City Flow.jpg'>
> <File n='metadata.xml'>
>
> <Processing n='metadata.xml' p='MetadataXMLPlugin'>
> MetadataXMLPlugin: processing metadata.xml
> <File n='Boston City Flow.jpg'>
> <Processing n='Boston City Flow.jpg' p='ImagePlugin'>
> ImagePlugin processing Boston City Flow.jpg
> Converting image Boston City Flow.jpg to: THUMB gif ...
> ...done
> Converting image Boston City Flow.jpg to: SCREEN jpeg ...
> ...done
>
>
> However, when using Client-GLI, I still got the error, and
> no thumbnail was created. Do you have a clue on what caused
> the difference?
>
> Thank you!
> Xiao
>
> On Thu, Oct 21, 2010 at 12:35 PM, Xiao Hu
> <xiaohusmile@gmail.com <mailto:xiaohusmile@gmail.com>
> <mailto:xiaohusmile@gmail.com
> <mailto:xiaohusmile@gmail.com>>> wrote:
>
> Hi Anupama,
>
> This is Xiao again. I was in Univ. of Illinois teaching
> Greenstone,
> and now I am in Univ. of Denver teaching Greenstone again.
>
> This time, we installed Greenstone 2.83 on a Linux
> server. our
> system admin said he initially "started with a 64bit
> Linux OS, but
> had to re-install with 32bit, since all the binaries that
> greenstone
> comes with are 32bit". It works fine until students found the
> server-based Greenstone cannot convert images to
> thumbnails. I tried
> to build a collection with only 1 image, through the
> Client-GLI, and
> I got the following error message:
> s
> import.pl <http://import.pl> <http://import.pl>> perl -S
> full-import.pl <http://full-import.pl>
> <http://full-import.pl> -collectdir
> "/home/xiaohu/Greenstone/collect" -gli -language "en"
> xiao-photo 2>&1 import.pl <http://import.pl>
> <http://import.pl>> Removing current contents of the
> archives directory...
> import.pl <http://import.pl> <http://import.pl>> Global
> file scan checking directory:
> /home/xiaohu/Greenstone/collect/xiao-photo/import
> import.pl <http://import.pl> <http://import.pl>>
> import.pl <http://import.pl> <http://import.pl>>
> MetadataXMLPlugin: processing metadata.xml
> import.pl <http://import.pl> <http://import.pl>>
> ImagePlugin processing Boston City
> Flow.jpg
> import.pl <http://import.pl> <http://import.pl>>
> Converting image Boston City
> Flow.jpg to: THUMB gif ...
> import.pl <http://import.pl> <http://import.pl>> Error:
> processing command failed. Exit status 256
> import.pl <http://import.pl> <http://import.pl>>
> ...error encounterd
> import.pl <http://import.pl> <http://import.pl>> Couldn't
> find thumbnail
> /home/xiaohu/Greenstone/tmp/F240.gif
> import.pl <http://import.pl> <http://import.pl>>
> Converting image Boston City
> Flow.jpg to: SCREEN jpeg ...
> import.pl <http://import.pl> <http://import.pl>> Error:
> processing command failed. Exit status 256
> import.pl <http://import.pl> <http://import.pl>>
> ...error encounterd
> import.pl <http://import.pl> <http://import.pl>> Couldn't
> find screenview file
> /home/xiaohu/Greenstone/tmp/F578.jpeg
> .....
>
> I searched (google) the highlighted message "Converting
> image ? to
> THUMB gif? Error?. Exit status 256", and a post said that
> imageMagick can only work with 64 bits machine, and won't
> work with
> 32 bits machine. However, when I checked the imageMagick,
> it's a 32bit:
>
> [root@greenstone lib]# pwd
> /home/xiaohu/Greenstone/bin/linux/imagemagick/lib
> [root@greenstone lib]# file libMagickCore.so.1
> libMagickCore.so.1: ELF 32-bit LSB shared object, Intel
> 80386,
> version 1 (SYSV), not stripped
>
> I read the release note of 2.83, it doesn't specify
> 64bits or 32bits
> for Linux. Has Greenstone been tested on both versions of
> Linux? If
> it is supposed to work with 32bit Linux, is there anyway
> to fix the
> error on converting images to thumbnails? Most of our
> students are
> building image collections, and thus it's critical for
> them to be
> able to convert images to thumbnails.
>
> Thank you very much!!
>
> Xiao
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> <mailto:greenstone-users@list.scms.waikato.ac.nz>
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
>
>