Closed sevenlure closed 5 years ago
I have also run into this problem, same issue on 0.2.1-sandbox+oryOS.10
.
What OS?
I’m runnning the Docker image from DockerHub. In my case, it doesn’t even specify which file is is not found.
The process immediately gets shutdown due to this error.
time="2019-01-07T20:28:40Z" level=info msg="Listening on https://:4466"
time="2019-01-07T20:28:40Z" level=fatal msg="Unable to gracefully shutdown HTTP(s) server because open : no such file or directory"
I think i found the issue, seems to be in this block on HTTPS server start. The certs are not actually set in the http.Server tls config
Are you running it with TLS configured or without?
I am running 0.2.2-sandbox+oryOS.10
with TLS configured using Path to cert and key.
Can you make sure that the paths are set correctly? Could you maybe show the env config?
They are set correctly, using HTTPS_TLS_CERT_PATH
and HTTPS_TLS_KEY_PATH
.
The tlsx
package for tlsx.HTTPSCertificate()
doesn't return tlsx.ErrNoCertificatesConfigured
which would allow the above code to hit line 127. Instead nil is returned in err
From tlsx: https://github.com/ory/x/blob/8463556ef7762bd4f6dd94dd30da22cec10ac70a/tlsx/cert.go#L81
Right, the logic here seems to be messed up. TLSConfig should be nil in case of tlsx.ErrNoCertificatesConfigured
and set if the error is nil.
@aeneasr I am facing the same issue on Mac. I am building from source and I pull in the src using go mod vendor
. This script pulls in Keto source (.go files) to local vendor folder and I build using 'go build -mod=vendor'. The build is fine but when I run keto serve
, I get the same error as OP. It has to do with go mod vendor
because it does not pull the .rego
files from git as they are non .go files. I manually added the rego
folder on my local src copy inside ladon
folder and everything was working fine. One solution could be adding a placeholder .go
file inside the rego
folder. I imagine this will force go mod vendor
to download all the necessary code required to run keto serve
Ohhh, that's possible. Damn, any ideas how to fix that?
One solution could be adding a placeholder .go file inside the rego folder. I imagine this will force go mod vendor to download all the necessary code required to run keto serve. I tried forking latest master and running with proposed solution but I kept getting the resty import issues, I will try again today.
Also, the DockerFile needs to be updated. You have to copy the rego folder into your docker release image here. Let me know if it needs further clarification.
Whoops, reopening because this is two issues in one
I got a similar error with yesterday's master:
Unable to initialize compiler: lstat /build: no such file or directory
This is probably caused by: https://github.com/ory/keto/pull/79#issuecomment-459759675
I have a nix derivation that reproduces the problem (while packaging ORY for NixOS).
https://github.com/piensa/nur-packages/blob/master/pkgs/keto/default.nix
Ok, it seems like there were several issues:
This has all been fixed now and is being merged with #84
0.2.3 is now on it's way where this should be solved
Describe the bug Version [0.2.2-sandbox+oryOS.10] keto serve => Unable to initialize compiler: lstat /go: no such file or directory
Version [v0.1.9-sandbox+oryOS.9] keto serve => work well
To Reproduce Steps to reproduce the behavior:
keto serve
Version: