payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
883 stars 306 forks source link

Bug Report: Port startup domain detection broken since 6.2024.1 #6783

Open BMackenzie-UKHSA opened 5 months ago

BMackenzie-UKHSA commented 5 months ago

Brief Summary

Since Payara Community 6.2024.1 on a Windows machine attempting to use stop-domain fails after start-domain has been called for the 2nd time leaving Payara in an undefined state. Payara does not shutdown cleanly using available commands and/or force options. This same scenario has been experienced running Payara as a service on a Windows 2019 Server in pre-production environment. Payara Community 6.2023.12 works normally.

Expected Outcome

This expected outcome is executed out of the box using Payara 6.2023.12 (no additional deployments)

asadmin start-domain domain1 Waiting for domain1 to start ................................ Successfully started the domain : domain1 domain Location: D:\apps\payara\payara-6.2023.12\glassfish\domains\domain1 Log File: D:\apps\payara\payara-6.2023.12\glassfish\domains\domain1\logs\server.log Admin Port: 4848 Command start-domain executed successfully.

(1 instances of java)

asadmin start-domain domain1 Port 7676 is in use Command start-domain failed.

(still 1 instances of java remain) (http://localhost:4848 is online)

asadmin stop-domain domain1 Waiting for the domain to stop . Command stop-domain executed successfully.

(0 instances of java) (http://localhost:4848 is not accessible)

Current Outcome

The current outcome is executed out of the box using Payara 6.2024.6 (no additional deployments)

asadmin start-domain domain1 Waiting for domain1 to start .................................. Successfully started the domain : domain1 domain Location: D:\apps\payara\payara-6.2024.6\glassfish\domains\domain1 Log File: D:\apps\payara\payara-6.2024.6\glassfish\domains\domain1\logs\server.log Admin Port: 4848 Command start-domain executed successfully

(1 instances of java) (http://localhost:4848 is online)

asadmin start-domain domain1 Waiting for domain1 to start ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. No response from the Domain Administration Server (domain1) after 600 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.

(2 instances of java) (http://localhost:4848 is online)

asadmin stop-domain domain1 CLI306: Warning - The server located at D:\apps\payara\payara-6.2024.6\glassfish\domains\domain1 is not running. No domains are currently running. Command stop-domain failed.

(2 instances of java remain) (http://localhost:4848 is online)

asadmin stop-all-domains Stopping domain domain1 Stopped domain Command stop-all-domains executed successfully.

(2 instances of java remain) (http://localhost:4848 is online)

asadmin stop-all-domains --force Stopping domain domain1 Stopped domain Command stop-all-domains executed successfully. (2 instances of java remain) (http://localhost:4848 is online)

I have now killed the processes in Task Manager.The current outcome is executed out of the box using Payara 6.2024.6 (no additional deployments)

asadmin start-domain domain1 Waiting for domain1 to start .................................. Successfully started the domain : domain1 domain Location: D:\apps\payara\payara-6.2024.6\glassfish\domains\domain1 Log File: D:\apps\payara\payara-6.2024.6\glassfish\domains\domain1\logs\server.log Admin Port: 4848 Command start-domain executed successfully

(1 instances of java) (http://localhost:4848 is online)

asadmin start-domain domain1 Waiting for domain1 to start ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. No response from the Domain Administration Server (domain1) after 600 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.

(2 instances of java) (http://localhost:4848 is online)

asadmin stop-domain domain1 CLI306: Warning - The server located at D:\apps\payara\payara-6.2024.6\glassfish\domains\domain1 is not running. No domains are currently running. Command stop-domain failed.

(2 instances of java remain) (http://localhost:4848 is online)

asadmin stop-all-domains Stopping domain domain1 Stopped domain Command stop-all-domains executed successfully.

(2 instances of java remain) (http://localhost:4848 is online)

asadmin stop-all-domains --force Stopping domain domain1 Stopped domain Command stop-all-domains executed successfully. (2 instances of java remain) (http://localhost:4848 is online)

I have now killed the processes in Task Manager.

Reproducer

In the current version of Payara Community Edition. See the current outcome above as it's the same set of commands

  1. Open a Windows Command Prompt
  2. run - asadmin start-domain domain1
  3. Browser to localhost port 4848 (accessible)
  4. run - asadmin start-domain domain1
  5. Browser to localhost port 4848 (accessible)
  6. asadmin stop-domain domain1
  7. Browser to localhost port 4848 (accessible)
  8. asadmin stop-all-domains
  9. Browser to localhost port 4848 (accessible)
  10. asadmin stop-all-domains --force
  11. Browser to localhost port 4848 (accessible)
  12. Go to Task Manager, kill 2 instances of java.

Operating System

Windows 10 Pro

JDK Version

Eclipse Adoptium jdk-21.0.1.12-hotspot

Payara Distribution

Payara Server Full Profile

artur-mal commented 4 months ago

I was able to reproduce the issue and it has been escalated to our Platform Development team with JIRA task FISH-8922. Thank you for the report.