miniature-airline-97097
11/16/2023, 3:57 PM{
"error": {
"code": 404,
"status": "Not Found",
"message": "Unable to locate the resource"
}
}
This error is happening on all endpoints
Here is the error log
{"audience":"application","error":{"debug":"","message":"Unable to locate the resource","reason":"","stack_trace":"\<http://ngithub.com/ory/x/sqlcon.HandleError|ngithub.com/ory/x/sqlcon.HandleError>\n\t/go/pkg/mod/github.com/ory/x@v0.0.562/sqlcon/error.go:76\ngithub.com/ory/kratos/persistence/sql.(*Persister).GetRegistrationFlow\n\t/project/persistence/sql/persister_registration.go:45\ngithub.com/ory/kratos/selfservice/flow/registration.(*Handler).getRegistrationFlow\n\t/project/selfservice/flow/registration/handler.go:422\ngithub.com/ory/kratos/x.NoCacheHandle.func1\n\t/project/x/nocache.go:21\ngithub.com/ory/kratos/x.NoCacheHandle.func1\n\t/project/x/nocache.go:21\ngithub.com/julienschmidt/httprouter.(*Router).ServeHTTP\n\t/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387\ngithub.com/ory/nosurf.(*CSRFHandler).handleSuccess\n\t/go/pkg/mod/github.com/ory/nosurf@v1.2.7/handler.go:234\ngithub.com/ory/nosurf.(*CSRFHandler).ServeHTTP\n\t/go/pkg/mod/github.com/ory/nosurf@v1.2.7/handler.go:191\ngithub.com/urfave/negroni.Wrap.func1\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:46\ngithub.com/urfave/negroni.HandlerFunc.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:29\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/ory/kratos/x.glob..func1\n\t/project/x/clean_url.go:15\ngithub.com/urfave/negroni.HandlerFunc.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:29\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:38\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerResponseSize.func1\n\t/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/promhttp/instrument_server.go:284\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1\n\t/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/promhttp/instrument_server.go:142\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func1\n\t/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/promhttp/instrument_server.go:92\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func2\n\t/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/promhttp/instrument_server.go:104\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerRequestSize.func1\n\t/go/pkg/mod/github.com/prometheus/client_golang@v1.13.0/prometheus/promhttp/instrument_server.go:234\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/ory/x/prometheusx.Metrics.instrumentHandlerStatusBucket.func1\n\t/go/pkg/mod/github.com/ory/x@v0.0.562/prometheusx/metrics.go:115\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/ory/x/prometheusx.(*MetricsManager).ServeHTTP\n\t/go/pkg/mod/github.com/ory/x@v0.0.562/prometheusx/middleware.go:41\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/ory/x/metricsx.(*Service).ServeHTTP\n\t/go/pkg/mod/github.com/ory/x@v0.0.562/metricsx/middleware.go:272\ngithub.com/urfave/negroni.middleware.ServeHTTP\n\t/go/pkg/mod/github.com/urfave/negroni@v1.0.0/negroni.go:38\ngithub.com/ory/kratos/x.HTTPLoaderContextMiddleware.func1\n\t/project/x/httploadermiddleware.go:23","status":"Not Found","status_code":404},"http_request":{"headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9","connection":"close","cookie":"Value is sensitive and has been redacted. To see the value set config key \"log.leak_sensitive_values = true\" or environment variable \"LOG_LEAK_SENSITIVE_VALUES=true\".","sec-ch-ua":"\"Google Chrome\";v=\"119\", \"Chromium\";v=\"119\", \"Not?A_Brand\";v=\"24\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"macOS\"","sec-fetch-dest":"document","sec-fetch-mode":"navigate","sec-fetch-site":"none","sec-fetch-user":"?1","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","x-amzn-trace-id":"Root=1-65563541-16b0a05c1c6f2cca57449d81","x-forwarded-for":"","x-forwarded-port":"443","x-forwarded-proto":"http","x-real-ip":""},"host":"<http://api2.dua-dev-app.com|api2.dua-dev-app.com>","method":"GET","path":"/self-service/registration/flows","query":null,"remote":"127.0.0.1:46520","scheme":"http"},"http_response":{"status_code":404},"level":"info","msg":"An error occurred while handling a request","service_name":"Ory Kratos","service_version":"v1.0.0","time":"2023-11-16T15:29:05.230227523Z"}
chilly-king-10285
11/16/2023, 3:57 PMchilly-king-10285
11/16/2023, 3:57 PMminiature-airline-97097
11/16/2023, 3:57 PM{
"error": {
"code": 404,
"status": "Not Found",
"message": "Unable to locate the resource"
}
}
This error is happening on all endpointschilly-king-10285
11/16/2023, 3:57 PMchilly-king-10285
11/16/2023, 3:58 PMminiature-airline-97097
11/16/2023, 4:00 PMchilly-king-10285
11/16/2023, 4:00 PMchilly-king-10285
11/16/2023, 4:01 PMkratos.yml
) are correctly set up. For instance, if you're trying to access the Admin API, make sure it's not exposed to the public internet unsecured. You should require authorization and preferably not expose the Admin API at all to the public internet. Use a Zero Trust Networking Architecture within your intranet. 2. Reverse Proxy: If you're using a reverse proxy, make sure it's correctly configured. For example, you need to set serve.public.host
and serve.admin.host
to 127.0.0.1
to ensure Ory Kratos is listening on the loopback interface. 3. Database Connection: Ensure that your database is correctly set up and accessible. Ory Kratos requires a production-grade database such as PostgreSQL, MySQL, CockroachDB. Don't use SQLite in production! 4. Test Your Setup: You can test your setup using the serve
command. You should see something like this once the service has been started: bash /opt/kratos/bin/kratos -c /opt/kratos/config/kratos.yml serve
If you're still having issues, it might be helpful to look at the logs for any error messages or warnings. You can also refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/) for more detailed information and troubleshooting tips.