diff --git a/client/client.go b/client/client.go index 0316ce30f..c75a71241 100644 --- a/client/client.go +++ b/client/client.go @@ -299,7 +299,16 @@ func NewClient(cfg *config.Config, consulCatalog consul.CatalogAPI, consulServic // Restore the state if err := c.restoreState(); err != nil { - return nil, fmt.Errorf("failed to restore state: %v", err) + logger.Printf("[ERR] client: failed to restore state: %v", err) + logger.Printf("[ERR] client: Nomad is unable to start due to corrupt state. "+ + "The safest way to proceed is to manually stop running task processes "+ + "and remove Nomad's state (%q) and alloc (%d) directories before "+ + "restarting. Lost allocations will be rescheduled.", + c.config.StateDir, c.config.AllocDir) + logger.Printf("[ERR] client: Corrupt state is often caused by a bug. Please " + + "report as much information as possible to " + + "https://github.com/hashicorp/nomad/issues") + return nil, fmt.Errorf("failed to restore state") } // Register and then start heartbeating to the servers.