restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
922 stars 138 forks source link

accept: function not implemented on arm devices (e.g. synology DS213) with go 1.18+ #203

Closed AlBundy33 closed 1 year ago

AlBundy33 commented 1 year ago

Output of rest-server --version

clone github repo

How did you run rest-server exactly?

./rest-server --no-auth

What backend/server/service did you use to store the repository?

Expected behavior

server is started

Actual behavior

start fails with error: accept tcp [::]:8000: accept: function not implemented

Steps to reproduce the behavior

git clone https://github.com/restic/rest-server.git
cd rest-server
docker run --rm -v "$PWD":/build -w /build golang:1.19 go run build.go --goos linux --goarch arm -o rest-server

now copy binary to your arm-device and try to start it.

./rest-server --no-auth
Data directory: /tmp/restic
Authentication disabled
Private repositories disabled
start server on :8000
error: accept tcp [::]:8000: accept: function not implemented

Do you have any idea what may have caused this?

Seems a change in go? Maybe it is the same or related to: https://github.com/golang/go/issues/57333

Do you have an idea how to solve the issue?

more a workaround than a solution but if you build the binary with go 1.17 the server starts as expected.

docker run --rm -v "$PWD":/build -w /build golang:1.17 go run build.go --goos linux --goarch arm -o rest-server

Did rest-server help you today? Did it make you happy in any way?

Not yet but thinking about to use restic and maybe rest-server in future.

wojas commented 1 year ago

Looks like this is indeed caused by https://github.com/golang/go/issues/57333.

I expect the fix to land in a Go 1.19.5 release in the near future. In the meantime compiling with Go 1.17 seems like the best workaround.

Thanks for reporting!