running into issue /w prometheus endpoint not resp...
# talk-oathkeeper
n
running into issue /w prometheus endpoint not responsible while ory itself is pass ready health check:
Copy code
curl <http://localhost:4456/health/ready>                                                                                           
{"status":"ok"}%

curl <http://localhost:4457/metrics>                                                                                                
curl: (52) Empty reply from server
config is pretty vanilla:
Copy code
serve:
  proxy:
    port: 4455 # run the proxy at port 4455
  api:
    port: 4456 # run the api at port 4456
  prometheus:
    port: 4457
    host: localhost
    metrics_path: /metrics
log doesn't show any particular err:
Copy code
oathkeeper-stage_1  | time=2021-10-04T17:33:58Z level=info msg=Listening on <http://localhost:4457> func=<http://github.com/ory/oathkeeper/cmd/server.runPrometheus.func1.1|github.com/ory/oathkeeper/cmd/server.runPrometheus.func1.1> file=/home/ory/cmd/server/server.go:134 audience=application service_name=ORY Oathkeeper service_version=v0.38.15-beta.1
bug or ?
p
Hi @nice-secretary-6224 Mine works alright, I loaded up the configs given in the
ory/kratos/contrib/quickstart
folder found here.
Also changed the port and host
Copy code
serve:
  proxy:
    cors:
      enabled: true
      allowed_origins:
        - "*"
      allowed_methods:
        - POST
        - GET
        - PUT
        - PATCH
        - DELETE
      allowed_headers:
        - Authorization
        - Content-Type
      exposed_headers:
        - Content-Type
      allow_credentials: true
      debug: true
  prometheus:
    host: localhost
    port: 4457
n
looks like a container network issue, it is binding to localhost inside docker:
Copy code
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:4457          0.0.0.0:*               LISTEN      -
tcp        0      0 :::4455                 :::*                    LISTEN      -
tcp        0      0 :::4456                 :::*                    LISTEN      -
so doesn't get port-forward (4455, 4456 works as it doesn't bind to 127.0.0.1 but to all)
anyway solution is to use 0.0.0.0 instead of localhost then it'd work 🙂