You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Coty Sutherland <cs...@apache.org> on 2017/06/09 15:31:28 UTC

RFE idea: Add port offset system property to Tomcat

Hi all,

I was just doing some testing and got had an idea for spinning up new
instances of tomcat. JBoss has this system property
"-Djboss.socket.binding.port-offset" that I think would be useful for
tomcat. As en example, setting the property to 100 on startup would
add "100" to all port bindings on the server (e.g. with a vanilla
install it would cause tomcat to run on 8105, 8180, and 8109). This
prevents uses from having to use a fancy sed (or whatever Windows has)
to update the port bindings for every new install. Does anyone else
see any value to adding this feature?



Thanks,
Coty

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: RFE idea: Add port offset system property to Tomcat

Posted by Coty Sutherland <cs...@redhat.com>.
On Fri, Jun 9, 2017 at 12:53 PM, Igal @ Lucee.org <ig...@lucee.org> wrote:
> Hi,
>
> On 6/9/2017 9:47 AM, Mark Thomas wrote:
>>
>> On 09/06/2017 17:34, Romain Manni-Bucau wrote:
>>>
>>> @Mark: guess you are thinking to server.xml?
>>
>> Yes.
>>
>>> then it would have placeholder
>>> support so still a system property somehow no?
>>
>> It would have placeholder support (as do all attributes in server.xml)
>> so yes, system properties could be used - with a small edit to
>> server.xml. It would have to be on Server.
>
>
> If you open a ticket and think that it's appropriate, please tag it as
> "Beginner".

I created https://bz.apache.org/bugzilla/show_bug.cgi?id=61171. I'm
not sure what degree of difficulty this is, so I'll let mark or
someone else tag it if appropriate.

> Thanks,
>
>
> Igal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: RFE idea: Add port offset system property to Tomcat

Posted by "Igal @ Lucee.org" <ig...@lucee.org>.
Hi,

On 6/9/2017 9:47 AM, Mark Thomas wrote:
> On 09/06/2017 17:34, Romain Manni-Bucau wrote:
>> @Mark: guess you are thinking to server.xml?
> Yes.
>
>> then it would have placeholder
>> support so still a system property somehow no?
> It would have placeholder support (as do all attributes in server.xml)
> so yes, system properties could be used - with a small edit to
> server.xml. It would have to be on Server.

If you open a ticket and think that it's appropriate, please tag it as 
"Beginner".

Thanks,


Igal

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: RFE idea: Add port offset system property to Tomcat

Posted by Mark Thomas <ma...@apache.org>.
On 09/06/2017 17:34, Romain Manni-Bucau wrote:
> @Mark: guess you are thinking to server.xml?

Yes.

> then it would have placeholder
> support so still a system property somehow no?

It would have placeholder support (as do all attributes in server.xml)
so yes, system properties could be used - with a small edit to
server.xml. It would have to be on Server.

Mark

> 
> +1 anyway, sounds very useful!
> 
> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
> 
> 2017-06-09 18:32 GMT+02:00 Mark Thomas <ma...@apache.org>:
> 
>> On 09/06/2017 16:31, Coty Sutherland wrote:
>>> Hi all,
>>>
>>> I was just doing some testing and got had an idea for spinning up new
>>> instances of tomcat. JBoss has this system property
>>> "-Djboss.socket.binding.port-offset" that I think would be useful for
>>> tomcat. As en example, setting the property to 100 on startup would
>>> add "100" to all port bindings on the server (e.g. with a vanilla
>>> install it would cause tomcat to run on 8105, 8180, and 8109). This
>>> prevents uses from having to use a fancy sed (or whatever Windows has)
>>> to update the port bindings for every new install. Does anyone else
>>> see any value to adding this feature?
>>
>> I like the idea a lot - apart from the system property part. Would this
>> still be as useful if it wasn't a system property?
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: RFE idea: Add port offset system property to Tomcat

Posted by Romain Manni-Bucau <rm...@gmail.com>.
@Mark: guess you are thinking to server.xml? then it would have placeholder
support so still a system property somehow no?

+1 anyway, sounds very useful!


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-09 18:32 GMT+02:00 Mark Thomas <ma...@apache.org>:

> On 09/06/2017 16:31, Coty Sutherland wrote:
> > Hi all,
> >
> > I was just doing some testing and got had an idea for spinning up new
> > instances of tomcat. JBoss has this system property
> > "-Djboss.socket.binding.port-offset" that I think would be useful for
> > tomcat. As en example, setting the property to 100 on startup would
> > add "100" to all port bindings on the server (e.g. with a vanilla
> > install it would cause tomcat to run on 8105, 8180, and 8109). This
> > prevents uses from having to use a fancy sed (or whatever Windows has)
> > to update the port bindings for every new install. Does anyone else
> > see any value to adding this feature?
>
> I like the idea a lot - apart from the system property part. Would this
> still be as useful if it wasn't a system property?
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: RFE idea: Add port offset system property to Tomcat

Posted by Coty Sutherland <cs...@redhat.com>.
On Fri, Jun 9, 2017 at 12:32 PM, Mark Thomas <ma...@apache.org> wrote:
> On 09/06/2017 16:31, Coty Sutherland wrote:
>> Hi all,
>>
>> I was just doing some testing and got had an idea for spinning up new
>> instances of tomcat. JBoss has this system property
>> "-Djboss.socket.binding.port-offset" that I think would be useful for
>> tomcat. As en example, setting the property to 100 on startup would
>> add "100" to all port bindings on the server (e.g. with a vanilla
>> install it would cause tomcat to run on 8105, 8180, and 8109). This
>> prevents uses from having to use a fancy sed (or whatever Windows has)
>> to update the port bindings for every new install. Does anyone else
>> see any value to adding this feature?
>
> I like the idea a lot - apart from the system property part. Would this
> still be as useful if it wasn't a system property?

Yeah, sure. I think the biggest benefit is not having to manually
configure all the ports, so it could be an env var in the startup
script or some other setting somewhere. JBoss has a sysprop, so I'm
used to starting it that way, but if you like another method let me
know, I'll open an enhancement request and give it a shot.

> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: RFE idea: Add port offset system property to Tomcat

Posted by Mark Thomas <ma...@apache.org>.
On 09/06/2017 16:31, Coty Sutherland wrote:
> Hi all,
> 
> I was just doing some testing and got had an idea for spinning up new
> instances of tomcat. JBoss has this system property
> "-Djboss.socket.binding.port-offset" that I think would be useful for
> tomcat. As en example, setting the property to 100 on startup would
> add "100" to all port bindings on the server (e.g. with a vanilla
> install it would cause tomcat to run on 8105, 8180, and 8109). This
> prevents uses from having to use a fancy sed (or whatever Windows has)
> to update the port bindings for every new install. Does anyone else
> see any value to adding this feature?

I like the idea a lot - apart from the system property part. Would this
still be as useful if it wasn't a system property?

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org