Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try if SimulinkApi works with a remote Matlab server (CE) #5

Open
imbur opened this issue Oct 29, 2014 · 2 comments
Open

Try if SimulinkApi works with a remote Matlab server (CE) #5

imbur opened this issue Oct 29, 2014 · 2 comments
Labels
bug CE Server Label for issues particular to the Command Evaluation Server connector
Milestone

Comments

@imbur
Copy link
Member

imbur commented Oct 29, 2014

Test Massif when Command Evaluator Server and Client are running on different machines.

@imbur imbur added this to the 0.4.0 milestone Oct 29, 2014
@stwessels
Copy link

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.

@abelhegedus
Copy link
Member

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.

@imbur imbur added the CE Server Label for issues particular to the Command Evaluation Server connector label Jul 31, 2018
@abelhegedus abelhegedus removed this from the 0.4.0 milestone Nov 7, 2018
@abelhegedus abelhegedus added this to the 0.8.0 milestone Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CE Server Label for issues particular to the Command Evaluation Server connector
Projects
None yet
Development

No branches or pull requests

3 participants