500 EOF error returned

28 views
Skip to first unread message

Duane Crowley

unread,
Dec 16, 2024, 5:46:11 PM12/16/24
to comm...@krakend.io

Hello, everyone.

 

For testing purposes I’m running community KrakenD v2.8.0 in a docker container through docker desktop on my Windows laptop. 

 

I have a healthcheck endpoint on one of my development APIs.  The API server has a self signed certificate. I have the cert in the docker container.  Here is my dockerfile I’m using to build the image (I redacted the name of the certificate)

 

FROM devopsfaith/krakend:latest

WORKDIR /etc/krakend

COPY certs/xxxxx-CA.crt /usr/local/share/ca-certificates/xxxxx-CA.crt

COPY krakend.json /etc/krakend/krakend.json

EXPOSE 8080

CMD ["run", "-c", "/etc/krakend/krakend.json", "-d"]

 

I can call the healthcheck endpoint from Postman without issue, but when I try to use KrakenD, I get this error (I redacted the servername):

 

2024-12-16 15:05:09 Error #01: Get https://xxxxx.com/health: EOF

 

Here is my configuration json with the server names redacted.

 

{

  "$schema": https://www.krakend.io/schema/krakend.json,

  "version": 3,

  "name": "KrakenD - API Gateway",

  "timeout": "3000ms",

  "cache_ttl": "300s",

  "client_tls": {

      "allow_insecure_connections": true

  },

  "output_encoding": "json",

  "endpoints": [

    {

      "endpoint": "/xxxx/healthcheck",

      "method": "GET",

      "output_endcoding": "no-op",

      "backend": [

      {          

          "url_pattern": "/health",

          "encoding": "no-op",

          "method": "GET",

          "host": [

             https://xxxxx.com

          ]

        }

      ]

    }

  ]

}

 

When using postman, I get this JSON response (I redacted server names)

 

{

    "status": "Healthy",

    "totalDuration": "00:00:00.2688315",

    "entries": {

        "appsettings.json": {

            "data": {},

            "description": "Appsetting file available.",

            "duration": "00:00:00.0019721",

            "status": "Healthy",

            "tags": []

        },

        "log.config": {

            "data": {},

            "description": "log file available.",

            "duration": "00:00:00.0089037",

            "status": "Healthy",

            "tags": []

        },

        "XXXXXDatabase": {

            "data": {},

            "description": "XXXXX Database context available",

            "duration": "00:00:00.2636065",

            "status": "Healthy",

            "tags": []

        },

        "ZZZZZDatabase": {

            "data": {},

            "description": "ZZZZZ Database context available",

            "duration": "00:00:00.2550604",

            "status": "Healthy",

            "tags": []

        }

    }

}

 

I’m sure I’ve made a simple mistake, but I’m not seeing it.  Any and all help is appreciated.

Duane Crowley

unread,
Dec 16, 2024, 6:16:17 PM12/16/24
to KrakenD Community, Duane Crowley
I finally saw my mistake.  I'd left out the step to update the certificates.  Adding 

RUN chmod 644 /usr/local/share/ca-certificates/XXXX-CA.crt && update-ca-certificates
after the copy in my dockerfile fixed the issue.

Sorry for posting.  Hopefully my error will help someone else sometime.

Reply all
Reply to author
Forward
0 new messages