ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | proactive List | April 2006 Index

<--  Date Index  --> <--  Thread Index  -->

Protocol rmissh


Hello,
I use ProActive for do communicate two hosts connected through firewall.
The name of the remote host is fujih1.cli.di.unipi.it and the name of the other host is marte.di.unipi.it.
I use XML descriptors and as protocol "rmissh".
My class are:

HelloRmi.java: object remote
helloRmi.xml: descriptor xml
OggettoRmi.java: is the main that calls the method of object remote
Config.xml: for ProActiveUserPropertiesFile

I attach the test program.
I have this error: Connection refused to host: marte.di.unipi.it;
I have the same error without the class Config.xml too.

This is the output:

 --> This ClassFileServer is reading resources from classpath
Created a new registry on port 1099
ProActive Security Policy (proactive.runtime.security) not set. Runtime Security disabled ************* Reading deployment descriptor: file:helloRmi.xml ***************** ***
created VirtualNode name=Hello
eseguito getProDescriptor:
attivato vn
**** Starting jvm on fujih1.cli.di.unipi.it
ProActive Security Policy (proactive.runtime.security) not set. Runtime Security disabled
 --> This ClassFileServer is reading resources from classpath
getNodes: org.objectweb.proactive.core.node.NodeException: After many retries, not even one node can be found //marte.di.unipi.it/Node1039284440 successfully bound in registry at //marte.di.unipi.it/Node1039284440
Generating class : pa.stub.Stub_HelloRmi
Exception in thread "main" java.lang.NullPointerException
        at OggettoRmi.main(OggettoRmi.java:70)
org.objectweb.proactive.core.ProActiveException: Remote
at org.objectweb.proactive.core.runtime.rmi.RmiRuntimeFactory.getRemoteRuntimeImpl(RmiRuntimeFactory.java:123) at org.objectweb.proactive.core.runtime.RuntimeFactory.getRuntime(RuntimeFactory.java:205) at org.objectweb.proactive.core.runtime.StartRuntime.run(StartRuntime.java:144) at org.objectweb.proactive.core.runtime.StartRuntime.main(StartRuntime.java:129) Caused by: java.rmi.ConnectException: Connection refused to host: marte.di.unipi.it; nested exception is:
        java.net.ConnectException: Connection timed out
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at java.rmi.Naming.lookup(Naming.java:84)
at org.objectweb.proactive.core.runtime.rmi.RmiRuntimeFactory.getRemoteRuntimeImpl(RmiRuntimeFactory.java:119) ... 3 more
Caused by: java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
        at java.net.Socket.connect(Socket.java:507)
        at java.net.Socket.connect(Socket.java:457)
        at java.net.Socket.<init>(Socket.java:365)
        at java.net.Socket.<init>(Socket.java:178)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
        ... 9 more
Process finished Thread=ERR -> ssh fujih1.cli.di.un
Process finished Thread=IN -> ssh fujih1.cli.di.un


Can you explain me why don't works?

Thank you.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

<?xml version="1.0" encoding="UTF-8"?>
<ProActiveUserProperties>
	<properties>
	      <prop key="RemoteHostname" value="fujih1.cli.di.unipi.it"/>
		<prop key="schema.validation" value="disable"/> 
                <prop key="proactive.future.ac" value="enable"/> 
                <prop key="proactive.communication.protocol" value="rmissh"/> 
               

	</properties>
</ProActiveUserProperties>
 
import java.net.UnknownHostException;

import org.apache.log4j.Logger;
import org.objectweb.proactive.ProActive;
import org.objectweb.proactive.core.descriptor.data.ProActiveDescriptor;
import org.objectweb.proactive.core.descriptor.data.VirtualNode;
import org.objectweb.proactive.core.node.Node;
import org.objectweb.proactive.core.util.log.Loggers;
import org.objectweb.proactive.core.util.log.ProActiveLogger;
import org.objectweb.proactive.core.util.wrapper.StringMutableWrapper;

import org.objectweb.proactive.core.node.NodeInformation; 

public class HelloRmi implements java.io.Serializable {
    
    String stringa = "Hello ";
    String name=null;

    /** ProActive compulsory no-args constructor */
    public HelloRmi() {
    }

    public HelloRmi(String name) {
	this.name = name;
    }
    
    public String compute(String str){
	String nuova=null;
	nuova=stringa+str;
	return nuova;
    }

 
}
<?xml version="1.0" encoding="UTF-8"?>
<ProActiveDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="DescriptorSchema.xsd">
   <componentDefinition>
      <virtualNodesDefinition>               <!-- Declare the different virtual nodes-->
         <virtualNode name="Hello"/>      
      </virtualNodesDefinition>
   </componentDefinition>
   <deployment>
      
      <mapping>                              <!-- Map the different virtual nodes to jvm ?-->
         <map virtualNode="Hello">           
            <jvmSet>
               <vmName value="Jvm1"/>
            </jvmSet>
         </map>
      </mapping>
      
      <jvms>                                 <!-- Define the different jvms-->
         <jvm name="Jvm1">
         <creation>
            <processReference refid="sshProcess"/>
         </creation>
         </jvm>
      </jvms>
   </deployment>
   <infrastructure>
      <processes>

                            <!-- Define how the jvms should be created -->
        <processDefinition id="jvmProcess">  <!-- general definition of a java process -->
            <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess">

		<classpath>
		    <absolutePath value="/home/f/feudi/ProActive/ProActive.jar"/>
		    <absolutePath value="/home/f/feudi/ProActive/lib/log4j.jar"/>
                    <absolutePath value="/home/f/feudi/ProActive/lib/xercesImpl.jar"/>
                    <absolutePath value="/home/f/feudi/ProActive/lib/bouncycastle.jar"/> 
                    <absolutePath value="/home/f/feudi/ProActive/lib/jsch.jar"/> 
 		</classpath>
               
               
                <javaPath>
                    <absolutePath value="/usr/local/java/jdk1.5.0_04/bin/java"/>
                </javaPath>

                <policyFile>
                   <absolutePath value="/home/f/feudi/ProActive/scripts/proactive.java.policy"/>
                </policyFile>
                <log4jpropertiesFile>
                   <absolutePath value="/home/f/feudi/ProActive/scripts/proactive-log4j"/>
              </log4jpropertiesFile>
            
               <ProActiveUserPropertiesFile>
                 <absolutePath value="/home/f/feudi/config.xml"/>
              </ProActiveUserPropertiesFile> 

                <jvmParameters>
                    <parameter value="-Dproactive.communication.protocol=rmissh"/>
                </jvmParameters>
            
             

             </jvmProcess>
         </processDefinition>

         
        <processDefinition id="sshProcess">    
            <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHProcess" hostname="fujih1.cli.di.unipi.it">
               <processReference refid="jvmProcess"/>
            </sshProcess>
       </processDefinition>

       

         
      </processes>
   </infrastructure>
</ProActiveDescriptor>

import java.net.UnknownHostException;

import org.apache.log4j.Logger;
import org.objectweb.proactive.ProActive;
import org.objectweb.proactive.core.descriptor.data.ProActiveDescriptor;
import org.objectweb.proactive.core.descriptor.data.VirtualNode;
import org.objectweb.proactive.core.node.Node;
import org.objectweb.proactive.core.util.log.Loggers;
import org.objectweb.proactive.core.util.log.ProActiveLogger;
import org.objectweb.proactive.core.util.wrapper.StringMutableWrapper;

import org.objectweb.proactive.core.node.NodeInformation; 


public class OggettoRmi implements java.io.Serializable {
    
  public static void main(String[] args) {
       
	// ProActiveDescriptor descriptorPad = ProActive.getProactiveDescriptor(args[0]);
	ProActiveDescriptor descriptorPad=null;
	try{
	    descriptorPad = ProActive.getProactiveDescriptor("file:helloRmi.xml");
	    
	     System.out.println("eseguito getProDescriptor:  ");
	     if(descriptorPad==null)
		 System.out.println("non creato");
	}catch(Exception e){
	    System.out.println("creando ProActiveDescriptor:  "+e);
	}


	try{
	    descriptorPad.activateMapping("Hello");
	    System.out.println("attivato vn");
	}catch(Exception e){
	    System.out.println("activeMappings:  "+e);
	}
	
	VirtualNode vnode=null;
	try{
	    vnode = descriptorPad.getVirtualNode("Hello");
	    if (!(vnode.isActivated())) { vnode.activate(); }

	}catch(Exception e ){
	     System.out.println("getVirtualnode:  "+e);
	}

	Node nodes=null;
	try{
	    nodes = vnode.getNode();
	}catch(Exception e){
	 System.out.println("getNodes:  "+e);
	}

       
	HelloRmi hello =null;
	try{
	    hello = (HelloRmi) ProActive.newActive(HelloRmi.class.getName(),null,nodes);
	}catch(Exception e){
	     System.out.println("newActive:  "+e);
	}
	/*	Hello[] nn+null;
	try{
	    nn[0]=nodes.getActiveObjects();
	    System.out.println
	}catch(Exception e){
	  System.out.println("getActive:  "+e);
	}
	*/
	NodeInformation nod=nodes.getNodeInformation();
	System.out.println("Creato il nodo:  "+nod.getName()+"  sull' host  "+nod.getHostName());
	String stringaRic=hello.compute(args[0]);
	System.out.println("la stringa ricevuta e':  "+stringaRic);
       
    }
}


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.