# 問題與解決

sudo docker node ls Error response from daemon: rpc error: code = Unknown desc = The swarm does not have a leader. It's possible that too few managers are online. Make sure more than half of the managers are online.

```
sudo docker swarm init --force-new-cluster
Swarm initialized: current node (x0544nvby7gt0zaxp30gjjqov) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-3ltemfcbr4wa71zfctzpzkzzp7wxfijrm17fv7m1u4t60c8gp4-0p5ak00mdqd6flp0d0doa88qy 192.168.43.100:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

```

sduo docker node ls

```
sudo docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
x0544nvby7gt0zaxp30gjjqov *   pi-GB-BSi5A-6200    Ready               Active              Leader              18.09.9
pje55mj8gzj7q8obzz1la5c6s     raspberrypi4        Down                Active                                  19.03.7
vz8vwt7bom9s2go59wtt04lbf     ubuntu-mate         Ready               Active                                  19.03.3

```

![](/files/-M2VbhgeR9YVH7E_m8Wn)

```
sudo docker node rm pje55mj8gzj7q8obzz1la5c6s
```

```
udo docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
x0544nvby7gt0zaxp30gjjqov *   pi-GB-BSi5A-6200    Ready               Active              Leader              18.09.9
vz8vwt7bom9s2go59wtt04lbf     ubuntu-mate         Ready               Active                                  19.03.3
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/docker-swarm/wen-ti-yu-jie-jue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
