[ https://issues.apache.org/jira/browse/IOTDB-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652790#comment-17652790 ]
changxue commented on IOTDB-5318: --------------------------------- Set the priority to "Critical" , because this problem make the docker deployment useless and this bug is from customer. > java native API should support the way of docker deployment > ----------------------------------------------------------- > > Key: IOTDB-5318 > URL: https://issues.apache.org/jira/browse/IOTDB-5318 > Project: Apache IoTDB > Issue Type: Bug > Affects Versions: 1.0.0 > Reporter: changxue > Assignee: Haonan Hou > Priority: Critical > Attachments: image-2022-12-29-17-47-13-842.png > > > java native API should support the way of docker deployment > environment: > docker 1c1d > reproduction: > 1. new iotdb-service with: > {code} > docker network create --driver=bridge --subnet=172.18.0.0/16 > --gateway=172.18.0.1 iotdb > docker run -d --name iotdb-service \ > --hostname iotdb-service \ > --network iotdb \ > --ip 172.18.0.6 \ > -p 16667:6667 \ > -e cn_internal_address=iotdb-service \ > -e cn_target_config_node_list=iotdb-service:22277 \ > -e dn_rpc_address=iotdb-service \ > -e dn_internal_address=iotdb-service \ > -e dn_target_config_node_list=iotdb-service:22277 \ > apache/iotdb:1.0.0-standalone > {code} > 2. run the java source code below: > {code} > Session session = new Session.Builder() > .host("172.20.70.44") > .port(16667) > .username("root") > .password("root") > .build(); > session.open(false); > session.setFetchSize(10000); > // 1. confirm the connection is OK > try (SessionDataSet dataSet = > session.executeQueryStatement("show cluster", 20)) { > System.out.println(dataSet.getColumnNames()); > dataSet.setFetchSize(1024); // default is 10000 > while (dataSet.hasNext()) { > System.out.println(dataSet.next()); > } > } > // 2. insert > List<String> measuraments = new ArrayList<>(); > List<TSDataType> tsDataTypes = new ArrayList<>(); > List<Object> content = new ArrayList<>(); > String targetDevice = "root.ln.alerting"; > measuraments.add("table_name"); > measuraments.add("alert_content"); > tsDataTypes.add(TSDataType.TEXT); > tsDataTypes.add(TSDataType.TEXT); > content.add("root.ln.wf01.wt01"); > content.add("CRITICAL test value greater then 100"); > session.insertAlignedRecord(targetDevice, new Date().getTime(), > measuraments, tsDataTypes, content); > {code} > actual result: > !image-2022-12-29-17-47-13-842.png! > 问题: > 1. step 1 : show cluster 证明,docker 部署的连接是没有问题的。 > 2. step 2: insert 会缓存并重定向,结果重定向的地址是docker内网地址,导致连接不上 -- This message was sent by Atlassian Jira (v8.20.10#820010)