Hi, I am trying to configure hydra with the golang example and now am really stucked and need some orientation. Here is my situation: I have 3 servers:
- ServerA running postgres
- ServerB running hydra in Docker
- ServerC running some Go apps, here I want to run the golang example
I installed hydra and configured it as the documentation determine, also I ran the migrations on the DB server and everything’s ok until here. Now, when I go to the ServerC to run the example, I get:
Could not connect to Hydra because: Post http://ServerB.IP:9000/oauth2/token: malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"
exit status 1
In the hydra-consent-app-go I edited the main.go
file and put these lines:
if client, err = sdk.Connect(
sdk.ClientID(env.Getenv("HYDRA_CLIENT_ID", "some-consumer")),
sdk.ClientSecret(env.Getenv("HYDRA_CLIENT_SECRET", "consumer-secret")),
sdk.ClusterURL(env.Getenv("HYDRA_CLUSTER_URL", "http://ServerB.IP:9000")),
); err != nil {
log.Fatalf("Could not connect to Hydra because: %s", err)
}
Then, I went to the ServerB to check the running processes and ports, I typed: docker container ls
and get this:
4d2c0db7e23c oryd/hydra:latest "/bin/sh" 27 minutes ago Up 27 minutes 4444/tcp, 0.0.0.0:9010->4445/tcp determined_snyder
7c586393ef61 oryd/hydra:latest "/bin/sh -c '/go/b..." 34 minutes ago Up 34 minutes 0.0.0.0:9000->4444/tcp someContainer
Then, I typed: sudo lsof -i -P -n
and get this:
docker-pr 15057 root 4u IPv6 486152035 0t0 TCP *:9000 (LISTEN)
docker-pr 15224 root 4u IPv6 486156778 0t0 TCP *:9010 (LISTEN)
Am I pointing to the correct port from the hydra-consent-app-go
?
I also checked the logs of the docker container, and I have this:
2017/07/23 15:24:42 http: TLS handshake error from ServerC.IP:49046: tls: oversized record received with length 21536
I followed this instructions. What should I take in count to configure the consent app in another server then?