Running Remote Data Server in Background

Hi,

I'm experimenting with running a remote data server, and using a client
display program to connect to the remote data. IE I'm only interesting
in sharing data, not the displays across multiple clients.

So I've got some server code like this:
      RemoteServerImpl server = new RemoteServerImpl(rem_data_refs);
      Naming.rebind("///" + serviceName, server);

And some client code like this:
      RemoteServer server = (RemoteServer) Naming.lookup(domain);
      rmt_refs = (RemoteDataReference[]) server.getDataReferences();
// set up local display
// ... some code here
// now link local display to remote data via "remote_display":
    RemoteDisplayImpl remote_display1 = new
RemoteDisplayImpl((DisplayImpl)local);
    remote_display1.addReferences(new DefaultRendererJ2D() , new
DataReference[] {rmt_ref0});

The code works fine, as long as I run the server in the foreground.

If I start up the server in the background eg:
java TimeseriesServer &

and then try to start the client, I get the error message below.

Any ideas why? [cuz I'd like to run the servers as background processes]

Thanks,

James

Here's the error I get:

collaboration server exception: Connection refused to host:
xxx.xxx.xxx.xxx; nested exception is:
        java.net.ConnectException: Connection refused: connect
java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.xxx;
nested exception is:
        java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown
Source)
        at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown
Source)
        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.invoke(Unknown Source)
        at visad.RemoteServerImpl_Stub.getDataReferences(Unknown Source)

        at TimeseriesClient.setupClient(TimeseriesClient.java:40)
        at TimeseriesClient.main(TimeseriesClient.java:202)


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: