2015-09-15 00:40:49 +00:00
|
|
|
---
|
2020-02-06 23:45:31 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: server force-leave'
|
2015-09-15 00:40:49 +00:00
|
|
|
description: >
|
2019-10-22 13:44:00 +00:00
|
|
|
The server force-leave command is used to force a server into the "left"
|
|
|
|
state.
|
2015-09-15 00:40:49 +00:00
|
|
|
---
|
|
|
|
|
2018-03-22 17:56:06 +00:00
|
|
|
# Command: server force-leave
|
2015-09-15 00:40:49 +00:00
|
|
|
|
2018-03-22 17:56:06 +00:00
|
|
|
The `server force-leave` command forces a server to enter the "left" state.
|
2015-09-15 20:52:02 +00:00
|
|
|
This can be used to eject server nodes which have failed and will not rejoin
|
|
|
|
the cluster. Note that if the server is actually still alive, it will
|
|
|
|
eventually rejoin the cluster again.
|
2015-09-15 00:40:49 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2019-10-22 13:44:00 +00:00
|
|
|
```plaintext
|
2018-03-22 17:56:06 +00:00
|
|
|
nomad server force-leave [options] <node>
|
2015-09-15 00:40:49 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
This command expects only one argument - the node which should be forced
|
|
|
|
to enter the "left" state.
|
|
|
|
|
2020-11-19 21:38:08 +00:00
|
|
|
If ACLs are enabled, this option requires a token with the `agent:write`
|
|
|
|
capability.
|
|
|
|
|
2015-09-15 00:40:49 +00:00
|
|
|
## General Options
|
|
|
|
|
2020-11-19 18:02:48 +00:00
|
|
|
@include 'general_options_no_namespace.mdx'
|
2015-09-15 03:24:04 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2015-09-22 18:08:36 +00:00
|
|
|
Force-leave the server "node1":
|
2015-09-15 03:24:04 +00:00
|
|
|
|
2020-05-18 20:53:06 +00:00
|
|
|
```shell-session
|
|
|
|
$ nomad server force-leave node1
|
2020-05-01 20:02:21 +00:00
|
|
|
|
2015-09-15 03:24:04 +00:00
|
|
|
```
|