Again - Re: FW: [greenstone-devel] FW: Urgent Help

From Anupama of Greenstone Team
DateWed Jul 14 15:13:53 2010
Subject Again - Re: FW: [greenstone-devel] FW: Urgent Help
In-Reply-To (AANLkTikQusDx37QbbeQH616Yr4aRXVXmyaNm5qSZcfXo-mail-gmail-com)
Hello again Sreeja,

This is the third in a line of related emails today regarding your
question. Read all three mails, and try the suggestions in this e-mail.

You had written:
> Since both of the steps are giving the desired output...i didnt
perform the below operations.

So then, gliserver.pl's most basic functionality is working and is not
causing a CGI error.

You had earlier written:
> I'm getting an error while building a collection. I'm able to
> connect to the server, Gather collection, enter metadata.But
> when i start building it is giving the error
> *Server returned HTTP response code: 502 for URL: http://<our
> machine>/greenstone/cgi-bin/gliserver.pl <http://gliserver.pl>
> <http://gliserver.pl> *

Then it is the particular gliserver.pl function that calls the
build-related operations of Greenstone that is going wrong?


1) On the client side, in the DOS console that appears when client-GLI
is launched, it will print out what commands it is sending to gliserver.pl.

In the case of building, you will see client-GLI output something like
the following to its DOS-console (but with your collection's name
substituted for the value of argument 'c'):

gliserver args:
cmd=run-script&c=me-remcol1&script=full-import.pl&language=en&gli=&language=en
...
...
gliserver args:
cmd=run-script&c=me-remcol1&script=full-buildcol.pl&language=en&gli=&language=en
...
...

2) In a DOS prompt, can you try manually running the gliserver.pl build
command at which things failed, as I showed in yesterday's email. So you
will want to repeat the commands in step 1 above in a DOS prompt as
follows, but include username and password (I think we can skip sending
the duplicated language argument):

> perl -S gliserver.pl cmd=run-script c=<your collection name>
script=full-import.pl language=en gli= un=<your client-gli username>
pw=<your client-gli pwd>

Does that give some processing output? Or any errors? If the last, what
is the output it fails with.

3) Then try the full-build-col.pl step by changing the name of the
script argument to this:

> > perl -S gliserver.pl cmd=run-script c=<your collection name>
script=full-buildcol.pl language=en gli= un=<your client-gli username>
pw=<your client-gli pwd>

Once again, what is the output if it failed?


4) If gliserver.pl is able to run both scripts fine in the DOS prompt
and there are no errors there, then maybe it is the way the gliserver.pl
script might handle their execution and output of results with IIS.

Make sure your IIS server is still running and then open a browser and
paste (substitute values for your situation for your remote server's
host and port, and your client-gli's username and password):

http://<your-remote-server-host>:<remote-server-port>/greenstone/cgi-bin/gliserver.pl?cmd=run-script&c=me-remcol1&script=full-import.pl&language=en&gli=&language=en&un=<uname>&pw=<pwd>

Does it produce the sort of output GLI generally displays when an import
has succeeded? If it fails, what is the output


5) Then paste the following in your browser's URL bar:
http://<your-remote-server-host>:<remote-server-port>/greenstone/cgi-bin/gliserver.pl?cmd=run-script&c=me-remcol1&script=full-buildcol.pl&language=en&gli=&language=en&un=<uname>&pw=<pwd>

Does the above produce the usual build output or are there any errors?

Steps 4 and 5 would be using your IIS server, so they will hopefully
give more feedback as to where things are going wrong or what is failing
during building.

Can you get back to me with any error output.

Regards,
Anupama

s2008 g wrote:
> Hello Anupama,
>
> Some other things to try:
>
> 1. Could you see if visiting the following produces any useful information:
> http://<your-machine-name>:<
>
> port>/greenstone/cgi-bin/gliserver.pl?cmd=check-installation
> <http://gliserver.pl/?cmd=check-installation>
>
>
> *This is coming fine: "Installation OK"*
>
>
> where you would replace the <machine name> and <port> placeholders
> in the above with your remote machine's name and port where your
> server is listening.
>
> 2. If the above worked, try:
> http://<your-machine-name>:<port>/greenstone/cgi-bin/gliserver.pl?cmd=greenstone-server-version
> <http://gliserver.pl/?cmd=greenstone-server-version>
>
> *
> This is coming fine: "Greenstone server version 2" *
>
> Does the browser page give you some kind of meaningful response?
>
>
> Since both of the steps are giving the desired output...i didnt perform
> the below operations.
>
>
>
> 3. /If step 1 and, consequently, step 2 did not work, then follow
> the steps below to open a DOS prompt, cd into your Greenstone
> installation folder and go to its cgi-bin folder. From there try
> running the gliserver.pl <http://gliserver.pl/> file on the command
> line to see whether it works in this manner:
>
> - Open a Windows DOS prompt (Start > Run, then type "cmd" in the
> little dialog)
>
> - type:
> cd <the full path to your greenstone installation>
> e.g. if your Greenstone is installed in C:, then you would type:
> cd c:greenstone
>
> - type the following to set the environment for Greenstone and have
> access to Perl to run the gliserver.pl <http://gliserver.pl/> script
> hereafter:
> setup.bat
>
> - Go into the cgi-bin folder:
> cd cgi-bin
>
> - Now to run the gliserver.pl <http://gliserver.pl/> script, type:
> perl -S gliserver.pl <http://gliserver.pl/>
>
> Does the output tell you something along the lines of No Command
> Specified? If so, then re-run the above with some testing commands:
>
> - perl -S gliserver.pl <http://gliserver.pl/> cmd=check-installation
>
> then:
> - perl -S gliserver.pl <http://gliserver.pl/>
> cmd=greenstone-server-version
>
> Do they give you some kind of informative answers?/
>
>
> Greenstone 2.83 comes with its own apache web server that runs on
> Windows, Linux and Mac. If you are having trouble with IIS, you
> could alternatively try using that.
>
> *We have some critical sites running in IIS. So we cant switch over to
> Apache.
> Is there some definite reason why IIS is not recomended for greenstone.*
>
>
>
>
> On Mon, Jul 12, 2010 at 11:39 AM, Anupama of Greenstone Team
> <greenstone_team@cs.waikato.ac.nz
> <mailto:greenstone_team@cs.waikato.ac.nz>> wrote:
>
> Hi Sreeja,
>
> I've not encountered this error before and I note that you are using
> IIS which is not something we test with, but I looked up the http 502
> error code and the occurrence of "CGI error" in the Greenstone mail
> archives. What I found follows. They may perhaps help you:
>
> a) http://www.checkupdown.com/status/E502.html
> "A server (not necessarily a Web server) is acting as a gateway or proxy
> to fulfil the request by the client (e.g. your Web browser or our
> CheckUpDown robot) to access the requested URL. This server received an
> invalid response from an upstream server it accessed to fulfil the
> request.
>
> This usually does not mean that the upstream server is down (no
> response to the gateway/proxy), but rather that the upstream server and
> the gateway/proxy do not agree on the protocol for exchanging data.
> Given that Internet protocols are quite clear, it often means that one
> or both machines have been incorrectly or incompletely programmed."
>
> b) And
> http://www.nzdl.org/gsdlmod?e=d-00000-00---off-0gsarch--00-0--0-10-0--0-0---0prompt-10---4------4-0-1l--11-en-50-0--20-about--100-0-1-00-0-0-11-1-0utfZz-8-00-0-1-00-0-0-11-1-0utfZz-8-00-0-0-11-1-0utfZz-8-00&a=d&c=gsarch&cl=CL1.4.80&d=HASH55079c50674f917d6aa57a_1081
> <http://www.nzdl.org/gsdlmod?e=d-00000-00---off-0gsarch--00-0--0-10-0--0-0---0prompt-10---4------4-0-1l--11-en-50-0--20-about--100-0-1-00-0-0-11-1-0utfZz-8-00-0-1-00-0-0-11-1-0utfZz-8-00-0-0-11-1-0utfZz-8-00&a=d&c=gsarch&cl=CL1.4.80&d=HASH55079c50674f917d6aa57a_1081>
> (which is part of
> http://www.nzdl.org/gsdlmod?e=d-00000-00---off-0gsarch--00-0--0-10-0--0-0---0prompt-10---4------4-0-1l--11-en-50-0--20-about--100-0-1-00-0-0-11-1-0utfZz-8-00-0-1-00-0-0-11-1-0utfZz-8-00&a=d&c=gsarch&cl=CL1.4.80
> <http://www.nzdl.org/gsdlmod?e=d-00000-00---off-0gsarch--00-0--0-10-0--0-0---0prompt-10---4------4-0-1l--11-en-50-0--20-about--100-0-1-00-0-0-11-1-0utfZz-8-00-0-1-00-0-0-11-1-0utfZz-8-00&a=d&c=gsarch&cl=CL1.4.80>)
>
> The initial link states:
> Some web servers expect cgi scripts to use "non-parsed headers" (such
> as "HTTP/1.0 200 Ok" for the http status code) while others expect
> scripts to return something like "Status: 200".
>
>
> Some other things to try:
>
> 1. Could you see if visiting the following produces any useful
> information:
> http://<your-machine-name>:<port>/greenstone/cgi-bin/gliserver.pl?cmd=check-installation
> <http://gliserver.pl?cmd=check-installation>
>
> where you would replace the <machine name> and <port> placeholders
> in the above with your remote machine's name and port where your
> server is listening.
>
> 2. If the above worked, try:
> http://<your-machine-name>:<port>/greenstone/cgi-bin/gliserver.pl?cmd=greenstone-server-version
> <http://gliserver.pl?cmd=greenstone-server-version>
>
> Does the browser page give you some kind of meaningful response?
>
> 3. If step 1 and, consequently, step 2 did not work, then follow the
> steps below to open a DOS prompt, cd into your Greenstone
> installation folder and go to its cgi-bin folder. From there try
> running the gliserver.pl <http://gliserver.pl> file on the command
> line to see whether it works in this manner:
>
> - Open a Windows DOS prompt (Start > Run, then type "cmd" in the
> little dialog)
>
> - type:
> cd <the full path to your greenstone installation>
> e.g. if your Greenstone is installed in C:, then you would type:
> cd c:greenstone
>
> - type the following to set the environment for Greenstone and have
> access to Perl to run the gliserver.pl <http://gliserver.pl> script
> hereafter:
> setup.bat
>
> - Go into the cgi-bin folder:
> cd cgi-bin
>
> - Now to run the gliserver.pl <http://gliserver.pl> script, type:
> perl -S gliserver.pl <http://gliserver.pl>
>
> Does the output tell you something along the lines of No Command
> Specified? If so, then re-run the above with some testing commands:
>
> - perl -S gliserver.pl <http://gliserver.pl> cmd=check-installation
>
> then:
> - perl -S gliserver.pl <http://gliserver.pl>
> cmd=greenstone-server-version
>
> Do they give you some kind of informative answers?
>
>
> Greenstone 2.83 comes with its own apache web server that runs on
> Windows, Linux and Mac. If you are having trouble with IIS, you
> could alternatively try using that.
>
> Regards,
> Anupama
>
> s2008 g wrote:
>
> Hello Anupama,
>
> I'm getting an error while building a collection. I'm able to
> connect to the server, Gather collection, enter metadata.But
> when i start building it is giving the error
> *Server returned HTTP response code: 502 for URL: http://<our
> machine>/greenstone/cgi-bin/gliserver.pl <http://gliserver.pl>
> <http://gliserver.pl> *
>
>
> I'm working as client(GS 2.83).
> SERVER SYSTEM : WIN 2003
> IIS 6.
>
> GREENSTONE 2.83
>
> * http://<remote host machine name>:<remote Greenstone port
> number>/greenstone/cgi-bin/library.cgi.
> *I'm able to get this page.*
> * http://<remote host machine name>:<remote Greenstone port
> number>/greenstone/cgi-bin/gliserver.pl
> <http://gliserver.pl> <http://gliserver.pl>
>
> *This is giving CGI error.The specified CGI application
> misbehaved
> by not returning a complete set of HTTP headers.
>
> *Searched for this error in greenstone archives.But could
> not find
> a proper answer.
>
> Any help will be appreciated.
>
> Thanks & Regards
> Sreeja G*
> *
>
>
>
> On Tue, Apr 20, 2010 at 10:19 AM, Anupama of Greenstone Team
> <greenstone_team@cs.waikato.ac.nz
> <mailto:greenstone_team@cs.waikato.ac.nz>
> <mailto:greenstone_team@cs.waikato.ac.nz
> <mailto:greenstone_team@cs.waikato.ac.nz>>> wrote:
>
> Hi Samveg,
>
> Usually when I get the "Connection timed out" exception when
> working
> with the client-GLI, it tends to be because the server isn't
> running
> (because it stopped, or I forgot to start it, or because it had
> issues when trying to run).
>
> 1. Working from the client machine, Could you please first check
> that the server is in fact running by using your browser to visit
> your remote Greenstone server's URL:
>
> Assuming you are working with Greenstone 2, try visiting the
> page:
> http://<remote host machine name>:<remote Greenstone port
> number>/greenstone/cgi-bin/library.cgi
>
> Make sure that you're not typing in "localhost" for the
> remote host
> machine name that is running your Greenstone server.
>
> 2. If the server is in fact running there, then could you
> double-check that the gliserver.pl <http://gliserver.pl>
> <http://gliserver.pl> URL you
>
> enter on starting up client-GLI matches? It has to be of a
> similar
> form to above:
>
> http://<remote host machine name>:<remote Greenstone port
> number>/greenstone/cgi-bin/gliserver.pl <http://gliserver.pl>
> <http://gliserver.pl>
>
>
>
> I can't easily diagnose the issue further until I know that
> step 1
> is working. If the server is not in fact running, start it up
> again
> on the remote machine. And then, on the *client* machine,
> test the
> server URL once more through a browser. (If that doesn't work,
> perhaps your remote server was not made accessible to external
> computers?)
>
> Please write back on what works or what doesn't work in the steps
> described above, I think it will help in narrowing down the
> cause.
>
> Regards,
> Anu