[GH-ISSUE #201] cannot find package "github.com/cenkalti/backoff/v3" #92

Closed
opened 2026-03-13 15:45:12 +03:00 by kerem · 6 comments
Owner

Originally created by @roncanepa on GitHub (Dec 30, 2019).
Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/201

Hello, I'm new to Go and ran into this when trying to install. I was eventually able to get it to work by manually copying things in place but wanted to report it. Not sure if it's more so on the acme-dns or backoff side, but I imagine that this is supposed to come together differently than how I had to do it.

root@ubuntu-18:~# uname -a
Linux ubuntu-18 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

root@ubuntu-18:~# which go
/usr/local/go/bin/go

root@ubuntu-18:~# go version
go version go1.13.5 linux/amd64

root@ubuntu-18:~# go get github.com/joohoi/acme-dns/
package github.com/cenkalti/backoff/v3: cannot find package "github.com/cenkalti/backoff/v3" in any of:
	/usr/local/go/src/github.com/cenkalti/backoff/v3 (from $GOROOT)
	/root/go/src/github.com/cenkalti/backoff/v3 (from $GOPATH)

Go tried to fetch it, as I can see the following in the directory but no v3 dir:

root@ubuntu-18:~# tree /root/go/src/github.com/cenkalti/
/root/go/src/github.com/cenkalti/
└── backoff
    ├── backoff.go
    ├── backoff_test.go
    ├── context.go
    ├── context_test.go
    ├── example_test.go
    ├── exponential.go
    ├── exponential_test.go
    ├── go.mod
    ├── LICENSE
    ├── README.md
    ├── retry.go
    ├── retry_test.go
    ├── ticker.go
    ├── ticker_test.go
    ├── timer.go
    ├── tries.go
    └── tries_test.go

1 directory, 17 files    

My manual fix was clone backoff elsewhere and manually copy the checked-out v3:

  • git clone https://github.com/cenkalti/backoff.git /root/backoff
  • cd backoff/
  • git checkout v3
  • mkdir /root/go/src/github.com/cenkalti/backoff/v3
  • cp -R * /root/go/src/github.com/cenkalti/backoff/v3
Originally created by @roncanepa on GitHub (Dec 30, 2019). Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/201 Hello, I'm new to Go and ran into this when trying to install. I was eventually able to get it to work by manually copying things in place but wanted to report it. Not sure if it's more so on the acme-dns or backoff side, but I imagine that this is supposed to come together differently than how I had to do it. ``` root@ubuntu-18:~# uname -a Linux ubuntu-18 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux root@ubuntu-18:~# which go /usr/local/go/bin/go root@ubuntu-18:~# go version go version go1.13.5 linux/amd64 root@ubuntu-18:~# go get github.com/joohoi/acme-dns/ package github.com/cenkalti/backoff/v3: cannot find package "github.com/cenkalti/backoff/v3" in any of: /usr/local/go/src/github.com/cenkalti/backoff/v3 (from $GOROOT) /root/go/src/github.com/cenkalti/backoff/v3 (from $GOPATH) ``` Go tried to fetch it, as I can see the following in the directory but no v3 dir: ``` root@ubuntu-18:~# tree /root/go/src/github.com/cenkalti/ /root/go/src/github.com/cenkalti/ └── backoff ├── backoff.go ├── backoff_test.go ├── context.go ├── context_test.go ├── example_test.go ├── exponential.go ├── exponential_test.go ├── go.mod ├── LICENSE ├── README.md ├── retry.go ├── retry_test.go ├── ticker.go ├── ticker_test.go ├── timer.go ├── tries.go └── tries_test.go 1 directory, 17 files ``` My manual fix was clone backoff elsewhere and manually copy the checked-out v3: - `git clone https://github.com/cenkalti/backoff.git /root/backoff` - `cd backoff/` - `git checkout v3` - `mkdir /root/go/src/github.com/cenkalti/backoff/v3` - `cp -R * /root/go/src/github.com/cenkalti/backoff/v3`
kerem closed this issue 2026-03-13 15:45:17 +03:00
Author
Owner

@Elte156 commented on GitHub (Jan 7, 2020):

Running the steps from your manual fix worked. Thanks!

<!-- gh-comment-id:571434119 --> @Elte156 commented on GitHub (Jan 7, 2020): Running the steps from your manual fix worked. Thanks!
Author
Owner

@Elte156 commented on GitHub (Jan 8, 2020):

@roncanepa Were you able to run the acme-dns after installing your fix?
I am getting this particular error:

ubuntu@ubuntu16:~/go/bin$ sudo acme-dns
INFO[0000] Using config file                             file=/etc/acme-dns/config.cfg
INFO[0000] Connected to database
DEBU[0000] Adding new record to domain                   domain=acme.example.com. recordtype=SOA
INFO[0000] Listening DNS                                 addr="127.0.0.1:53" proto=udp
INFO[0000] Listening DNS                                 addr="127.0.0.1:53" proto=tcp
INFO[0000] 2020/01/07 21:21:15 [INFO][cache:0xc000098500] Started certificate maintenance routine
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x7e0b85]

goroutine 10 [running]:
time.(*Timer).Stop(...)
	/usr/local/go/src/time/sleep.go:74
github.com/cenkalti/backoff/v3.(*defaultTimer).Stop(0xc000010220)
	/home/ubuntu/go/src/github.com/cenkalti/backoff/v3/timer.go:32 +0x25
github.com/cenkalti/backoff/v3.RetryNotifyWithTimer.func1(0xb8abc0, 0xc000010220)
	/home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:45 +0x31
github.com/cenkalti/backoff/v3.RetryNotifyWithTimer(0xc0001760c8, 0x7f9787d85068, 0xc000167a20, 0x0, 0xb8abc0, 0xc000010220, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:53 +0x34d
github.com/cenkalti/backoff/v3.RetryNotify(...)
	/home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:31
github.com/cenkalti/backoff/v3.Retry(...)
	/home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:25
github.com/go-acme/lego/acme/api.(*Core).retrievablePost(0xc0001121e0, 0xc0004bee40, 0x3a, 0xc00014a920, 0x1d, 0x20, 0x9d49a0, 0xc0001c34a0, 0xc000104208, 0xc0001c3500, ...)
	/home/ubuntu/go/src/github.com/go-acme/lego/acme/api/api.go:107 +0x210
github.com/go-acme/lego/acme/api.(*Core).post(0xc0001121e0, 0xc0004bee40, 0x3a, 0xa7e540, 0xc0001c3500, 0x9d49a0, 0xc0001c34a0, 0x0, 0xc0001042d0, 0x7e1b1e)
	/home/ubuntu/go/src/github.com/go-acme/lego/acme/api/api.go:70 +0xf5
github.com/go-acme/lego/acme/api.(*AccountService).New(0xc0001122a0, 0x0, 0x0, 0x116f2b0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, ...)
	/home/ubuntu/go/src/github.com/go-acme/lego/acme/api/account.go:16 +0x150
github.com/go-acme/lego/registration.(*Registrar).Register(0xc000167920, 0xc00007fb01, 0xc0000ce540, 0x3a, 0xc0004e2cb8)
	/home/ubuntu/go/src/github.com/go-acme/lego/registration/registar.go:58 +0x139
github.com/mholt/certmagic.(*Config).newACMEClient(0xc0001120f0, 0x0, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/mholt/certmagic/client.go:221 +0x3d7
github.com/mholt/certmagic.(*Config).newManager(0xc0001120f0, 0xc000028700, 0xf, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/mholt/certmagic/client.go:121 +0x3ad
github.com/mholt/certmagic.(*Config).ObtainCert(0xc0001120f0, 0xb8c840, 0xc000026088, 0xc000028700, 0xf, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/mholt/certmagic/config.go:455 +0xc6
github.com/mholt/certmagic.(*Config).manageOne(0xc0001120f0, 0xb8c840, 0xc000026088, 0xc000028700, 0xf, 0xa96d60, 0xc0000f5120)
	/home/ubuntu/go/src/github.com/mholt/certmagic/config.go:411 +0x115
github.com/mholt/certmagic.(*Config).manageAll(0xc0001120f0, 0x0, 0x0, 0xc0001773d8, 0x1, 0x1, 0x0, 0x0, 0x0)
	/home/ubuntu/go/src/github.com/mholt/certmagic/config.go:394 +0x1d1
github.com/mholt/certmagic.(*Config).ManageSync(...)
	/home/ubuntu/go/src/github.com/mholt/certmagic/config.go:320
main.startHTTPAPI(0xc000062960, 0xc0000264b0, 0xc, 0xc0000264e0, 0x4, 0xc000028700, 0xf, 0xc000026540, 0xa, 0xc000028760, ...)
	/home/ubuntu/go/src/github.com/joohoi/acme-dns/main.go:166 +0x1025
created by main.main
	/home/ubuntu/go/src/github.com/joohoi/acme-dns/main.go:92 +0x977

Any ideas?

In that newly created v3 directory I checked out:

  • branch v3
  • branch v4
  • master
  • v3.0.0

I'm getting the same error. Do I need to rebuild something after I tested each version of backoff?
I don't know much about GO, wondering if this needs to change to get a newer version?
github.com/joohoi/acme-dns@aa3e7e1b75/go.sum (L40-L41)

<!-- gh-comment-id:571897398 --> @Elte156 commented on GitHub (Jan 8, 2020): @roncanepa Were you able to run the `acme-dns` after installing your fix? I am getting this particular error: ```console ubuntu@ubuntu16:~/go/bin$ sudo acme-dns INFO[0000] Using config file file=/etc/acme-dns/config.cfg INFO[0000] Connected to database DEBU[0000] Adding new record to domain domain=acme.example.com. recordtype=SOA INFO[0000] Listening DNS addr="127.0.0.1:53" proto=udp INFO[0000] Listening DNS addr="127.0.0.1:53" proto=tcp INFO[0000] 2020/01/07 21:21:15 [INFO][cache:0xc000098500] Started certificate maintenance routine panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x7e0b85] goroutine 10 [running]: time.(*Timer).Stop(...) /usr/local/go/src/time/sleep.go:74 github.com/cenkalti/backoff/v3.(*defaultTimer).Stop(0xc000010220) /home/ubuntu/go/src/github.com/cenkalti/backoff/v3/timer.go:32 +0x25 github.com/cenkalti/backoff/v3.RetryNotifyWithTimer.func1(0xb8abc0, 0xc000010220) /home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:45 +0x31 github.com/cenkalti/backoff/v3.RetryNotifyWithTimer(0xc0001760c8, 0x7f9787d85068, 0xc000167a20, 0x0, 0xb8abc0, 0xc000010220, 0x0, 0x0) /home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:53 +0x34d github.com/cenkalti/backoff/v3.RetryNotify(...) /home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:31 github.com/cenkalti/backoff/v3.Retry(...) /home/ubuntu/go/src/github.com/cenkalti/backoff/v3/retry.go:25 github.com/go-acme/lego/acme/api.(*Core).retrievablePost(0xc0001121e0, 0xc0004bee40, 0x3a, 0xc00014a920, 0x1d, 0x20, 0x9d49a0, 0xc0001c34a0, 0xc000104208, 0xc0001c3500, ...) /home/ubuntu/go/src/github.com/go-acme/lego/acme/api/api.go:107 +0x210 github.com/go-acme/lego/acme/api.(*Core).post(0xc0001121e0, 0xc0004bee40, 0x3a, 0xa7e540, 0xc0001c3500, 0x9d49a0, 0xc0001c34a0, 0x0, 0xc0001042d0, 0x7e1b1e) /home/ubuntu/go/src/github.com/go-acme/lego/acme/api/api.go:70 +0xf5 github.com/go-acme/lego/acme/api.(*AccountService).New(0xc0001122a0, 0x0, 0x0, 0x116f2b0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, ...) /home/ubuntu/go/src/github.com/go-acme/lego/acme/api/account.go:16 +0x150 github.com/go-acme/lego/registration.(*Registrar).Register(0xc000167920, 0xc00007fb01, 0xc0000ce540, 0x3a, 0xc0004e2cb8) /home/ubuntu/go/src/github.com/go-acme/lego/registration/registar.go:58 +0x139 github.com/mholt/certmagic.(*Config).newACMEClient(0xc0001120f0, 0x0, 0x0, 0x0, 0x0) /home/ubuntu/go/src/github.com/mholt/certmagic/client.go:221 +0x3d7 github.com/mholt/certmagic.(*Config).newManager(0xc0001120f0, 0xc000028700, 0xf, 0x0, 0x0, 0x0) /home/ubuntu/go/src/github.com/mholt/certmagic/client.go:121 +0x3ad github.com/mholt/certmagic.(*Config).ObtainCert(0xc0001120f0, 0xb8c840, 0xc000026088, 0xc000028700, 0xf, 0x0, 0x0, 0x0) /home/ubuntu/go/src/github.com/mholt/certmagic/config.go:455 +0xc6 github.com/mholt/certmagic.(*Config).manageOne(0xc0001120f0, 0xb8c840, 0xc000026088, 0xc000028700, 0xf, 0xa96d60, 0xc0000f5120) /home/ubuntu/go/src/github.com/mholt/certmagic/config.go:411 +0x115 github.com/mholt/certmagic.(*Config).manageAll(0xc0001120f0, 0x0, 0x0, 0xc0001773d8, 0x1, 0x1, 0x0, 0x0, 0x0) /home/ubuntu/go/src/github.com/mholt/certmagic/config.go:394 +0x1d1 github.com/mholt/certmagic.(*Config).ManageSync(...) /home/ubuntu/go/src/github.com/mholt/certmagic/config.go:320 main.startHTTPAPI(0xc000062960, 0xc0000264b0, 0xc, 0xc0000264e0, 0x4, 0xc000028700, 0xf, 0xc000026540, 0xa, 0xc000028760, ...) /home/ubuntu/go/src/github.com/joohoi/acme-dns/main.go:166 +0x1025 created by main.main /home/ubuntu/go/src/github.com/joohoi/acme-dns/main.go:92 +0x977 ``` Any ideas? In that newly created `v3` directory I checked out: * branch v3 * branch v4 * master * v3.0.0 I'm getting the same error. Do I need to rebuild something after I tested each version of backoff? I don't know much about GO, wondering if this needs to change to get a newer version? https://github.com/joohoi/acme-dns/blob/aa3e7e1b752df84fa4906dd49c45f3b77a181fe3/go.sum#L40-L41
Author
Owner

@joohoi commented on GitHub (Jan 8, 2020):

This should get fixed by the pull request referenced above.

<!-- gh-comment-id:571901594 --> @joohoi commented on GitHub (Jan 8, 2020): This should get fixed by the pull request referenced above.
Author
Owner

@Elte156 commented on GitHub (Jan 8, 2020):

What did #203 fix?

I'm still getting the missing backoff errors as of right now. Steps to reproduce.

host:~ user$ docker run -it ubuntu:18.04 bash
root@8093db754b7f:/# apt-get update
root@8093db754b7f:/# apt-get install wget git gcc
root@8093db754b7f:/# wget --no-check-certificate https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz
root@8093db754b7f:/# tar -C /usr/local -xzf go1.13.5.linux-amd64.tar.gz
root@8093db754b7f:/# echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile
root@8093db754b7f:/# source /etc/profile
root@8093db754b7f:/# go version
root@8093db754b7f:/# go get github.com/joohoi/acme-dns/...
package github.com/joohoi/acme-dns
	imports github.com/cenkalti/backoff/v3: cannot find package "github.com/cenkalti/backoff/v3" in any of:
	/usr/local/go/src/github.com/cenkalti/backoff/v3 (from $GOROOT)
	/root/go/src/github.com/cenkalti/backoff/v3 (from $GOPATH)
<!-- gh-comment-id:572127932 --> @Elte156 commented on GitHub (Jan 8, 2020): What did #203 fix? I'm still getting the missing backoff errors as of right now. Steps to reproduce. ```console host:~ user$ docker run -it ubuntu:18.04 bash root@8093db754b7f:/# apt-get update root@8093db754b7f:/# apt-get install wget git gcc root@8093db754b7f:/# wget --no-check-certificate https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz root@8093db754b7f:/# tar -C /usr/local -xzf go1.13.5.linux-amd64.tar.gz root@8093db754b7f:/# echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile root@8093db754b7f:/# source /etc/profile root@8093db754b7f:/# go version root@8093db754b7f:/# go get github.com/joohoi/acme-dns/... package github.com/joohoi/acme-dns imports github.com/cenkalti/backoff/v3: cannot find package "github.com/cenkalti/backoff/v3" in any of: /usr/local/go/src/github.com/cenkalti/backoff/v3 (from $GOROOT) /root/go/src/github.com/cenkalti/backoff/v3 (from $GOPATH) ```
Author
Owner

@joohoi commented on GitHub (Jan 8, 2020):

Ah, you are right. I only updated the dependency map. The issue is indeed with the go modules and go-lego dependency. To mitigate the gomodule issue:

git clone https://github.com/joohoi/acme-dns
cd acme-dns
export GOPATH=/tmp/acmedns
go build

I'll update the installation instructions in README.md. Thanks for pointing this out!

<!-- gh-comment-id:572147713 --> @joohoi commented on GitHub (Jan 8, 2020): Ah, you are right. I only updated the dependency map. The issue is indeed with the go modules and `go-lego` dependency. To mitigate the gomodule issue: ``` git clone https://github.com/joohoi/acme-dns cd acme-dns export GOPATH=/tmp/acmedns go build ``` I'll update the installation instructions in `README.md`. Thanks for pointing this out!
Author
Owner

@Elte156 commented on GitHub (Jan 8, 2020):

Thanks, I'll try it out after your README.md updates.

<!-- gh-comment-id:572161086 --> @Elte156 commented on GitHub (Jan 8, 2020): Thanks, I'll try it out after your `README.md` updates.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/acme-dns#92
No description provided.