Child pages
  • HowTOs
Skip to end of metadata
Go to start of metadata

This page is outdated, use FAQ instead.

DistributeMe HOWTOs

This document stands for resolving difficult problems or answers questions that you might have regarding DistributeMe product.
The structure of the document is pretty simple. Each section of this document describes a problem or a question and then the ways the problem can be solved.



Got stack trace when executing RemoteTest


When executing it I got the following exception stack trace:

CLIENT: Call to add method
Exception in thread "main" java.lang.RuntimeException: Couldn't lookup delegate because: Can't lookup service in the target rmi registry for an instance of org_distributeme_demo_GettingStartedService at
at org.distributeme.demo.generated.RemoteGettingStartedServiceStub.getDelegate(Unknown Source)
at org.distributeme.demo.generated.RemoteGettingStartedServiceStub.add(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at $Proxy5.add(Unknown Source)
at org.distributeme.demo.test.DimeTester.test(Unknown Source)
at org.distributeme.demo.test.RemoteTest.main(Unknown Source)
Caused by: java.lang.RuntimeException: Can't lookup service in the target rmi registry for an instance of org_distributeme_demo_GettingStartedService
at org.distributeme.demo.generated.RemoteGettingStartedServiceStub.lookup(Unknown Source)
... 11 more
Caused by: java.rmi.ConnectException: Connection refused to host:; nested exception is: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
... 12 more
Caused by: Connection refused: connect
at Method)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 17 more

How can I make the interraction work?


  • No rmiregistry started locally
  • Wrong IP address is registered in the DistributeMe registry



Still having the same issue? Check the following ...

Open your web browser and visit the web page
The response of the web page might look like.

<?xml version="1.0"?><services><service id="org_distributeme_demo_GettingStartedService" host=""/></services>

The cause of the problem is that the IP address cannot be used for remote interraction.
To resolve just this problem do the following:

Now test the web page again
You shoud see the following XML in response:

<?xml version="1.0"?><services><service id="org_distributeme_demo_GettingStartedService" host=""/></services>

Then restart your RemoteTest client.

If you still having problems check your /etc/hosts file on Ubuntu machine and replace the line igorlap

with the line igorlap

The hosts file maps IP addresses to host names so in my case that was just a wrong mapping

Good luck!


How to install and use DistributeMe registry locally


My client does not want to use the standard DistributeMe registry which is located at



Build distributeme.war and install it on your local tomcat.
Just use the following steps:

  • get distributeme project from our SVN repository as ~/projects/dime/distributeme folder
  • perform commands

    igor@igorlap:~/projects/dime$ cd ~/projects/dime/distributeme
    igor@igorlap:~/projects/dime/distributeme$ ant -f build-registry.xml war
    Buildfile: build-registry.xml
    [war] Building war: /home/igor/projects/dime/distributeme/dist/distributeme.war

    Total time: 4 seconds

Then deploy the just built distributeme.war file to webapps directory of your tomcat instance.

Start tomcat if it is not started already. Check the port number used for HTTP in the conf/server.xml file that comes with your tomcat instance. That port number and the host name or IP address where tomcat is started should be specified in the distributeme.json configuration file.

This is just an example:

	registryContainerPort: 8080,
	registryContainerHost: "",
} - is the machine where tomcat server is started and distributeme.war is deployed to it. 8080 is the port number used for HTTP protocol by that tomcat instance.

Good luck!


  • No labels