-
Notifications
You must be signed in to change notification settings - Fork 15
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
Differentiating license issues with connection issues #22
Comments
It is probably possible to accomplish this, but it may be difficult. Happy to accept a PR for this, but we have no plans to implement. The only advice I have is to follow the stacktraces. |
My guess (haven't figured out how to test this yet...) is that it is this code in RemoteMatlabProxy that loses the information:
Where _isConnected is also the return value from the method. Without changing the method signature, I guess one could store the "RemoteException e" in a field and have RemoteMatlabProxy add something to this code:
So that it will access the stored exception (e.g. from the "callback") thing and appends it to the new exception message. Does the above seem reasonable way to try to address this? |
That seems very reasonable! If it works for you, I'd be happy to merge a PR for it. |
After playing around a bit with the code, I realize that I'm badly out of my depth here and being unable to find a reasonable way to test this, I'm not sure I'd recommend merging my patch. I'll see if I can roll it out on our jenkins and see if it over time manages to catch the license situation or if this is just a null patch. If I manage that, I'll check back here, but it could take weeks or months until it triggers the problem I'm trying to get at. Anyway, attaching it in case anyone can already see that this is completely wrong and wants to have a stab at improving it. |
We're running matconsolectl in a server job and using a corporate license pool.
Sporadically, we're getting this exception:
Exception in thread "main" matlabcontrol.MatlabConnectionException: MATLAB proxy could not be created in 180000 milliseconds
at matlabcontrol.RemoteMatlabProxyFactory.getProxy(RemoteMatlabProxyFactory.java:176)
I suspect that this is caused by being out of matlab licenses, but as far as I can tell from the matconsolectl source code, it does not have any special handling of license issues compared to e.g. network issues. Or am I misdiagnosing this and license errors will not get MatlabConnectionException timeouts?
It would be really nice if one could get the error message we get when running matlab directly, i.e.
"License checkout failed.
License Manager Error -4
Maximum number of users for MATLAB reached.
Try again later."
I'm not sure where to start looking for the above output though, so not sure how to fix it (if this really is the issue that I think it is)
The text was updated successfully, but these errors were encountered: