Skip to content

Multi-address URL for private API

Closes Rework KAS private API address discovery (#510 - closed). See for details.

Closes Log warning when KAS private API URL is localhost (#509 - closed).

Errors when listening on loopback or a host name (not IP):

{
  "time": "2025-01-04T11:17:01.819741+11:00",
  "level": "ERROR",
  "msg": "Program aborted",
  "error": "private API server: construct own multi URL: couldn't determine own private API URL. Please set OWN_PRIVATE_API_URL or OWN_PRIVATE_API_CIDR environment variable or change private API listen address to listen on all interfaces (currently set to \"localhost:8155\")"
}
{
  "time": "2025-01-04T11:17:35.544012+11:00",
  "level": "ERROR",
  "msg": "Program aborted",
  "error": "private API server: construct own multi URL: couldn't determine own private API URL. Please set OWN_PRIVATE_API_URL or OWN_PRIVATE_API_CIDR environment variable or change private API listen address to listen on all interfaces (currently set to \"127.0.0.1:8155\")"
}
{
  "time": "2025-01-04T11:18:11.660404+11:00",
  "level": "ERROR",
  "msg": "Program aborted",
  "error": "private API server: construct own multi URL: couldn't determine own private API URL. Please set OWN_PRIVATE_API_URL or OWN_PRIVATE_API_CIDR environment variable or change private API listen address to listen on all interfaces (currently set to \"[::1]:8155\")"
}

With address: "172.16.123.1:8155":

{"time":"2025-01-04T11:20:03.667044+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:172.16.123.1|8155"}

With address: ":8155":

{"time":"2025-01-04T12:48:46.523753+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:172.16.123.1,192.168.50.68,192.168.205.1,fd79:592:5d9:b1d4:c97:c118:e79c:524a|8155"}

With address: "0.0.0.0:8155":

{"time":"2025-01-04T11:55:05.443569+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:172.16.123.1,192.168.50.68|8155"}

With address: "[::]:8155":

{"time":"2025-01-04T12:50:23.060309+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:fd79:592:5d9:b1d4:c97:c118:e79c:524a|8155"}

With commented-out in-memory pool kas->kas looks like this (via IPv4):

{"time":"2025-01-04T12:21:50.637259+11:00","level":"INFO","msg":"[core]original dial target is: \"multiurl:///\""}
{"time":"2025-01-04T12:21:50.637351+11:00","level":"INFO","msg":"[core][Channel #16]Channel created"}
{"time":"2025-01-04T12:21:50.637409+11:00","level":"INFO","msg":"[core][Channel #16]parsed dial target is: resolver.Target{URL:url.URL{Scheme:\"multiurl\", Opaque:\"\", User:(*url.Userinfo)(nil), Host:\"\", Path:\"/\", RawPath:\"\", OmitHost:false, ForceQuery:false, RawQuery:\"\", Fragment:\"\", RawFragment:\"\"}}"}
{"time":"2025-01-04T12:21:50.637446+11:00","level":"INFO","msg":"[core][Channel #16]Channel authority set to \"\""}
{"time":"2025-01-04T12:21:50.63767+11:00","level":"INFO","msg":"[core][Channel #16]Resolver state updated: {\n  \"Addresses\": null,\n  \"Endpoints\": [\n    {\n      \"Addresses\": [\n        {\n          \"Addr\": \"172.16.123.1:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        },\n        {\n          \"Addr\": \"192.168.50.68:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        },\n        {\n          \"Addr\": \"192.168.205.1:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        },\n        {\n          \"Addr\": \"[fd79:592:5d9:b1d4:c97:c118:e79c:524a]:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        }\n      ],\n      \"Attributes\": null\n    }\n  ],\n  \"ServiceConfig\": null,\n  \"Attributes\": null\n} ()"}
{"time":"2025-01-04T12:21:50.637757+11:00","level":"INFO","msg":"[core][Channel #16]Channel switches to new LB policy \"pick_first\""}
{"time":"2025-01-04T12:21:50.637906+11:00","level":"INFO","msg":"[pick-first-lb][pick-first-lb 0xc00215b110] Received new config {\n  \"shuffleAddressList\": false\n}, resolver state {\n  \"Addresses\": null,\n  \"Endpoints\": [\n    {\n      \"Addresses\": [\n        {\n          \"Addr\": \"172.16.123.1:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        },\n        {\n          \"Addr\": \"192.168.50.68:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        },\n        {\n          \"Addr\": \"192.168.205.1:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        },\n        {\n          \"Addr\": \"[fd79:592:5d9:b1d4:c97:c118:e79c:524a]:8155\",\n          \"ServerName\": \"\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        }\n      ],\n      \"Attributes\": null\n    }\n  ],\n  \"ServiceConfig\": null,\n  \"Attributes\": null\n}"}
{"time":"2025-01-04T12:21:50.637993+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel created"}
{"time":"2025-01-04T12:21:50.638033+11:00","level":"INFO","msg":"[core][Channel #16]Channel Connectivity change to CONNECTING"}
{"time":"2025-01-04T12:21:50.638133+11:00","level":"INFO","msg":"[core][Channel #16]Channel exiting idle mode"}
{"time":"2025-01-04T12:21:50.638151+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel Connectivity change to CONNECTING"}
{"time":"2025-01-04T12:21:50.638221+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel picks a new address \"172.16.123.1:8155\" to connect"}
{"time":"2025-01-04T12:21:50.63827+11:00","level":"INFO","msg":"[pick-first-lb][pick-first-lb 0xc00215b110] Received SubConn state update: 0xc001022dc0, {ConnectivityState:CONNECTING ConnectionError:<nil> connectedAddress:{Addr: ServerName: Attributes:<nil> BalancerAttributes:<nil> Metadata:<nil>}}"}
{"time":"2025-01-04T12:21:50.646647+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel Connectivity change to READY"}
{"time":"2025-01-04T12:21:50.646719+11:00","level":"INFO","msg":"[pick-first-lb][pick-first-lb 0xc00215b110] Received SubConn state update: 0xc001022dc0, {ConnectivityState:READY ConnectionError:<nil> connectedAddress:{Addr:172.16.123.1:8155 ServerName: Attributes:<nil> BalancerAttributes:<nil> Metadata:<nil>}}"}
{"time":"2025-01-04T12:21:50.646762+11:00","level":"INFO","msg":"[core][Channel #16]Channel Connectivity change to READY"}

Via IPv6:

{"time":"2025-01-04T12:50:58.839618+11:00","level":"INFO","msg":"[core]original dial target is: \"multiurl:///\""}
{"time":"2025-01-04T12:50:58.839684+11:00","level":"INFO","msg":"[core][Channel #16]Channel created"}
{"time":"2025-01-04T12:50:58.83973+11:00","level":"INFO","msg":"[core][Channel #16]parsed dial target is: resolver.Target{URL:url.URL{Scheme:\"multiurl\", Opaque:\"\", User:(*url.Userinfo)(nil), Host:\"\", Path:\"/\", RawPath:\"\", OmitHost:false, ForceQuery:false, RawQuery:\"\", Fragment:\"\", RawFragment:\"\"}}"}
{"time":"2025-01-04T12:50:58.839754+11:00","level":"INFO","msg":"[core][Channel #16]Channel authority set to \"\""}
{"time":"2025-01-04T12:50:58.839908+11:00","level":"INFO","msg":"[core][Channel #16]Resolver state updated: {\n  \"Addresses\": null,\n  \"Endpoints\": [\n    {\n      \"Addresses\": [\n        {\n          \"Addr\": \"[fd79:592:5d9:b1d4:c97:c118:e79c:524a]:8155\",\n          \"ServerName\": \"fd79:592:5d9:b1d4:c97:c118:e79c:524a\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        }\n      ],\n      \"Attributes\": null\n    }\n  ],\n  \"ServiceConfig\": null,\n  \"Attributes\": null\n} ()"}
{"time":"2025-01-04T12:50:58.839965+11:00","level":"INFO","msg":"[core][Channel #16]Channel switches to new LB policy \"pick_first\""}
{"time":"2025-01-04T12:50:58.840053+11:00","level":"INFO","msg":"[pick-first-lb][pick-first-lb 0xc0019c34d0] Received new config {\n  \"shuffleAddressList\": false\n}, resolver state {\n  \"Addresses\": null,\n  \"Endpoints\": [\n    {\n      \"Addresses\": [\n        {\n          \"Addr\": \"[fd79:592:5d9:b1d4:c97:c118:e79c:524a]:8155\",\n          \"ServerName\": \"fd79:592:5d9:b1d4:c97:c118:e79c:524a\",\n          \"Attributes\": null,\n          \"BalancerAttributes\": null,\n          \"Metadata\": null\n        }\n      ],\n      \"Attributes\": null\n    }\n  ],\n  \"ServiceConfig\": null,\n  \"Attributes\": null\n}"}
{"time":"2025-01-04T12:50:58.840114+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel created"}
{"time":"2025-01-04T12:50:58.840149+11:00","level":"INFO","msg":"[core][Channel #16]Channel Connectivity change to CONNECTING"}
{"time":"2025-01-04T12:50:58.840204+11:00","level":"INFO","msg":"[core][Channel #16]Channel exiting idle mode"}
{"time":"2025-01-04T12:50:58.840235+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel Connectivity change to CONNECTING"}
{"time":"2025-01-04T12:50:58.840287+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel picks a new address \"[fd79:592:5d9:b1d4:c97:c118:e79c:524a]:8155\" to connect"}
{"time":"2025-01-04T12:50:58.840319+11:00","level":"INFO","msg":"[pick-first-lb][pick-first-lb 0xc0019c34d0] Received SubConn state update: 0xc0010018b0, {ConnectivityState:CONNECTING ConnectionError:<nil> connectedAddress:{Addr: ServerName: Attributes:<nil> BalancerAttributes:<nil> Metadata:<nil>}}"}
{"time":"2025-01-04T12:50:58.848683+11:00","level":"INFO","msg":"[core][Channel #16 SubChannel #17]Subchannel Connectivity change to READY"}
{"time":"2025-01-04T12:50:58.848912+11:00","level":"INFO","msg":"[pick-first-lb][pick-first-lb 0xc0019c34d0] Received SubConn state update: 0xc0010018b0, {ConnectivityState:READY ConnectionError:<nil> connectedAddress:{Addr:[fd79:592:5d9:b1d4:c97:c118:e79c:524a]:8155 ServerName:fd79:592:5d9:b1d4:c97:c118:e79c:524a Attributes:<nil> BalancerAttributes:<nil> Metadata:<nil>}}"}
{"time":"2025-01-04T12:50:58.848982+11:00","level":"INFO","msg":"[core][Channel #16]Channel Connectivity change to READY"}
Edited by Mikhail Mazurskiy

Merge request reports

Loading