8000 v3.0.0-beta.1 - panic: redis configuration required to use for layerinfo cache · Issue #4486 · distribution/distribution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
v3.0.0-beta.1 - panic: redis configuration required to use for layerinfo cache #4486
Open
@Vad1mo

Description

@Vad1mo

Description

I am currently testing docker distribution beta for project Harbor. And it seems like our old Redis config does not work with distribution anymore.

Appending internal tls trust CA to ca-bundle ...
find: '/etc/harbor/ssl': No such file or directory
Internal tls trust CA appending is Done.
time="2024-10-15T07:25:34Z" level=warning msg="Ignoring unrecognized environment variable REGISTRY_REDIS_PASSWORD"
time="2024-10-15T07:25:34.632042112Z" level=info msg="redis not configured" go.version=go1.22.6 instance.id=82962db6-960b-4d87-b6b3-08a011b2a819 service=registry version=v3.0.0-beta.1.m+unknown
time="2024-10-15T07:25:34.632115952Z" level=info msg="Starting upload purge in 44m0s" go.version=go1.22.6 instance.id=82962db6-960b-4d87-b6b3-08a011b2a819 service=registry version=v3.0.0-beta.1.m+unknown
panic: redis configuration required to use for layerinfo cache

goroutine 1 [running]:
github.com/distribution/distribution/v3/registry/handlers.NewApp({0x5613b94d5528, 0xc000741380}, 0xc0006c9208)
	/go/src/github.com/docker/distribution/registry/handlers/app.go:288 +0x1ebd
github.com/distribution/distribution/v3/registry.NewRegistry({0x5613b94d5528?, 0xc0007405d0?}, 0xc0006c9208)
	/go/src/github.com/docker/distribution/registry/registry.go:142 +0x56
github.com/distribution/distribution/v3/registry.init.func1(0x5613b9ffa800, {0xc00074e0d0, 0x1, 0x1})
	/go/src/github.com/docker/distribution/registry/registry.go:111 +0x10a
github.com/spf13/cobra.(*Command).execute(0x5613b9ffa800, {0xc00074e090, 0x1, 0x1})
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x5613b9ffaae0)
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0xc0000061c0?)
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:1039 +0x13
main.main()
	/go/src/github.com/docker/distribution/cmd/registry/main.go:26 +0x1a

Reproduce

version: 0.1
log:
  level: info
  fields:
    service: registry
storage:
  s3:
    region: xxx
    bucket: xxxx
    regionendpoint: xxx
  cache:
    layerinfo: redis
  maintenance:
    uploadpurging:
      enabled: true
      age: 168h
      interval: 24h
      dryrun: false
  delete:
    enabled: true
  redirect:
    disable: false
redis:
  addr: redis-master:6379
  db: 2
  readtimeout: 10s
  writetimeout: 10s
  dialtimeout: 10s
  pool:
    maxidle: 100
    maxactive: 500
    idletimeout: 60s
http:
  addr: :5000
  relativeurls: false
  # set via environment variable
  # secret: placeholder
  debug:
    addr: :8001
    prometheus:
      enabled: true
      path: /metrics
auth:
  htpasswd:
    realm: harbor-registry-basic-realm
    path: /etc/registry/passwd
validation:
  disabled: true
compatibility:
  schema1:
    enabled: true

Expected behavior

The same configuration that worked for 2.8.x also works for 3.0.x

registry version

v3.0.0-beta.1

Additional Info

  • The only solution to make the registry work is switching layerinfo: redis to inmemory
  • The variable REGISTRY_REDIS_PASSWORD is set but does not contain a value in the key as the Redis does not have a password.
  • Removing REGISTRY_REDIS_PASSWORD--> no effect, same error
  • Changed the config to redis.addr: [redis-master:6379] in brackets [], --> no effect, same error
  • Changed the config and set cache.blobdescriptor: redis --> no effect, same error.
  • As the redis server has no password I tried to set redis.password: '' or redis.password: --> no effect, same error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0