OpenLiberty / open-liberty-tools

Open Liberty Tools are lightweight tools for developing, assembling, and deploying apps to Open Liberty.
http://openliberty.io
Eclipse Public License 1.0
51 stars 41 forks source link

Cannot start servers due to port conflict, even though ports are unique #481

Closed l3ender closed 7 months ago

l3ender commented 1 year ago

We are unable to use the Servers view in Eclipse to start servers which have different ports, specified by overriding the desired ports in an individual server's environment file.

An example of the Liberty server.xml config is:

<server description="test1">
    <featureManager>
        <feature>servlet-3.1</feature>
        <feature>localConnector-1.0</feature>
    </featureManager>

    <variable defaultValue="9080" name="HTTP_PORT"/>
    <variable defaultValue="9443" name="HTTPS_PORT"/>
    <httpEndpoint host="*" httpPort="${HTTP_PORT}" httpsPort="${HTTPS_PORT}" id="defaultHttpEndpoint"/>
</server>

We then override the ports for a particular instance of a server using its server.env file:

HTTP_PORT=9081
HTTPS_PORT=9444

However, if a server is started with the default config (no environment override), subsequent servers cannot start even when the ports use unique values. Eclipse appears to only be aware of the ports in server.xml and not in server.env:

Several ports (9080, 9443) required by test-server-2 are already in use. The server might be running in another process, or a system process might be using the port. To start this server you will need to stop the other process or change the port numbers.

image

I confirmed the above is possible when starting servers with the liberty command line, so it appears to be a bug in the IDE plugin.

Please let me know if I can provide any other info--thanks!

(Issue originally opened in https://github.com/OpenLiberty/liberty-tools-eclipse/issues/413; as advised to open here instead.)

dbarfield commented 7 months ago

Fix for this is tested and merged and will go live in the next release of open liberty tools (24.1 release)

dbarfield commented 7 months ago

Closing issue ... please reopen if any issues on upcoming release.