GO-Zheng opened a new issue, #266:
URL: https://github.com/apache/kvrocks-controller/issues/266
### Description
> After modifying the configuration file to ip, the command cannot find the
interface.
### Steps to Reproduce
> After seeing the warning below, I changed `127.0.0.1` to the local ip.
```json
{"level":"warn","timestamp":"2025-02-18T16:00:12.099+0800","caller":"config/config.go:94","msg":"Leader
forward may not work if the host is 127.0.0.1"}
```
- config/config.yaml
```yaml
# addr: "127.0.0.1:9379"
addr: "192.168.1.45:9379"
```
```shell
-> # make setup
[+] Running 4/4
✔ Network kvrocks-controller_default Created 0.7s
✔ Container etcd0 Started 2.0s
✔ Container kvrocks0 Started 2.0s
✔ Container kvrocks1 Started 1.7s
(base) root@OpsWorker [16:26:20] [~/code/github/kvrocks-controller]
[unstable *]
-> # ./_build/kvctl-server -c config/config.yaml
{"level":"info","timestamp":"2025-02-18T16:27:05.272+0800","caller":"server/main.go:78","msg":"Kvrocks
controller is running with version: unstable"}
{"level":"info","timestamp":"2025-02-18T16:27:05.286+0800","caller":"server/server.go:63","msg":"Use
Etcd as store"}
{"level":"info","timestamp":"2025-02-18T16:27:05.501+0800","caller":"controller/controller.go:121","msg":"Became
the leader, resume the controller"}
```
```shell
(base) root@OpsWorker [16:27:15] [~/code/github/kvrocks-controller]
[unstable *]
-> # netstat -an | grep 9379
tcp 0 0 192.168.1.45:9379 0.0.0.0:* LISTEN
(base) root@OpsWorker [16:27:15] [~/code/github/kvrocks-controller]
[unstable *]
-> # ./_build/kvctl create namespace my-ns
error: Post "http://127.0.0.1:9379/api/v1/namespaces": dial tcp
127.0.0.1:9379: connect: connection refused
```
### Environment
```shell
# system
WSL2 - Ubuntu 24.04.1 LTS
# controller
The latest "unstable" branch
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
apache/kvrocks 2.11.0 9140d7b357fc 3 weeks ago 156MB
quay.io/coreos/etcd v3.5.17 0b844ea0bc6b 3 months ago 59MB
```
### Supplement
> I tried other commands, but none of them worked.
> However, the default configuration of "127.0.0.1" worked fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]