Does anyone know how to solve this question about R.matlab?
I am in windowsXP, my matlab is matlab 7.0.0 19920(R14)
thanks,
Aimin
> matlab <- Matlab(host="localhost", port=9998)
> if (!open(matlab)) throw("Matlab server is not running: waited 30 seconds.")
Error in list("throw("Matlab server is not running: waited 30 seconds.")" =
<environment>, :
[2006-12-17 22:26:03] Exception: Matlab server is not running: waited 30
seconds.
at throw(Exception(...))
at throw.default("Matlab server is not running: waited 30 seconds.")
at throw("Matlab server is not running: waited 30 seconds.")
In addition: There were 30 warnings (use warnings() to see them)
> warnings
function (...)
UseMethod("warnings")
> warnings()
Warning messages:
1: localhost:9998 cannot be opened
2: localhost:9998 cannot be opened
3: localhost:9998 cannot be opened
4: localhost:9998 cannot be opened
5: localhost:9998 cannot be opened
6: localhost:9998 cannot be opened
7: localhost:9998 cannot be opened
8: localhost:9998 cannot be opened
9: localhost:9998 cannot be opened
10: localhost:9998 cannot be opened
11: localhost:9998 cannot be opened
12: localhost:9998 cannot be opened
13: localhost:9998 cannot be opened
14: localhost:9998 cannot be opened
15: localhost:9998 cannot be opened
16: localhost:9998 cannot be opened
17: localhost:9998 cannot be opened
18: localhost:9998 cannot be opened
19: localhost:9998 cannot be opened
20: localhost:9998 cannot be opened
21: localhost:9998 cannot be opened
22: localhost:9998 cannot be opened
23: localhost:9998 cannot be opened
24: localhost:9998 cannot be opened
25: localhost:9998 cannot be opened
26: localhost:9998 cannot be opened
27: localhost:9998 cannot be opened
28: localhost:9998 cannot be opened
29: localhost:9998 cannot be opened
30: localhost:9998 cannot be opened
>
R.matlab question
4 messages · Aimin Yan, Henrik Bengtsson
Hi.
On 12/20/06, Aimin Yan <aiminy at iastate.edu> wrote:
Does anyone know how to solve this question about R.matlab? I am in windowsXP, my matlab is matlab 7.0.0 19920(R14) thanks, Aimin
> matlab <- Matlab(host="localhost", port=9998)
> if (!open(matlab)) throw("Matlab server is not running: waited 30 seconds.")
Error in list("throw("Matlab server is not running: waited 30 seconds.")" =
<environment>, :
[2006-12-17 22:26:03] Exception: Matlab server is not running: waited 30
seconds.
at throw(Exception(...))
at throw.default("Matlab server is not running: waited 30 seconds.")
at throw("Matlab server is not running: waited 30 seconds.")
In addition: There were 30 warnings (use warnings() to see them)
> warnings
function (...)
UseMethod("warnings")
> warnings()
Warning messages: 1: localhost:9998 cannot be opened 2: localhost:9998 cannot be opened
[snip]
30: localhost:9998 cannot be opened
This could be because your firewall is blocking R from connecting to Matlab. Try a few different port numbers. I recently learned that the current default port in R.matlab might not be the best one; different port intervals are reserved for different purposes, cf. http://www.iana.org/assignments/port-numbers. That document indicates that a port number in [49152, 65535] might be better. See if this helps. Does someone else knowof a port interval that is more likely to work in general? You can also tell the Matlab object to report more details what it is trying to do by setting the verbosity threshold, i.e. setVerbose(matlab, threshold=-1); the lower the threshold the more details you'll see. Cheers Henrik
>
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
7 days later
Hi,
a follow up after realizing that you might not have started the Matlab
application to listen on port 9998. Try:
Matlab$startServer(port=9998)
and then
matlab <- Matlab(host="localhost", port=9998)
if (!open(matlab)) throw("Matlab server is not running: waited 30 seconds.")
Does this help?
Henrik
On 12/20/06, Henrik Bengtsson <hb at stat.berkeley.edu> wrote:
Hi. On 12/20/06, Aimin Yan <aiminy at iastate.edu> wrote:
Does anyone know how to solve this question about R.matlab? I am in windowsXP, my matlab is matlab 7.0.0 19920(R14) thanks, Aimin
> matlab <- Matlab(host="localhost", port=9998)
> if (!open(matlab)) throw("Matlab server is not running: waited 30 seconds.")
Error in list("throw("Matlab server is not running: waited 30 seconds.")" =
<environment>, :
[2006-12-17 22:26:03] Exception: Matlab server is not running: waited 30
seconds.
at throw(Exception(...))
at throw.default("Matlab server is not running: waited 30 seconds.")
at throw("Matlab server is not running: waited 30 seconds.")
In addition: There were 30 warnings (use warnings() to see them)
> warnings
function (...)
UseMethod("warnings")
> warnings()
Warning messages: 1: localhost:9998 cannot be opened 2: localhost:9998 cannot be opened
[snip]
30: localhost:9998 cannot be opened
This could be because your firewall is blocking R from connecting to Matlab. Try a few different port numbers. I recently learned that the current default port in R.matlab might not be the best one; different port intervals are reserved for different purposes, cf. http://www.iana.org/assignments/port-numbers. That document indicates that a port number in [49152, 65535] might be better. See if this helps. Does someone else knowof a port interval that is more likely to work in general? You can also tell the Matlab object to report more details what it is trying to do by setting the verbosity threshold, i.e. setVerbose(matlab, threshold=-1); the lower the threshold the more details you'll see. Cheers Henrik
>
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
I am appreciated that you still remember my question. I try this one, it works now. thank you very, very much. Aimin
At 08:19 PM 12/27/2006, Henrik Bengtsson wrote:
Hi,
a follow up after realizing that you might not have started the Matlab
application to listen on port 9998. Try:
Matlab$startServer(port=9998)
and then
matlab <- Matlab(host="localhost", port=9998)
if (!open(matlab)) throw("Matlab server is not running: waited 30 seconds.")
Does this help?
Henrik
On 12/20/06, Henrik Bengtsson <hb at stat.berkeley.edu> wrote:
Hi. On 12/20/06, Aimin Yan <aiminy at iastate.edu> wrote:
Does anyone know how to solve this question about R.matlab? I am in windowsXP, my matlab is matlab 7.0.0 19920(R14) thanks, Aimin
> matlab <- Matlab(host="localhost", port=9998)
> if (!open(matlab)) throw("Matlab server is not running:
waited 30 seconds.")
Error in list("throw("Matlab server is not running: waited 30
seconds.")" =
<environment>, :
[2006-12-17 22:26:03] Exception: Matlab server is not running: waited 30
seconds.
at throw(Exception(...))
at throw.default("Matlab server is not running: waited 30 seconds.")
at throw("Matlab server is not running: waited 30 seconds.")
In addition: There were 30 warnings (use warnings() to see them)
> warnings
function (...)
UseMethod("warnings")
> warnings()
Warning messages: 1: localhost:9998 cannot be opened 2: localhost:9998 cannot be opened
[snip]
30: localhost:9998 cannot be opened
This could be because your firewall is blocking R from connecting to Matlab. Try a few different port numbers. I recently learned that the current default port in R.matlab might not be the best one; different port intervals are reserved for different purposes, cf. http://www.iana.org/assignments/port-numbers. That document indicates that a port number in [49152, 65535] might be better. See if this helps. Does someone else knowof a port interval that is more likely to work in general? You can also tell the Matlab object to report more details what it is trying to do by setting the verbosity threshold, i.e. setVerbose(matlab, threshold=-1); the lower the threshold the more details you'll see. Cheers Henrik
>
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.