MODCLUSTER-798 Fix handling of offseted ports #735
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://issues.redhat.com/browse/MODCLUSTER-798
This PR makes it work when portOffset for tomcats 8.5 and 9.0. No fix is required for tomcat-10.1 which seems strange, however, I was not able to determine why tomcat-10.1 behaves differently. Because of this I believe the fix can be made better by someone who understand the codebase better.
This is the
server.xml
I usedwith
tomcat1
running on127.0.0.1:8080
(offset0
) andtomcat2
on127.0.0.1:8081
(offset1
). Without these changes, proxy getsCONFIG
message fortomcat2
with port8080
. Alternatively, I could changeconnectorPort
fortomcat2
to8081
, but that would cause some issues increateProxyConnector
function (e.g.,connectorPort.equals(connector.getPort())
).Edit: Fix formatting.