diff --git a/internal/stack/boot.go b/internal/stack/boot.go index 6c66e5f17..c4f66457e 100644 --- a/internal/stack/boot.go +++ b/internal/stack/boot.go @@ -9,6 +9,7 @@ import ( "os" "path/filepath" "strings" + "time" "github.com/elastic/elastic-package/internal/builder" "github.com/elastic/elastic-package/internal/configuration/locations" @@ -91,7 +92,9 @@ func BootUp(options Options) error { // As a workaround, try to give another chance to docker-compose if only // elastic-agent failed. if onlyElasticAgentFailed(options) { - fmt.Println("Elastic Agent failed to start, trying again.") + sleepTime := 10 * time.Second + fmt.Printf("Elastic Agent failed to start, trying again in %s.\n", sleepTime) + time.Sleep(sleepTime) err = dockerComposeUp(options) } if err != nil {