Unexpected behaviour starting a domain twice

Hi,

We believe we’ve experienced unexpected behaviour, ‘out of the box’ on the commands executed - we start domain1 (normal), then we start domain1 again. On full server releases prior to 6.2024.1, the 2nd start domain command immediately recognises a port is in use and will not attempt to start the domain. From 6.2024.1, the 2nd start domain will wait until 600 seconds have passed. Unfortunately it is no longer possible to stop the domain (either singular or all domains) on the command line.

If someone could verify our findings to clarify whether this is now expected behaviour for >= 6.2024.1.

Background: We’ve been using community 6.2023.2 for a while, and we’ve begun thinking about the steps to migrate toward Jakarta EE 11 from version 10. First step, upgrade to 6.2024.1.

During our testing we’ve had some experiences that if someone could verify their experiences for me. All tests are command line.

Typically in our dev environment we configure various ports to enable consistency between Payara 5 and 6. In production environment, the application runs out of the box on windows server.

Emulating the production environment, and to make this reproducible.

  1. PATH points to JDK8
  2. I modify asenv.bat to point to JDK21. "set AS_JAVA= … "
  3. The server.log reports

The server.log using domain1
[2024-03-19T14:57:36.645+0000] [INFO] [NCLS-GFLAUNCHER-00005] [jakarta.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1710860256645] [levelValue: 800] [[
JVM invocation command line:
C:\Program Files\Eclipse Adoptium\jdk-21.0.1.12-hotspot\bin\java.exe

  1. asadmin start-domain domain1
    4a. Wait to start the domain
    4b. Run> netstat -ano | find “4848”. Expected output a LISTENING port.

  2. asadmin stop-domain domain1
    5a. Run> netstat -ano | find “4848”. Expected output 4848 is not found.

  3. asadmin start-domain domain1
    6a. Wait to start the domain
    6b. Run> netstat -ano | find “4848”. Expected output a LISTENING port.

  4. asadmin start-domain domain1
    7a. Anticipating port in use messages as per 2023.12.
    7b. The timeout appeared starts a ‘rogue’ java instance.

  5. I can stop the rogue instance in the browser localhost:4848.

Thank you

Hi, 6.2024.4 exhibiting similar behaviour out of the box with JDK21 (Adoptium). I’ve still yet to investigate the source code differences between the stable/working 6.2023.12 and this version.

— 1) Starts normally
C:\Users\bethm\Downloads>asadmin start-domain --timeout=20 domain1
Waiting for domain1 to start …
Successfully started the domain : domain1
domain Location: D:\apps\payara\payara-6.2024.4\glassfish\domains\domain1
Log File: D:\apps\payara\payara-6.2024.4\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

— 2) Using 20 second instead of 600. Affects the already running domain1
C:\Users\bethm\Downloads>asadmin start-domain --timeout=20 domain1
Waiting for domain1 to start …
No response from the Domain Administration Server (domain1) after 20 seconds.
The command is either taking too long to complete or the server has failed.
Please see the server log files for command status.
Please start with the --verbose option in order to see early messages.
Command start-domain failed.

— 3) Has no effect
C:\Users\bethm\Downloads>asadmin stop-domain domain1
CLI306: Warning - The server located at D:\apps\payara\payara-6.2024.4\glassfish\domains\domain1 is not running.
No domains are currently running.
Command stop-domain failed.

– 4) Forced stop has the desired effect. Attempts in 6.2024.3 to run the setup in a service context fail if I accidentally start the current service domain, the application is confused (see Step 3 above)
C:\Users\bethm\Downloads>asadmin stop-domain --kill domain1
Command stop-domain executed successfully.