0

I set up a Kong using docker and it was running fine. I configured a local service with the following info;

{
    "host": "localhost",
    "created_at": 1534727577,
    "connect_timeout": 60000,
    "id": "cc3a858f-09fc-4baa-a206-3bd5ad3f514a",
    "protocol": "http",
    "name": "iwc_client_management",
    "read_timeout": 60000,
    "port": 9007,
    "path": "/rfg/iwconnect/1.0",
    "updated_at": 1534727577,
    "retries": 5,
    "write_timeout": 60000
}

I also created a route for this service with the following info;

{
    "created_at": 1534727699,
    "strip_path": true,
    "hosts": [
        "iwconnect.com"
    ],
    "preserve_host": false,
    "regex_priority": 0,
    "updated_at": 1534727699,
    "paths": [
        "/clients"
    ],
    "service": {
        "id": "cc3a858f-09fc-4baa-a206-3bd5ad3f514a"
    },
    "methods": null,
    "protocols": [
        "http",
        "https"
    ],
    "id": "67c32503-e5d1-4aae-982b-bfa03a36582e"
}

According to this example,

Let's go through a few examples. Consider a Route configured like this:

{
    "hosts": ["iwconnect.com"],
    "paths": ["/clients],
    "methods": ["GET"]
}

As per the Kong Document the following call will take effect;

GET http://localhost:8000/clients header: Host : iwconnect.com

but the response is:

error_404

{
    "message": "no route and no API found with those values"
}

Is there anything I missed or wrong configuration?

Thanks for any help.

1 Answer 1

1

I used the same config you have done and Kong version 0.14 is working fine with that configuration. I am able to get the results for the call with /clients request.

Please check kong error logs under /usr/local/kong/logs/error.log and see what error you are getting. Error will also give you an idea if something is missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.