From: Anupama of Greenstone Team
Date: Mon Nov 17 17:19:10 2008
Subject: [greenstone-users] Problem white GLi Client Login

Hi Amin,

I see you're using an older version of GS3, since some source code
updates in the last months meant that gliserver4gs3.pl is no longer used
by the current GS3 code.

If you are indeed using Greenstone 3.03, instead of updating all of your
GS3 code:

1) There may be a problem with the way JAVA\_HOME is set on the server
machine. If you have access to the server machine, do you see that
JAVA\_HOME is set correctly when doing
echo $JAVA\_HOME
on Linux, or
echo %JAVA\_HOME%
on Windows? You need to do this in an entirely fresh x-term, without
running any extra scripts that set special environment variables for you.

You wrote that
> ive tested the perl code in command line and it works out fine telling
> me "java found" and "installation is ok" when i execute some thing like
> this :
>
> Perl gliserver4gs3.pl check-installation
Could this have something to do with JAVA\_HOME being set by a start-up
script (like bash.rc or a bat script) that's run on opening an
x-terminal/dos-prompt? That could explain how JAVA\_HOME is then
undefined when running GLI.


2) You may want to try the following that worked for someone else
previously:
> 1. Follow all the steps on the wiki page (from a previous email, I
> think you have done this step already).

> 2. Make back-up copies of your gsdlCGI4gs3.pm and gliserver4gs3.pl

> 3. Download the slightly modified versions of these two files from
> SVN:
>
http://trac.greenstone.org/browser/greenstone3/trunk/web/WEB-INF/cgi/gsdlCGI4gs3.pm
>
http://trac.greenstone.org/browser/greenstone3/trunk/web/WEB-INF/cgi/gliserver4gs3.pl

> 4. Maybe you want to go and check that the new gliserver4gs3.pl still
> works as before by pointing your browser to
>
http://yourhost:yourport/greenstone3/cgi-bin/gliserver4gs3.pl?cmd=check-installation

Finally, if it still gives you trouble about JAVA\_HOME not being set,
you can also try the following.
5. Additionally, make a backup copy of the file
<your GS3 installation folder>/web/WEB-INF/cgi/gsdl3site.cfg
6. Download the updated file
http://trac.greenstone.org/browser/greenstone3/trunk/web/WEB-INF/cgi/gsdl3site.cfg
and put this file into your GS3 installation folder's web/WEB-INF/cgi
folder.
7. In a text editor, open up the just downloaded gsdl3site.cfg file and
uncomment the following line by removing the hash in front of it:
javahome /full/path/to/j2sdk1.4/or/higher
Then edit the above line to set the path to your JAVA\_HOME.
8. In a text editor, open up the updated gsdlCGI4gs3.pm you downloaded
in step 3 above.
9. Look for the following lines (line 287 and 292) and uncomment them by
removing the # sign in front of them:
my $javahome = $self->get\_java\_home();
$ENV{'JAVA\_HOME'} = $javahome;
10. Now try pointing your browser to
http://yourhost:yourport/greenstone3/cgi-bin/gliserver4gs3.pl?cmd=check-installation
Does this help fix the missing JAVA\_HOME problem?

Regards,
Anupama


Amin Hedjazi wrote:
> Hello its me again
> i got some question on the Client\_gli Login
> i am using GS3
> first i read the link below and done compleately what it said
>
> http://wiki.greenstone.org/wiki/index.php/Remote\_Greenstone3
>
> and it was very use full thx Quan
> but in the part were i get to test my installation whit this :
>
>
http://localhost:8080/greenstone3/cgi-bin/gliserver4gs3.pl?cmd=check-installation
>
> i get this error :
>
> Content-type:text/plain ERROR: Java failed -- do you have the Java
run-time installed? JAVA\_HOME environment variable not set. Might not be
able to find Java unless in PATH (;c:\\Program
Files\\greenstone3\\gs2build\\bin\\script;c:\\Program
Files\\greenstone3\\gs2build\\bin\\windows;c:\\Program
Files\\greenstone3\\gs2build\\bin\\windows\\perl\\bin) GSDL3SRCHOME:
c:\\Program Files\\greenstone3 GSDLHOME: c:\\Program
Files\\greenstone3\\gs2build GSDLOS: windows PATH: ;c:\\Program
Files\\greenstone3\\gs2build\\bin\\script;c:\\Program
Files\\greenstone3\\gs2build\\bin\\windows;c:\\Program
Files\\greenstone3\\gs2build\\bin\\windows\\perl\\bin (cmd=check-installation)
>
> ive tested the perl code in command line and it works out fine
telling me "java found" and "installation is ok" when i execute some
thing like this :
>
> Perl gliserver4gs3.pl check-installation
>
> ill start the client\_gli4gs3.bat and go on until it askes me for the
user name and password but when entering my pass it gives and error
telling me this user does not exist (i entere the same password which a
coulde Authenthicate my selfe in the online interface
> , and i made a new user whit the privliges but no chance to log in
via the GLI !!)
> hear is the exact error i get :
>
> An error has occurred on the remote GreenStone server while
performing this operation:Authentication failed:no account for user 'admin'.
>
> sombody help please
> and pardon the bad english please
>
>
> ------------------------------------------------------------------------
>
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users