Payara: [Question] Payara-Micro halt on deployment error /CUSTCOM-111

Created on 23 Apr 2019  路  6Comments  路  Source: payara/Payara

# Description #

Is it possible to make Payara-Micro fail fast when there is any error during startup, especially for deploying?

In my mind, Payara-Micro should keep the same lifecycle with its bundled application. It would be strange if the deployment failed but the Payara-Micro leaved living. It would be specially inconvenient in the docker/systemd case.

Accepted Enhancement

Most helpful comment

This is a kind of splitting between Java SE world & Java EE world.

The application would exit for any exception in Java SE world, especially during booting up

The bundled payara-micro scenario is more like a Java SE application instead of a Java EE server because the bundled payara-micro only serve the bundled applications. If no, why don't we use a full version of payara server?

I wonder the "standard" operation steps for traditional Payara server. I think it's as following:

  1. Use a standalone systemd unit to start Payara server
  2. Copy the war packages into that machine
  3. Use a script of asadmin commands to deploy the local war packages into Payara server
  4. Use another script to wait & check whether the deployment all succeed
  5. If not, repeat 2-4 to rollback to an older version

This is quite complex, it would be much easier in Java SE world:

  1. Copy a new version of all-in-one JAR package to target machine
  2. Restart the systemd service to start it
  3. If there is any failure, rollback to an older version & restart the service

All 6 comments

Hi @hcoona,

Since Payara Micro 5.191, the health endpoint (localhost:8080/health), based on MicroProfile Health Spec, indicates DOWN status when the application fails to deploy (it is down as long as no application is active).

You can use this as docker health check to check if the application deployed successful. (see https://docs.docker.com/engine/reference/run/#healthcheck)

Thanks, it's a great feature help integrating with Docker.

But I still have following concerns:

  1. If I bundled 2 applications, 1 deployed succeed, 1 failed, what would the health endpoint report?
  2. It helps little in the traditional systemd scenario.

@hcoona ,

When there is 1 application deployed successfully, the endpoint will indicate success (200 - Status Up)

What kind of error do you have in mind that should shutdown Payara Micro then? Does it makes sense that the deployment is retried at that moment? (when it is some ClassNotFoundException for example I don't see the point of retrying)

This is a kind of splitting between Java SE world & Java EE world.

The application would exit for any exception in Java SE world, especially during booting up

The bundled payara-micro scenario is more like a Java SE application instead of a Java EE server because the bundled payara-micro only serve the bundled applications. If no, why don't we use a full version of payara server?

I wonder the "standard" operation steps for traditional Payara server. I think it's as following:

  1. Use a standalone systemd unit to start Payara server
  2. Copy the war packages into that machine
  3. Use a script of asadmin commands to deploy the local war packages into Payara server
  4. Use another script to wait & check whether the deployment all succeed
  5. If not, repeat 2-4 to rollback to an older version

This is quite complex, it would be much easier in Java SE world:

  1. Copy a new version of all-in-one JAR package to target machine
  2. Restart the systemd service to start it
  3. If there is any failure, rollback to an older version & restart the service

I created CUSTCOM-111 for this enhancement

Hi, due to how long ago this issue was raised we have decided to close the issue immediately, and not consider the implementation of the fix/improvement that was requested. Please understand that this decision was taken into consideration with the resources that we have available at the moment. In case of having reported a bug, if the issue is still pressing to you, feel free to verify if it鈥檚 applicable in the current release of Payara Community edition, and proceed to raise a new issue with details of the test reproducer. Many thanks for your understanding.

Was this page helpful?
0 / 5 - 0 ratings