draft-classic icon indicating copy to clipboard operation
draft-classic copied to clipboard

draft up error "panic: send on closed channel" when not logged into ACR

Open tomconte opened this issue 6 years ago • 7 comments

If I run draft up without previously logging into ACR, the error below is displayed, which does not clearly explains the problem.

After running az acr login -n myregistry the error goes away.

My ~/.draft/config.toml contains: registry = "myregistry.azurecr.io".

Draft Up Started: 'pisidplay': 01CF7H0ZMPZHT1XV4HB53CATCJ
pisidplay: Building Docker Image: SUCCESS ⚓  (28.0242s)
pisidplay: Pushing Docker Image /panic: send on closed channel

goroutine 103 [running]:
github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1.1(0xc4209886c0, 0xc42069e020, 0x30520a0, 0xc4200120d0, 0xc420896580, 0x518, 0xc4200d40b0, 0xc4200e0150, 0xc420888000, 0x44)
	/go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:127 +0x2af
created by github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1
	/go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:115 +0x149

tomconte avatar Jun 05 '18 08:06 tomconte

Same here

❯ draft up     
Draft Up Started: 'simple-api': 01CFCJS7A6E42DQ26JDK7BTW6W
simple-api: Building Docker Image: SUCCESS ⚓  (1.0004s)
simple-api: Pushing Docker Image \panic: send on closed channel

goroutine 52 [running]:
github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1.1(0xc42030e100, 0xc420542020, 0x244dec0, 0xc420088048, 0xc4207be0a0, 0x98, 0xc4204ce030, 0xc4202d7b20, 0xc42001c310, 0x69)
	/go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:127 +0x2af
created by github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1
	/go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:115 +0x149

exu avatar Jun 07 '18 07:06 exu

The same is happening for example repository from draft so IMO it's not an app issue.

exu avatar Jun 07 '18 08:06 exu

Same is happening to my deploy using draft.

> draft up --debug
Draft Up Started: 'sema4app': 01CMFHYH0P75CEB0ATTMVFFC5C
demoapp: Building Docker Image: SUCCESS ⚓  (41.0366s)
demoapp: Pushing Docker Image \panic: send on closed channel

goroutine 97 [running]:
github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1.1(0xc424e41190, 0xc4204be880, 0x30520a0, 0xc4200160d0, 0xc421cbe8d0, 0x24, 0xc4211d2178, 0xc424de4150, 0xc420924000, 0x44)
	/go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:127 +0x2af
created by github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1
	/go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:115 +0x149

I'm running the following version

> draft version
&version.Version{SemVer:"v0.15.0", GitCommit:"9d73889a1318a435d126bc5df846610d30cfbe7f", GitTreeState:"clean"}

My repository is on GCP (gcr.io)

dalekurt avatar Aug 09 '18 14:08 dalekurt

same issue:

bi-v-r81e2g8wm:example-python Ranjeeth$ draft up --debug hello world Error: failed to download "mysql" (hint: running helm repo update may help) Draft Up Started: 'example-python': 01CVR5337Y8976NG9WDSYWBVYW example-python: Building Docker Image: SUCCESS ⚓ (1.0012s) example-python: Pushing Docker Image -panic: send on closed channel

goroutine 23 [running]: github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1.1(0xc420aacda0, 0xc420ad6010, 0x30520a0, 0xc4200140a0, 0xc4204023dc, 0x4, 0xc42000c0b8, 0xc4202ba310, 0xc4200183c0, 0x4c) /go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:127 +0x2af created by github.com/Azure/draft/pkg/builder/docker.(*Builder).Push.func1 /go/src/github.com/Azure/draft/pkg/builder/docker/builder.go:115 +0x149

ranjeeth-ap avatar Nov 07 '18 22:11 ranjeeth-ap

Same issue. What operating system are you all using, I'm using linux (ubuntu)

ofekih avatar Jul 01 '19 23:07 ofekih

I managed to fix this issue by just reinstalling draft:

I deleted my 'draft home' directory I deleted my draft binary

I got the same release binary from the releases page, and then went again from scratch with draft init, draft create (I removed the previous files made with draft create), and then draft up worked

ofekih avatar Jul 02 '19 18:07 ofekih

Same issue whether the repo already exists on docker.io (with Public permissions), or not.

Is there some protocol for providing the docker.io password to draft config set registry?

chris-hailstorm avatar Aug 06 '19 18:08 chris-hailstorm