Re: [greenstone-users] CGI error incomplete http headers on IIS6

From Michael Dewsnip
DateThu, 05 Jul 2007 17:13:23 +1200
Subject Re: [greenstone-users] CGI error incomplete http headers on IIS6
In-Reply-To (fbaed5f25d8e-5d8efbaed5f2-washburn-edu)
The debugging_enabled option does not produce any extra output -- it leaves uploaded zip files on the server instead of deleting them. In any case, it isn't going to make any difference if IIS isn't running the Perl script.

Try putting the attached file into the Greenstone "cgi-bin" directory, adding the Perl path at the top and accessing it from your web browser. Do you still get the same error?

Regards,

Michael



curtis.vonlintel@washburn.edu wrote:
ah, thanks for the tip, learned something new. 

Unfortunately the httperr log only has Timer_ConnectionIdle -. The
system, application, and security event logs have nothing. I found the
debugging_enabled variable in the gliserver.pl and changed that to 1 but
nothing new printed to screen. Is 1 the proper entry to turn on
debugging? Or a different way to turn on debugging in greenstone?

Thanks
Curtis

----- Original Message -----
From: Michael Dewsnip <mdewsnip@cs.waikato.ac.nz>
Date: Tuesday, July 3, 2007 4:55 pm
Subject: Re: [greenstone-users] CGI error incomplete http headers on IIS6
To: Curtis Von Lintel <curtis.vonlintel@washburn.edu>
Cc: greenstone-users@list.scms.waikato.ac.nz

  
Hi Curtis,

According to

    
http://blogs.msdn.com/david.wang/archive/2005/12/31/HOWTO_Basics of IIS6_Troubleshooting.aspx
  
IIS has more than one log file... in any case, this page may help 
you to
discover where the "real" error messages are going.

Regards,

Michael



Curtis Von Lintel wrote:
    
The log for IIS is set to log all data, but it does not reveal
anything interesting to me. The error log in greenstone only has
entries for writing to the main.cfg and the history.db. I am not 
      
aware> of another log file.
    
The path in gliserver.pl is
#!E:/greenstone/bin/windows/perl/bin/perl.exe -w
I have also tried #!E:greenstonebinwindowsperlbinperl.exe -w
and #!E:\greenstone\bin\windows\perl\bin\perl.exe -w
and #!../bin/windows/perl/bin/perl.exe -w

I have also disabled the ntfs security permissions for the web 
      
server> user and used an admin login and still receive the same error.
    
Curtis

Michael Dewsnip wrote:
      
Hi Curtis,

My guess would be that the gliserver.pl script is failing during
loading because the Perl path at the top is incorrect or it's 
        
failing>> to load a required module. I don't know anything about 
IIS but I'd
    
expect these errors to be written to an error log file 
        
somewhere. The
    
web server log you include in your e-mail looks more like an access
log -- is there another log for errors?

I assume you have your reasons for using IIS, so I won't try to
convince you to use Apache :-) However if you get desperate you 
        
could>> install this temporarily to work out what the problem is -- 
any>> errors loading gliserver.pl will be written to Apache's 
error_log file.
    
None of the remote Greenstone functionality (including the client
version) will work without the gliserver.pl script running 
        
correctly>> (perhaps this needs to be made clearer in the 
documentation).>>
    
Regards,

Michael
-- 
DL Consulting
Greenstone Digital Library and Digitisation Specialists
contact@dlconsulting.com
www.dlconsulting.com
  




Curtis Von Lintel wrote:
        
We are currently working to install/configure gsdl's gli applet
version 2.73

Accessing http://ourserver.domain/gsdl/cgi-bin/library.exe works
fine. We can add collections from the console, but have been 
          
unable>>> to get passed the
    
http://ourserver.domain/gsdl/cgi-bin/gliserver.pl?cmd=check-
          
installation>>> when pursuing the applet.
    
We receive the error "CGI Error The specified CGI application
misbehaved by not returning a complete set of HTTP headers."

I have reviewed the wiki and documentation multiple times. The 
          
only>>> difference between my installation an the instructions here
    
<http://greenstonewiki.cs.waikato.ac.nz/wiki/index.php/Installing_Greenstone#How_do_I_use_Greenstone.27s_web_library_with_IIS.3F>,>>>
is on step 4 removing all extensions does not work. After removing
  
all the extensions, when I go back to check the extension they are
all back. Seems as though IIS6 doesn't want you to remove them 
          
all.>>> I even tried removing each one individually, but they can 
back from
    
that method as well. Didn't seem to matter as the library loads 
          
anyways.>>>
    
I found one posting on the mailing list suggesting to add "print
STDOUT "Status: 200 OK " ; " to the gliserver.pl at the end of the
get_script_options method. That had no affect for us. The 
          
posting is
    
here <http://tinyurl.com/2jvnla>.

I have noticed that if I leave off the "%s" %s arguments the cgi
will be terminated by the server after a timeout period, and with
the arguments we have the CGI error. I have also tried with All
Unknown CGI Extensions prohibited and allowed, no difference. 
          
To me,
    
allowed seems like a terrible way to have to go.

I have downloaded and attempted to use the client instead of the
applet. I receive the following three errors, after attempting 
          
to login:
    
An error has occurred on the remote Greenstone server while
performing this operation:
Server returned HTTP response code: 502 for URL:
http://ourserver.domain/gsdl/cgi-bin/gliserver.pl?cmd=get-
          
script-options&script=classinfo.pl&xml=&language=en&listall&un=admin&pw=XXXX
  
Unable to get the list of classifiers using classinfo.pl -listall

An error has occurred on the remote Greenstone server while
performing this operation:
Server returned HTTP response code: 502 for URL:
http://ourserver.domain/gsdl/cgi-bin/gliserver.pl?cmd=get-
          
script-options&script=pluginfo.pl&xml=&language=en&listall&un=admin&pw=XXX
    
Unable to get the list of plugins using pluginfo.pl -listall

Are there any Windows 2003 server admins out there that have
overcome this issue? Any suggestion anyone might have (other than
use nix) would be great.

System specs per the troubleshooting section of the wiki
1. Server OS Windows 2003 Enterprise SP1 IIS6
2.Greenstone 2.73
3.Server - Java SDK 1.4.2.15
4.client OS Windows XP Pro SP2 -multiple systems
5.have tried both client and applet versions of the GLI
6.See above
7.See above as well. web server log below
2007-06-29 18:47:20 W3SVC782716 WEB1 xxx.xxx.x.xxx  GET
/gsdl/cgi-bin/gliserver.pl
cmd=get-script-
          
options&script=classinfo.pl&xml=&language=en&listall&un=admin&pw=xxx>>>
80 - xxx.xxx.x.xxx HTTP/1.1 Java/1.5.0_08 - - ourhost.ourdomain.edu
  
502 2 0 393 320 78
2007-06-29 18:47:37 W3SVC782716 WEB1 xxx.xxx.x.xxx GET
/gsdl/cgi-bin/gliserver.pl
cmd=get-script-
          
options&script=pluginfo.pl&xml=&language=en&listall&un=admin&pw=xxx>>>
    
80 - xxx.xxx.x.xxx HTTP/1.1 Java/1.5.0_08 - - ourhost.ourdomain.edu
  
502 2 0 393 319 46
2007-06-29 18:47:55 W3SVC782716 WEB1 xxx.xxx.x.xxx GET
/gsdl/cgi-bin/gliserver.pl
cmd=get-script-
          
options&script=classinfo.pl&xml=&language=en&listall&un=admin&pw=xxx>>>
80 - xxx.xxx.x.xxx HTTP/1.1 Java/1.5.0_08 - - ourhost.ourdomain.edu
  
502 2 0 393 320 187
2007-06-29 18:48:30 W3SVC782716 WEB1 xxx.xxx.x.xxx GET
/gsdl/cgi-bin/gliserver.pl
cmd=get-script-
          
options&script=pluginfo.pl&xml=&language=en&listall&un=admin&pw=xxx>>>
    
80 - xxx.xxx.x.xxx HTTP/1.1 Java/1.5.0_08 - - ourhost.ourdomain.edu
  
502 2 0 393 319 156
2007-06-29 18:50:39 W3SVC782716 WEB1 xxx.xxx.x.xxx GET
/gsdl/cgi-bin/gliserver.pl
cmd=get-script-
          
options&script=classinfo.pl&xml=&language=en&listall&un=admin&pw=xxx>>>
80 - xxx.xxx.x.xxx HTTP/1.1 Java/1.5.0_08 - - ourhost.ourdomain.edu
  
502 2 0 393 320 109
2007-06-29 18:53:37 W3SVC782716 WEB1 xxx.xxx.x.xxx GET
/gsdl/cgi-bin/gliserver.pl
cmd=get-script-
          
options&script=pluginfo.pl&xml=&language=en&listall&un=admin&pw=xxx>>>
    
80 - xxx.xxx.x.xxx HTTP/1.1 Java/1.5.0_08 - - ourhost.ourdomain.edu
  
502 2 0 393 319 46

Output from console for the GLI client version 2.72:

Greenstone Librarian Interface (GLI)
Copyright (C) 2006, New Zealand Digital Library Project, 
          
University>>> Of Waikato
    
GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
This is free software, and you are welcome to redistribute it
Checking Java: C:WINDOWSsystem32

Running the Greenstone Librarian Interface...
Version: v2.72

Deleting user's local collect directory...
Done.
gliserver args:
cmd=get-script-options&script=classinfo.pl&xml=&language=en&list
all
java.io.IOException: Server returned HTTP response code: 502 for
URL:
http://host.domain.edu/gsdl/cgi-bin/gliserver.pl?cmd=get-script-
          
options&script=class>>> 
info.pl&xml=&language=en&listall&un=admin&pw=xxx>>>         at
    
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
    
urce)
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer.sendCommandToSe>>>
rverInternal(RemoteGreenstoneServer.java:1048)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer.sendCommandToSe>>>
rver(RemoteGreenstoneServer.java:900)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer.access$200(Remo>>>
teGreenstoneServer.java:46)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer$RemoteGreenston>>>
eServerGetScriptOptionsAction.perform(RemoteGreenstoneServer.java:562)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer$RemoteGreenston>>>
eServerActionQueue.run(RemoteGreenstoneServer.java:229)
  
gliserver args:
cmd=get-script-options&script=pluginfo.pl&xml=&language=en&lista
ll
java.io.IOException: Server returned HTTP response code: 502 for
URL:
http://host.domain.edu//gsdl/cgi-bin/gliserver.pl?cmd=get-
          
script-options&script=plugi
    
nfo.pl&xml=&language=en&listall&un=admin&pw=xxx
        at

          
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
    
urce)
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer.sendCommandToSe>>>
rverInternal(RemoteGreenstoneServer.java:1048)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer.sendCommandToSe>>>
rver(RemoteGreenstoneServer.java:900)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer.access$200(Remo>>>
teGreenstoneServer.java:46)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer$RemoteGreenston>>>
eServerGetScriptOptionsAction.perform(RemoteGreenstoneServer.java:562)
  
        at

          
org.greenstone.gatherer.remote.RemoteGreenstoneServer$RemoteGreenston>>>
eServerActionQueue.run(RemoteGreenstoneServer.java:229)
  
Thanks

----------------------------------------------------------------
          
--------
    
_______________________________________________
greenstone-users mailing list
greenstone-users@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
  
          
-- 
DL Consulting
Greenstone Digital Library and Digitisation Specialists
contact@dlconsulting.com
www.dlconsulting.com


    


  


-- 
DL Consulting
Greenstone Digital Library and Digitisation Specialists
contact@dlconsulting.com
www.dlconsulting.com


<<attachment>>
Type: application/x-perl
Filename: test.pl

download