> 
> This is what is happening on server side: (I have included relevant  
> code)
> 
> - once server receives request from client, it gets out of the  
> accept() method call and forks a client thread (passes the socket as  
> an argument)
> 
>   server = new ServerSocket(port);
>   socket = server.accept();
> sazInit=new SAZInit(socket,confObject);
> SAZClientThread sazClientThread=new SAZClientThread(sazInit);
> sazClientThread.start();
> 
> - within this client thread, the first thing it does is obtain an  
> ExtendedGSSContext (using the servers host cert and host key) and  
> passes it as an argument to another function 
> "getGsiServerSocket " . I  
> have attached file called ANAM.java which contains these functions.

This class has an implementation of the handshake itself - is that being
used at all? Is there a log trace of these calls? It would help better
understand flow, rather then correlating this explanation against code.

> context  =  anamObject.getGsiServerContext 
> (confObject.SAZ_SERVER_CERT,confObject.SAZ_SERVER_KEY);
>   clientSocket = anamObject.getGsiServerSocket(clientSocket,context);

How is the clientSocket passed as argumnet here created?

> I believe handshake is being done by function "getGsiClientSocket",
> (Socket clientSocket =  
> GssSocketFactory.getDefault().createSocket(host, port, context);)

The code you sent me just creates a socket - I don't see how you expect that
handshake is done as part of the above code? 

Enable the following logger to see start and end of handshake messages:

log4j.category.org.globus.gsi.gssapi.net=DEBUG

> 
> - then it tries to obtain a input and output stream using 
> this client  
> socket. This is where it hangs...

The getInputStream() in GssSocket() intiates handshake using the
startHandshake() method.

Can you enable the following logger also to see context establishment
pieces:

log4j.category.org.globus.gsi.gssapi=DEBUG

Please send me logs with above logging enabled.

Rachana

> 
> the code which does this is :
> rwSocket=new ReadWriteSocket(clientSocket);
> 
> and I have attached file called ReadWriteSocket.java.
> 
> Basically this is what the constructor is doing..
> 
>   public ReadWriteSocket(Socket clientSocket){
>                  this.clientSocket=clientSocket;
>                  try{
>                          in=clientSocket.getInputStream();
>                          out=clientSocket.getOutputStream();
>                          reader =new BufferedReader(new  
> InputStreamReader(in));
>                          writer=new PrintStream(out);
>                          din=new DataInputStream(in);
>                          dout=new DataOutputStream(out);
>                  }catch(IOException e){
>                          System.out.println("Exception "+e);
>                  }
>          }
> 
> The code hangs on the getInputStream() function...
> 
> I have also tested that if I just try to get input and output stream  
> from the socket object (when it gets created by server and is passed  
> to the thread before globus libraries are used), i can get them.
> 
> So obviously globus libraries are modifying the client socket 
> in a way  
> that is causing the problem in case of proxy delegated 5 times and  
> above..
> 
> At this stage, I am not sure what else I can try at my end and am  
> looking forward for any support from the Globus folks..
> 
> If you need any other information, please let me know
> -Neha
> 
> 

Reply via email to