You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Holger Hoffstätte (JIRA)" <ji...@apache.org> on 2011/01/18 18:19:43 UTC
[jira] Created: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Allow HTTPService to pick a random free port in a given range
-------------------------------------------------------------
Key: FELIX-2786
URL: https://issues.apache.org/jira/browse/FELIX-2786
Project: Felix
Issue Type: Improvement
Components: HTTP Service
Affects Versions: http-2.0.4
Reporter: Holger Hoffstätte
Priority: Minor
Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Commented] (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Rob Walker (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13415937#comment-13415937 ]
Rob Walker commented on FELIX-2786:
-----------------------------------
Sounds like a useful addition to me - I'd be happy to see this patch committed into the trunk if others agree with it's usefulness.
We added a feature to the old HTTP service to publish the randomly chosen port via a service property. I forget whether the new Http Jetty service has this feature, but if not then it'd also be needed to take advantage of this feature so that detailed the selected port can be determined by other bundles.
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
> Attachments: felix-2786.diff
>
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Carl Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985918#action_12985918 ]
Carl Hall commented on FELIX-2786:
----------------------------------
I commented on users@felix but to leave a note here as well. I'd like to work on this and hope to have a patch in soon (~1 week). If this should be assigned to me, I'd be fine with that.
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985916#action_12985916 ]
Marcel Offermans commented on FELIX-2786:
-----------------------------------------
Sounds like a good idea, but formally, with OSGi version ranges, 8000 means from 8000 to infinity, so I don't think we want those semantics. :)
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Carl Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985917#action_12985917 ]
Carl Hall commented on FELIX-2786:
----------------------------------
I like the idea of following the OSGi version pattern.
What about using "*" as the random port notation? e.g. port=*
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Carl Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carl Hall updated FELIX-2786:
-----------------------------
Attachment: felix-2786.diff
Attached patch for proposed solution and unit tests.
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
> Attachments: felix-2786.diff
>
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Holger Hoffstätte (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987457#action_12987457 ]
Holger Hoffstätte commented on FELIX-2786:
------------------------------------------
Very nice! Great work Carl!
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
> Attachments: felix-2786.diff
>
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2786) Allow HTTPService to pick a random
free port in a given range
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985908#action_12985908 ]
Felix Meschberger commented on FELIX-2786:
------------------------------------------
why not use OSGi Version-style ranges ? Something like
port=8000 -- fixed port 8000
port=[8000,9000) -- test ports 8000...8999
> Allow HTTPService to pick a random free port in a given range
> -------------------------------------------------------------
>
> Key: FELIX-2786
> URL: https://issues.apache.org/jira/browse/FELIX-2786
> Project: Felix
> Issue Type: Improvement
> Components: HTTP Service
> Affects Versions: http-2.0.4
> Reporter: Holger Hoffstätte
> Priority: Minor
>
> Sometimes we cannot configure the used port for a HTTPService up front, so it would be nice to have the service select one itself; the chosen port would then have to be communicated to the outside world. Since it should not just select any random port e.g. for security reasons, it should be possible to specify a range as property.
> Marcel suggested a port config value along the lines of port="random" or port="pick-from-range(8000,9000)".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.