-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable protocol on Service Discovery #706
Comments
@alombarte @kpacha i fixed it by using priority and weigth on my SRV record. but now i have a new issue Error #1: Get "http://XXX.:XXX/v1/XXX/XXX": EOF Now, krakend send the request to the good destination host by used http schema, how to switch to https i suspect the schema to be hard coded : https://github.com/luraproject/lura/blob/master/sd/dnssrv/subscriber.go thanks for your help |
Hello @MDS-Info, You are right, the protocol is hardcoded. We can add a new flag in the configuration There would still the limitation that you couldn't mix http and https servers, but the DNS SRV does not provide any mechanism to prevent that. We will have a look at this issue in the next release. |
The attribute Thanks! |
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link. |
Hello,
Environment info:
Describe the bug
I want to set the Service Discovery by using DNS SRV RECORD, but I have this issue :
{"@timestamp":"2023-04-13T15:44:16.922+00:00", "@Version": 1, "level": "ERROR", "message": "[ENDPOINT: xxx] no hosts available", "module": "KRAKEND"}
[GIN] 2023/04/13 - 15:44:16 | 500 | 86.964µs | 192.168.107.1 | GET "xxx"
Error #1: no hosts available
Nevertheless, the DNS server return the correct information :
17:44:26.586003 IP 172.18.0.12.44657 > xxx.local.domain: 4478+ [1au] SRV? _api.._tcp.mds.local. (50)
17:44:26.586017 IP 172.18.0.12.55777 > xxx.local.domain: 34244+ [1au] SRV? _api.._tcp.mds.local. (50)
17:44:26.587021 IP xxx.local.domain > 172.18.0.12.55777: 34244* 1/0/2 SRV xxx.domain.:5001 0 0 (105)
from the docker host, the resolution is correct:
nslookup
_api._tcp.mds.local service = 0 0 5001 xxx.domain.
by using curl, the service is responding
172.18.0.12 : container's IP
xxx.local.domain : DNS server
Your configuration file:
"endpoint": "xxx",
"input_headers": [
"*"
],
"input_query_strings": [],
"method": "Get",
"output_encoding": "no-op",
"extra_config": {},
"backend": [
{
"url_pattern": "xxx",
"encoding": "json",
"sd": "dns",
"method": "Get",
"extra_config": {},
"disable_host_sanitize": true,
"host": [
"_api._tcp.mds.local"
]
}
]
thanks for you help
The text was updated successfully, but these errors were encountered: