You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I recently tried to use Massif to reach a CE Server instance on a different machine in the same network.
We invoke the Massif code directly from our project. When I tried to specify ip address, port and service name of the remote host when creating a MatlabClient instance I got the following exception:
3: Error on connecting RMI server with client
Additional information:
{Service name=null, Host port=1098}
---------------------
Original exception:
java.rmi.ConnectException: Connection refused to host: [ip address of the local client]; nested exception is:
java.net.ConnectException: Connection refused: connect
at br.com.embraer.massif.commandevaluation.client.MatlabClient.connectRMI(MatlabClient.java:157)
at br.com.embraer.massif.commandevaluation.client.MatlabClient.<init>(MatlabClient.java:134)
So despite invoking MatlabClient with the correct remote host address, it tries to connect to the local client.
The problem lies in the connectRMI() method. Here the host address isn't even used in line 146: Registry registry = LocateRegistry.getRegistry(hostPort);
So this just tries to connect to localhost every time. To connect to a remote host we should use: Registry registry = LocateRegistry.getRegistry(hostAddress, hostPort);
I was able to get the remote connection running with this fix. However you need to know the exact file path to the simulink model on the remote host.
Thanks for this information, since this looks like a trivial fix, we will probably apply this change and maybe document it on the wiki.
As for the exact path, yes, this is a limitation, but one that should be acceptable for most cases.
Can you elaborate on your usage of Massif? We would be very interested to know who uses Massif and what are their feedback. If you prefer, you could send me this info privately.
Test Massif when Command Evaluator Server and Client are running on different machines.
The text was updated successfully, but these errors were encountered: