dragonflyoss / Dragonfly

This repository has be archived and moved to the new repository https://github.com/dragonflyoss/Dragonfly2.
https://d7y.io
Apache License 2.0
6k stars 773 forks source link

supernode error log port in body should be less than or equal to 65000: {"Code":2,"Msg":"invalid value"} #1479

Open Icedroid opened 4 years ago

Icedroid commented 4 years ago

Ⅰ. Issue Description

supernode error log as follow:

2020-09-09 09:00:06.049 DEBU sign:11 : POST /peer/registry remote:172.19.0.1:42060 cost:257.043µs err:validation failure list:
port in body should be less than or equal to 65000: {"Code":2,"Msg":"invalid value"}

Ⅱ. Describe what happened

I use docker pull a image, image is downloaded,but supernode got error, And I can't see ''downloading piece' in dfclient.log

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. run a supernode with following config:

    base:
    # ListenPort is the port supernode server listens on.
    # default: 8002
    listenPort: 8002
    
    # DownloadPort is the port for download files from supernode.
    # And you should start a file server firstly which listens on the download port.
    # default: 8001
    downloadPort: 8001
    
    # HomeDir is working directory of supernode.
    # default: /home/admin/supernode
    homeDir: /home/admin/supernode
  2. run the client with config:

    
    registry_mirror:
     remote: https://index.docker.io
     insecure: true
    dfget_flags:
    [
    "--insecure",
    "--node",
    "192.168.1.100=1",
    "--port",
    "65001",
    "--expiretime",
    "3m0s",
    "--alivetime",
    "5m0s",
    "-f",
    "Expires&Signature",
    ]
    proxies:
    # proxy all http image layer download requests with dfget
    - regx: blobs/sha256.*
    hijack_https:
    hosts:
    - regx: index.docker.io
      # If your registry uses a self-signed certificate, please provide the certificate
      # or choose to ignore the certificate error with `insecure: true`.
      # certs: ["ca.crt"]
      insecure: true

Open detail info switch

verbose: false

The maximum number of CPUs that the dfdaemon can use

maxprocs: 10

Logging

logConfig:

Log file path

path: /dev/stdout

  1. change docker proxy use localhost:650001

Ⅵ. Environment:

Icedroid commented 4 years ago

Could anyone help me?

jim3ma commented 4 years ago
dfget_flags:
  [
    "--insecure",
    "--node",
    "192.168.1.100=1",
    "--port",
    "65001",  // change here, less than or equal to 65000
    "--expiretime",
    "3m0s",
    "--alivetime",
    "5m0s",
    "-f",
    "Expires&Signature",
  ]

Please change port 65001 to another port which less than or equal to 65000