"Error using connector.​ensureServ​iceOn" when clicking "Get Add-Ons"

Asking this question in case anyone else has faced the same problem / has found a solution.
Release: R2015b 64 bit, Windows.
When clicking on "Get Add-Ons", this error message pops up on the command window:
Error using connector.ensureServiceOn
Error starting MATLAB Connector. Please check that port 31515 is available.
com.mathworks.jmi.MatlabException: Error starting MATLAB Connector. Please check that port 31515 is available.
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1778)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:195)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:172)
at com.mathworks.addons.ConnectorFactory$1.runOnMatlabThread(ConnectorFactory.java:37)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:475)
What I've tried:
  • Allowed R2015b.exe in the Firewall for inbound and outbound connections.
  • Allowed TCP port 31515 in the Firewall for inbound and outbound connections.
Still no luck.

 채택된 답변

Dave Behera
Dave Behera 2015년 12월 4일

2 개 추천

Hi,
The issue is related to the network configuration. One possible workaround is forcing JVM to use IPv4 over IPv6 by setting the java.net.preferIPv4Stack config. The following discussion page provides some relevant discussion:
To work around this issue create a new System Variable named JAVA_TOOL_OPTION, with the value -Djava.net.preferIPv4Stack=true

댓글 수: 3

This didn't work for me :( Any other solution?
I solved the problem by deleting the MATLAB_JAVA path in my system variables.
I deleted the MATLAB_JAVA variable.Yet no luck.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

AFTAB ALAM  ANSARI
AFTAB ALAM ANSARI 2017년 11월 22일

1 개 추천

Don't go for rubbish like "it's because of JAVA". This happens when MATLAB is blocked by some firewall that is blocking MATLAB from connecting to Internet. MATLAB uses Internet during Stimulation. Just exclude it from firewall and there you go. There will be no error.

댓글 수: 2

This answer really helps me. After I exclude MATLAB from the firewall in the computer, the error never come up.
Hi, how you do this

댓글을 달려면 로그인하십시오.

Hicham Belh
Hicham Belh 2018년 12월 16일

0 개 추천

i got this error by click on getaddon:
Version: Matlab 2018a
error:
Error using connector.internal.doEnsureServiceOn
Error in Connector: Did not start the server. Desired port was: 31515. Last error
was: Server did not respond to initial request: 127.0.0.1:31714
Error in connector.ensureServiceOn
Warning: Issue starting Connector. Please check that port 31415 is available. Did not
start the server. Desired port was: 31515. Last error was: Server did not respond to
initial request: 127.0.0.1:31714
thx for any help
Lega

댓글 수: 1

I too get the same error when opening model configuration parameters

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2015년 11월 30일

댓글:

2020년 12월 31일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by