diff --git a/Makefile b/Makefile index 5f399784..80cb2c5b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: build clean -export BLADE_VERSION=0.9.0 +export BLADE_VERSION=0.10.0 ALLOWGITVERSION=1.8.5 GITVERSION:=$(shell git --version | grep ^git | sed 's/^.* //g') diff --git a/exec/jvm/executor.go b/exec/jvm/executor.go index 6e7cdd1e..5c05d6bb 100644 --- a/exec/jvm/executor.go +++ b/exec/jvm/executor.go @@ -65,9 +65,10 @@ func (e *Executor) Exec(uid string, ctx context.Context, model *spec.ExpModel) * suid, isDestroy := spec.IsDestroy(ctx) record, err := e.getRecordFromDB(processName, processId) - var port string + var port, pid string if record != nil { port = record.Port + pid = record.Pid } if isDestroy { @@ -113,6 +114,13 @@ func (e *Executor) Exec(uid string, ctx context.Context, model *spec.ExpModel) * return response } } + + // jvm restart case + if exists, _ := cl.ProcessExists(pid); !exists && port != "" { + logrus.Infof("pid %s not exists", pid) + port = "" + } + // Install java agent if port == "" || override { logrus.Info("Install java agent")