pxf icon indicating copy to clipboard operation
pxf copied to clipboard

Improve PXF status check

Open bradfordb-vmware opened this issue 2 years ago • 1 comments

In addition to using curl to see if the server is up and responding to HTTP requests, pxf status now includes checks of the pid file.

Co-authored-by: Bradford D. Boyle [email protected] Co-authored-by: Yiming Li [email protected]

bradfordb-vmware avatar Jul 19 '22 01:07 bradfordb-vmware

Moved the checks for the PID file and process into the block where checkWebapp returns an error.

Here is the output when PXF is up

$ pxf status
Checking if PXF is up and running...
PXF is listening on port 5888

Here is the output when PXF is down because pxf stop was called

$ pxf stop
Stopping PXF [pid=2574499]...
PXF stopped [pid=2574499]

$ pxf status
Checking if PXF is up and running...
ERROR: PXF is down - the application is not running
PID file '/home/bboyle/pxf-base/run/pxf-app.pid' not found

Here is the output when PXF is down because it stopped someway other than the PXF CLI

$ kill $(cat $PXF_BASE/run/pxf-app.pid)

$ pxf status
Checking if PXF is up and running...
ERROR: PXF is down - the application is not running
Process with PID=2574880 not found

bradfordb-vmware avatar Jul 19 '22 22:07 bradfordb-vmware

Closing this in favor of #881

bradfordb-vmware avatar Oct 26 '22 19:10 bradfordb-vmware