Testing on azure swarm service


#1

I have exposed all the ports on the Load-Balancer. I have a domain with SSL Certificates installed.
I have published the five-minute tutorial, but am getting 404 errors.


#2

This needs more context, what 404 errors, what set up, and so on. Maybe some routing issue on azure?


#3

This is a screenshot of my hydra container config


#4

docker exec -it hydra_hydra_1 \

hydra clients create \
--endpoint http://hl7-fhr.com:4445 \
--id my-client \
--secret secret \
-g client_credentials

You should not provide secrets using command line flags. The secret might leak to bash history and similar systems.
Command failed because calling " http://hl7-fhr.com:4445/clients" resulted in error “Post http://hl7-fhr.com:4445/clients: dial tcp: lookup hl7-fhr.com on 127.0.0.11:53: no such host” occurred.

Log:
time=“2018-09-05T00:34:53Z” level=info msg=“Connecting with postgres://:@postgresd:5432/hydra?sslmode=disable”,
time=“2018-09-05T00:34:53Z” level=info msg=“Connected to SQL!”,
time=“2018-09-05T00:34:53Z” level=info msg=“Setting up Prometheus middleware”,
time=“2018-09-05T00:34:53Z” level=info msg=“Transmission of telemetry data is enabled, to learn more go to: https://www.ory.sh/docs/guides/latest/telemetry/”,
time=“2018-09-05T00:34:53Z” level=info msg=“Setting up http server on :4445”,
time=“2018-09-05T00:34:53Z” level=warning msg=“HTTPS disabled. Never do this in production.”,
time=“2018-09-05T00:34:53Z” level=info msg=“Setting up http server on :4444”,
time=“2018-09-05T00:34:53Z” level=warning msg=“HTTPS disabled. Never do this in production.”,
time=“2018-09-05T00:36:08Z” level=info msg=“started handling request” method=GET remote=“172.28.0.3:50564” request=/oauth2/auth/requests/login/undefined,
time=“2018-09-05T00:36:08Z” level=error msg=“An error occurred while handling a request” code=404 details=“map[]” error=“Not Found” reason= request-id= status= trace=“Stack trace: \ngithub.com/ory/hydra/consent.(*SQLManager).GetAuthenticationRequest\n\t/go/src/github.com/ory/hydra/consent/manager_sql.go:256\ngithub.com/ory/hydra/consent.(*Handler).GetLoginRequest\n\t/go/src/github.com/ory/hydra/consent/handler.go:254\ngithub.com/ory/hydra/consent.(*Handler).GetLoginRequest-fm\n\t/go/src/github.com/ory/hydra/consent/handler.go:66\ngithub.com/ory/hydra/vendor/github.com/julienschmidt/httprouter.(*Router).ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/julienschmidt/httprouter/router.go:299\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.Wrap.func1\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:46\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:29\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.middleware.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1947\ngithub.com/ory/hydra/cmd/server.(*Handler).rejectInsecureRequests\n\t/go/src/github.com/ory/hydra/cmd/server/handler.go:260\ngithub.com/ory/hydra/cmd/server.(*Handler).(github.com/ory/hydra/cmd/server.rejectInsecureRequests)-fm\n\t/go/src/github.com/ory/hydra/cmd/server/handler.go:58\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:29\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.middleware.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/ory/metrics-middleware.(*MetricsManager).ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/ory/metrics-middleware/middleware.go:160\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.middleware.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/metrics/prometheus.(*MetricsManager).ServeHTTP\n\t/go/src/github.com/ory/hydra/metrics/prometheus/middleware.go:26\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.middleware.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/meatballhat/negroni-logrus.(*Middleware).ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/meatballhat/negroni-logrus/middleware.go:136\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.middleware.ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:38\ngithub.com/ory/hydra/vendor/github.com/urfave/negroni.(*Negroni).ServeHTTP\n\t/go/src/github.com/ory/hydra/vendor/github.com/urfave/negroni/negroni.go:96\ngithub.com/ory/hydra/vendor/github.com/rs/cors.(*Cors).Handler.func1\n\t/go/src/github.com/ory/hydra/vendor/github.com/rs/cors/cors.go:200\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1947\ngithub.com/ory/hydra/vendor/github.com/gorilla/context.ClearHandler.func1\n\t/go/src/github.com/ory/hydra/vendor/github.com/gorilla/context/context.go:141\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1947\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2697\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1830\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:2361” writer=JSON,
time=“2018-09-05T00:36:08Z” level=info msg=“completed handling request” measure#http://hl7-fhir.com:4444.latency=1761204 method=GET remote=“172.28.0.3:50564” request=/oauth2/auth/requests/login/undefined status=404 text_status=“Not Found” took=1.761204ms,
time=“2018-09-05T00:39:04Z” level=info msg=“started handling request” method=POST remote=“127.0.0.1:51858” request=/clients,
time=“2018-09-05T00:39:04Z” level=info msg=“completed handling request” measure#http://hl7-fhir.com:4444.latency=111798017 method=POST remote=“127.0.0.1:51858” request=/clients status=201 text_status=Created took=111.798017ms,


#5

Seems like some serious misconfiguration somewhere in your set up. I can’t help with that, especially because I never used azure and because we do not help with these typenof issues as part of our free community effort. Maybe someone else can help (a colleague, azure expert, our chat room).