[greenstone-users] java.io.IOException: Server returned HTTP response code: 403

From Greenstone Team
DateThu Aug 11 19:56:05 2011
Subject [greenstone-users] java.io.IOException: Server returned HTTP response code: 403
In-Reply-To (CABcmDzWn-tXRpPMNzJRd83BHZodMXZw04-=99-o-Sqb739TFNQ-mail-gmail-com)

It sounds like your Greenstone server is not set to allow external
connections. This is necessary to let other machines connect the server
machine. To test that this is indeed the problem, can you try accessing
your Greenstone library home page from the 2nd Mac machine (the one
you're using as the client-machine)?

If you are unable to visit the Greenstone home page served from your
other Mac machine, then it may indeed be that your server has not yet
been set to allow external connections. If so, or even otherwise, can
you try the following:

1. Stop the Greenstone webserver and GLI (or client-GLI) if running.

2. Use a terminal to go into your top-level Greenstone installation
folder and launch gs2-server.sh from there:
> cd /Users/arif/Greenstone
> ./gs2-server.sh

3. The Greenstone Server Interface dialog should pop up. Go to File >
Settings. A settings dialog should appear. In it, check the "Allow
external connections" field. And make sure that the "Address Resolution
Method" is set to one of the first 2 options ("Get Local IP and resolve
to a name" or "Get Local IP"). Click OK to apply the settings. It should
take some moments, but under a minute.

4. Back in the main Greenstone Server Interface dialog, press the Enter
Library button and it will open up a browser page of where your
Greenstone server is now running. You want to make note of the URL. It
will be of the form:

5. Copy the URL, and replace the "library.cgi" at the end with the
"gliserver.pl", to get:

6. Paste this new URL into a client-GLI run from the local machine to
test that you can still connect to the server from the client-GLI when
both are on the same machine.

7. Move to your other Mac, launch the client-GLI here and now type out
that same URL to the gliserver.pl (from step 5 above).

Write back if things didn't work out,

S M Niaz Arifin wrote:
> Hi,
> I just installed Greenstone Version 2.84 on my Mac (which I intend to
> use as the Greenstone server). It runs OK and I can build/view
> collections using safari.
> However, when I tried to connect to the server from another Mac (by
> running the script ./gli/client-gli.sh), I am getting refused:
> Server returned HTTP response code: 403 for URL: ...
> The GLI Server address I used is:
> http://myServerName:8283/greenstone/cgi-bin/gliserver.pl
> I checked the following:
> * myServer is using port 8283, e.g. in Safari.
> * to test if the client works locally, I ran it from within
> myServer, and it worked.
> * I also turned off proxi settings for Safari.
> Any suggestions to work this out?
> Details of the error:
> :> ./gli/client-gli.sh
> Greenstone Librarian Interface (Client-GLI)
> Copyright (C) 2008, New Zealand Digital Library Project, University Of
> Waikato
> Client-GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
> This is free software, and you are welcome to redistribute it
> Greenstone version found: 2
> Checking GSDL2: /Users/arif/Greenstone
> Your environment has successfully been set up to run Greenstone
> +Your environment is now setup for the GNOME support library extension
> +Adding in executable path for apache-httpd
> GSDLHOME is: /Users/arif/Greenstone
> Perl:
> /usr/bin/perl
> Java:
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java
> Running the Client-GLI Librarian Interface...
> Perl and GSDLHOME (/Users/arif/Greenstone) detected.
> Downloading is enabled.
> Version: 2.84
> Java vendor: Apple Inc.
> Note that the Librarian Interface has been developed and tested with
> Java from Sun Microsystems.
> gliserver args: cmd=greenstone-server-version
> java.io.IOException: Server returned HTTP response code: 403 for URL:
> http://myServerName:8283/greenstone/cgi-bin/gliserver.pl?cmd=greenstone-server-version&ts=1313040621922
> <http://myServerName:8283/greenstone/cgi-bin/gliserver.pl?cmd=greenstone-server-version&ts=1313040621922>
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
> at
> org.greenstone.gatherer.remote.RemoteGreenstoneServer.sendCommandToServerInternal(RemoteGreenstoneServer.java:669)
> at
> org.greenstone.gatherer.remote.RemoteGreenstoneServer.sendCommandToServer(RemoteGreenstoneServer.java:504)
> at
> org.greenstone.gatherer.remote.RemoteGreenstoneServerAction$VersionAction.perform(RemoteGreenstoneServerAction.java:272)
> at org.greenstone.gatherer.remote.ActionQueue.run(ActionQueue.java:136)
> Remote Greenstone server version: -1
> Exiting, number of jobs on queue: 0
> Done!
> Any help would be appreciated.
> --
> Thanks,
> S. M. Niaz Arifin
> Graduate Student
> 206 Cushing, Department of Computer Science and Engineering
> University of Notre Dame, IN 46556, USA
> Research: https://sites.google.com/a/nd.edu/publications
> Website: http://smniazarifin.tripod.com
> ------------------------------------------------------------------------
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users