Is there any way to deploy an application to a single virtual server in payara instead of all of them?

41 views Asked by At

Every time an application is deployed to a virtual server in payara, it is always deployed to every virtual server on the server. This produces a "Virtual server <> already has a web module <> loaded at / therefore web module <> cannot be loaded at this context path on this virtual server" error.

This happens even if using ASADMIN and specifying --virtualservers. The admin "Deploy Applications or Modules" page doesn't even have anywhere to specify a virtual server to deploy to, it only has a target - even though the (blog post about Virtual Servers from 2018) has a screenshot that include a Virtual Server list to pick from (which does not exist in the current deployment page).

The only method I have found to be able to deploy to virtual servers is to manually:

  1. Clear the default-web-module of every virtual server.
  2. Disable or undeploy ALL the applications of every virtual server.
  3. Deploy an application.
  4. Manually remove all the virtual servers and add the 1 virtual server for that app in the "Manage Virtual Server" link of the Target tab for the application.
  5. Manually disable the application.
  6. Repeat steps 3-5 for each application to be deployed.
  7. Manually enable all the applications for all the virtual servers.
  8. Set the default-web-module of every virtual server to the appropriate application.

Since application are always deployed to all virtual servers when using ASADMIN, even when passing --virtualservers, it is not possible to script or automated deployment in any way forcing all deployments of any virtual servers to be a manual process :(

0

There are 0 answers