Henrik Bengtsson
2009-Oct-17 04:08 UTC
[Rd] Specifying (set of random) port numbers for the help HTML server (Was: Re: Fixing html help port in 2.10)
On Fri, Oct 16, 2009 at 7:54 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:> On 10/16/2009 10:39 AM, Dieter Menne wrote: >> >> I noted that the new html-help in 2.10 under Windows uses a random port on >> my >> computer. >> This cause a problem, because when I create a link such as: >> >> http://127.0.0.1:28027/library/stats/html/addmargins.html >> >> this is for one-time use only. Is it possible to fix the port? > > Not currently. ?If you look in tools:::startDynamicHelp you can see how it > is set up; you could duplicate that setup as a temporary workaround. ?You > might be better off to build R with static help instead. ?What is the > application where you want to be able to give out links? ?Perhaps we could > consult an environment variable or option() to choose the port instead of > leaving it completely random. > > The reason it is random is the worry that multiple R instances on the same > machine might collide. ?All processes on the machine see the same ports.Related: I'd like to suggest an option/environment variable that specifies the set of port numbers sampled from, e.g. 6800:6850 or similar. The reason is that in some places, the user don't have admin privileges on the computer and most/all ports are blocked from running servers, and there is a sysadm that needs to approve each port to be unblocked. With such a security polices it is possible to have the smaller set of port number unblocked (but not the full 0-65535 range). This applies at least to "regular users" on Windows. My $.02 /Henrik> > Duncan Murdoch > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Duncan Murdoch
2009-Oct-18 14:57 UTC
[Rd] Specifying (set of random) port numbers for the help HTML server (Was: Re: Fixing html help port in 2.10)
On 17/10/2009 12:08 AM, Henrik Bengtsson wrote:> On Fri, Oct 16, 2009 at 7:54 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote: >> On 10/16/2009 10:39 AM, Dieter Menne wrote: >>> I noted that the new html-help in 2.10 under Windows uses a random port on >>> my >>> computer. >>> This cause a problem, because when I create a link such as: >>> >>> http://127.0.0.1:28027/library/stats/html/addmargins.html >>> >>> this is for one-time use only. Is it possible to fix the port? >> Not currently. If you look in tools:::startDynamicHelp you can see how it >> is set up; you could duplicate that setup as a temporary workaround. You >> might be better off to build R with static help instead. What is the >> application where you want to be able to give out links? Perhaps we could >> consult an environment variable or option() to choose the port instead of >> leaving it completely random. >> >> The reason it is random is the worry that multiple R instances on the same >> machine might collide. All processes on the machine see the same ports. > > Related: > I'd like to suggest an option/environment variable that specifies the > set of port numbers sampled from, e.g. 6800:6850 or similar.I've added an option "help.ports" to set this. It will try your specified ports in order; if you want a random selection, permute them yourself, e.g. options(help.ports = sample(6800:6850)) This will make it into 2.10.0. Duncan Murdoch> > The reason is that in some places, the user don't have admin > privileges on the computer and most/all ports are blocked from running > servers, and there is a sysadm that needs to approve each port to be > unblocked. With such a security polices it is possible to have the > smaller set of port number unblocked (but not the full 0-65535 range). > This applies at least to "regular users" on Windows. > > My $.02 > > /Henrik > >> Duncan Murdoch >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Dieter Menne
2009-Oct-18 15:14 UTC
[Rd] Specifying (set of random) port numbers for the help HTML server (Was: Re: Fixing html help port in 2.10)
Duncan Murdoch-2 wrote:> > > options(help.ports = sample(6800:6850)) >Nice. So just in case I want options(help.ports = sample(6800:6800)) What would be the adverse effects (besides me having to check that that port is reasonable)? Dieter -- View this message in context: http://www.nabble.com/Re%3A-Specifying-%28set-of-random%29-port-numbers-for-the-help-HTML-server-%28Was%3A-Re%3A-Fixing-html-help-port-in-2.10%29-tp25935271p25947460.html Sent from the R devel mailing list archive at Nabble.com.