You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/02/02 11:36:42 UTC

[GitHub] [iotdb] a994862495 opened a new issue #2617: 使用Session写入数据时报错

a994862495 opened a new issue #2617:
URL: https://github.com/apache/iotdb/issues/2617


   # 代码
   try {
               session.open();
               List<Object> values = new ArrayList<>();
               List<TSDataType> types = new ArrayList<>();
               ReadTxtPoint readTxtPoint = new ReadTxtPoint();
               org.springframework.core.io.Resource resource = new ClassPathResource("point.txt");
               List<String> pointId = null;
               try {
                   InputStream in = resource.getInputStream();
                   pointId = readTxtPoint.fileReadPoint(in, pointNumber);
                   values.add((Math.random() * 10000) - (Math.random() * 1000));
                   types.add(TSDataType.DOUBLE);
               } catch (IOException e) {
                   e.printStackTrace();
               }
               Long time = 1612260729000L;
               for (int j = 0; j < pointValueNumber; j++) {
                   time += 100;
                   try {
                       session.insertRecord(
                               ioTDBModel.getStorageGroup() + "." + ioTDBModel.getDeviceId(),
                               time,
                               pointId, types, values);
                   } catch (StatementExecutionException e) {
                       e.printStackTrace();
                   }
               }
               session.close();
           } catch (IoTDBConnectionException e) {
               e.printStackTrace();
           }
   
   
   
   # 错误信息控制台
   
   org.apache.iotdb.rpc.StatementExecutionException: 400: null
    at org.apache.iotdb.rpc.RpcUtils.verifySuccess(RpcUtils.java:52)
    at org.apache.iotdb.session.Session.insertRecord(Session.java:597)
    at com.cnpo.clusteriotdb.service.IoTDBServiceImpl.insertValue(IoTDBServiceImpl.java:92)
    at com.cnpo.clusteriotdb.controller.IoTDBController.insertValue(IoTDBController.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
   
   # IoTDB错误信息
   2021-02-02 19:26:49,470 [pool-6-IoTDB-RPC-Client-thread-4] ERROR org.apache.iotdb.db.service.TSServiceImpl:1382 - meet error when insert
   java.nio.BufferUnderflowException: null
    at java.nio.Buffer.nextGetIndex(Buffer.java:506)
    at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:310)
    at org.apache.iotdb.tsfile.utils.ReadWriteIOUtils.readShort(ReadWriteIOUtils.java:473)
    at org.apache.iotdb.db.qp.physical.crud.InsertRowPlan.fillValues(InsertRowPlan.java:360)
    at org.apache.iotdb.db.service.TSServiceImpl.insertRecord(TSServiceImpl.java:1373)
    at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$insertRecord.getResult(TSIService.java:2533)
    at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$insertRecord.getResult(TSIService.java:2513)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:313)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] LebronAl commented on issue #2617: 使用Session写入数据时报错

Posted by GitBox <gi...@apache.org>.
LebronAl commented on issue #2617:
URL: https://github.com/apache/iotdb/issues/2617#issuecomment-790371167


   更新:
   今日之后,现有 master 上的版本中分布式的端口将会与单机版一致,即 6667.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on issue #2617: 使用Session写入数据时报错

Posted by GitBox <gi...@apache.org>.
HTHou commented on issue #2617:
URL: https://github.com/apache/iotdb/issues/2617#issuecomment-772160886


   您好,想请问一下您使用的IoTDB和session 包的版本是哪个?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] a994862495 commented on issue #2617: 使用Session写入数据时报错

Posted by GitBox <gi...@apache.org>.
a994862495 commented on issue #2617:
URL: https://github.com/apache/iotdb/issues/2617#issuecomment-772162754


   老师您好,这边使用IoTDB版本是0.11.1,session的依赖是0.11.2,使用0.11.1的session版本的时候实例化session失败,使用0.11.0的时候可以实例化,但是也会出现rpc:400
   
   
   ------------------&nbsp;原始邮件&nbsp;------------------
   发件人:                                                                                                                        "apache/iotdb"                                                                                    <notifications@github.com&gt;;
   发送时间:&nbsp;2021年2月3日(星期三) 上午10:21
   收件人:&nbsp;"apache/iotdb"<iotdb@noreply.github.com&gt;;
   抄送:&nbsp;"994862495"<994862495@qq.com&gt;;"Author"<author@noreply.github.com&gt;;
   主题:&nbsp;Re: [apache/iotdb] 使用Session写入数据时报错 (#2617)
   
   
   
   
   
    
   您好,想请问一下您使用的IoTDB和session 包的版本是哪个?
    
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] a994862495 closed issue #2617: 使用Session写入数据时报错

Posted by GitBox <gi...@apache.org>.
a994862495 closed issue #2617:
URL: https://github.com/apache/iotdb/issues/2617


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] a994862495 commented on issue #2617: 使用Session写入数据时报错

Posted by GitBox <gi...@apache.org>.
a994862495 commented on issue #2617:
URL: https://github.com/apache/iotdb/issues/2617#issuecomment-781140855


   已解决:问题原因是分布式版本的rpc_port使用的是iotdb-cluster.properties配置文件端口默认55560,单机版的使用的是iotdb-engine.properties默认rpc_port为6667,客户端在单机使用的是6667,集群版本应该使用55560,问题解决。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org