-
Notifications
You must be signed in to change notification settings - Fork 185
Description
SDK版本:2.6.0
MilvusClientV2 sourceClient = new MilvusClientV2(ConnectConfig.builder() .uri("https://milvus.xiaoying.io") .token("xxxx") .dbName("xxx") .build());
会报错[DEADLINE_EXCEEDED: deadline exceeded after 9.984330316s. Name resolution delay 0.013935956 seconds. [closed=[], open=[[wait_for_ready, buffered_nanos=9994177403, waiting_for_connection],原因是域名未做处理默认会加上19530端口
public URLParser(String url) { try { if (url.startsWith("https://")) { this.secure = true; } URI uri = new URI(url); this.hostname = uri.getHost(); if (Objects.isNull(this.hostname)) { throw new IllegalArgumentException("Missing hostname in url"); } else { this.port = uri.getPort(); if (this.port <= 0) { this.port = 19530; } String path = uri.getPath(); if (!Objects.isNull(path) && !path.isEmpty() && !"/".equals(path)) { this.database = path.substring(1); } else { this.database = null; } } } catch (URISyntaxException e) { throw new IllegalArgumentException("Invalid url: " + url, e); } }