Skip to content

Using juicefs mount on windows, using etcd database, the connection always fails. Auto-disconnect! #6057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
masx200 opened this issue Apr 23, 2025 · 4 comments
Assignees

Comments

@masx200
Copy link

masx200 commented Apr 23, 2025

What happened:

Using juicefs mount on windows, using etcd database, the connection always fails. Auto-disconnect!

The error might be caused by the fact that etcd is running in single-machine mode and thus unable to obtain the cluster address.

2025-04-23 15:10:35.099: {"level":"warn","ts":"2025-04-23T23:10:35.09941+0800","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0015aa540/10.200.200.3:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing: dial tcp 0.0.0.0:2379: connectex: No connection could be made because the target machine actively refused it.\""}
2025-04-23 15:10:35.099: {"level":"info","ts":"2025-04-23T23:10:35.09941+0800","logger":"etcd-client","caller":"[email protected]/client.go:210","msg":"Auto sync endpoints failed.","error":"context deadline exceeded"}
2025-04-23 15:11:40.124: {"level":"warn","ts":"2025-04-23T23:11:40.124576+0800","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0015aa540/10.200.200.3:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing: dial tcp 0.0.0.0:2379: connectex: No connection could be made because the target machine actively refused it.\""}
2025-04-23 15:11:40.124: {"level":"info","ts":"2025-04-23T23:11:40.124576+0800","logger":"etcd-client","caller":"[email protected]/client.go:210","msg":"Auto sync endpoints failed.","error":"context deadline exceeded"}

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

juicefs.exe mount --max-uploads=50 --writeback --cache-size 204800 --bucket=http://<address>:19000/juicefs --attr-cache 600s    --entry-cache 600s        --dir-entry-cache 600s    "etcd://root:<password>@<address>:2379/juicefs" z:

Anything else we need to know?

Environment:

  • JuiceFS version (use juicefs --version) or Hadoop Java SDK version:
    1.2.3+2025-01-22.4f2aba8
  • Cloud provider or hardware configuration running JuiceFS:
  • OS (e.g cat /etc/os-release):
    windows 11 26100.3775
  • Kernel (e.g. uname -a):
  • Object storage (cloud provider and region, or self maintained):
    minio
  • Metadata engine info (version, cloud provider managed or self maintained):
    etcd standalone

ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379

ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage):
    not on same computer
  • Others:
@masx200 masx200 added the kind/bug Something isn't working label Apr 23, 2025
@davies davies added this to the Release 1.3 milestone Apr 24, 2025
@chenjie4255
Copy link
Contributor

Single-node mode works fine on my side.

And from the log you provided:

dial tcp 0.0.0.0:2379: connectex: No connection could be made because the target machine actively refused it.\""},

Maybe you should change ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 to an real address(not 0.0.0.0)

@masx200
Copy link
Author

masx200 commented Apr 25, 2025

Since my etcd service is running inside a Docker container and has undergone NAT (Network Address Translation), the IP address within the container is mapped to the host machine's address through a port. As a result, remote computers cannot access the IP address within the container.

@chenjie4255
Copy link
Contributor

Since my etcd service is running inside a Docker container and has undergone NAT (Network Address Translation), the IP address within the container is mapped to the host machine's address through a port. As a result, remote computers cannot access the IP address within the container.

Could you try ping 0.0.0.0 on your Windows command prompt or PowerShell? On my side, it doesn't work either. And on a Linux system, it seems that the command of pinging 0.0.0.0 will finally result in the pinging of 127.0.0.1.

@masx200
Copy link
Author

masx200 commented May 15, 2025

version: '3.8'
services:
  etcd:
    stdin_open: true

    tty: true
    privileged: true
    restart: always
    image: bitnami/etcd:3.5
    container_name: etcd-standalone
    environment:
      - ETCD_ROOT_PASSWORD=<password>  # 自定义 root 密码
      - ETCD_NAME=etcd-single                  # 节点名称
      - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
      - ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
      - ETCD_INITIAL_CLUSTER_TOKEN=<password>
      - ETCD_INITIAL_CLUSTER_STATE=new
    ports:
      - "2379:2379"
      - "2380:2380"
    volumes:
      - /media/debian-msx/542c5887-1dbd-48d8-95a1-125a7b3d01c5/etcd-data:/bitnami/etcd/data
    networks:
      - etcd-net

networks:
  etcd-net:
    driver: bridge
    external: true
    name: "mount-verysync_default"
    
    enable_ipv6: true  # 启用IPv6支持 [[5]][[9]]
    ipam:
      config:
        - subnet: 172.20.0.0/24       # IPv4子网 [[2]]
          gateway: 172.20.0.1
        - subnet: fc01:db8:21:172::/64     # IPv6子网(示例,需符合实际网络规划)
          gateway: fc01:db8:21:172::1
juicefs format --storage minio     --bucket http://10.200.200.3:19000/juicefs     --access-key <password>     --secret-key <password>    --trash-days=30 "etcd://root:<password>@100.122.154.114:2379/juicefs" juicefs

@chenjie4255 chenjie4255 removed this from the Release 1.3 milestone May 19, 2025
@chenjie4255 chenjie4255 removed the kind/bug Something isn't working label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants