Skip to content
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

panic: unexpected end of JSON input #2374

Open
mikebryant opened this issue Aug 18, 2017 · 1 comment · May be fixed by #4293
Open

panic: unexpected end of JSON input #2374

mikebryant opened this issue Aug 18, 2017 · 1 comment · May be fixed by #4293

Comments

@mikebryant
Copy link

It looks like if scheduler-state.json is empty (crash or node issue during writing the file? or running out of disk space?), the registry will then crash on startup, until this file is removed.

Perhaps if the state file is corrupted it could recover automatically with a blank state?

Logs:

time="2017-08-18T15:17:05Z" level=info msg="redis not configured" go.version=go1.7.3 instance.id=9a8f36a4-5003-4b89-82ba-68f2a2346646 version=v2.6.0 
time="2017-08-18T15:17:05Z" level=info msg="Starting upload purge in 25m0s" go.version=go1.7.3 instance.id=9a8f36a4-5003-4b89-82ba-68f2a2346646 version=v2.6.0 
panic: unexpected end of JSON input

goroutine 1 [running]:
panic(0xb4cc80, 0xc420396490)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/docker/distribution/registry/handlers.NewApp(0x10667c0, 0xc4203b8750, 0xc42036aa80, 0x10667c0)
	/go/src/github.com/docker/distribution/registry/handlers/app.go:312 +0x17d4
github.com/docker/distribution/registry.NewRegistry(0x7fad44e9c040, 0xc4203b8750, 0xc42036aa80, 0xe, 0x0, 0x0)
	/go/src/github.com/docker/distribution/registry/registry.go:86 +0x213
github.com/docker/distribution/registry.glob..func1(0x108e140, 0xc4203963d0, 0x1, 0x1)
	/go/src/github.com/docker/distribution/registry/registry.go:55 +0x106
github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).execute(0x108e140, 0xc420396380, 0x1, 0x1, 0x108e140, 0xc420396380)
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:495 +0x190
github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).Execute(0x108e2e0, 0xc4201b7f40, 0xc4200001a0)
	/go/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:560 +0x3c3
main.main()
	/go/src/github.com/docker/distribution/cmd/registry/main.go:24 +0x2d
time="2017-08-18T15:17:05Z" level=info msg="using inmemory blob descriptor cache" go.version=go1.7.3 instance.id=9a8f36a4-5003-4b89-82ba-68f2a2346646 version=v2.6.0 
@ialidzhikov
Copy link
Contributor

ialidzhikov commented Feb 15, 2024

We just hit this issue today. The scheduler-state.json file was empty and the registry cache volume had 29Gi of images. For our case the volume was 90Gi and it was not definitely a disk space issue.

We hit this issue with distribution/distribution@v2.8.3.

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

Successfully merging a pull request may close this issue.

3 participants