You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Xingyu Liu (Jira)" <ji...@apache.org> on 2022/12/08 03:38:00 UTC

[jira] [Commented] (IOTDB-5142) go-client connection reset problem

    [ https://issues.apache.org/jira/browse/IOTDB-5142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644589#comment-17644589 ] 

Xingyu Liu commented on IOTDB-5142:
-----------------------------------

该问题复现成功。
使用代码如下:
{code:go}
package main

import (
	"github.com/apache/iotdb-client-go/client"
)

func main() {
	host := "127.0.0.1"
	port := "6667"
	user := "root"
	password := "root"
	config := &client.Config{
		Host:     host,
		Port:     port,
		UserName: user,
		Password: password,
	}
	session := client.NewSession(config)
	session.Open(false, 0)
	// session.Close()
}
 {code}
{{{}如果调用{}}}session.Close()则一切正常,如果不调用session.Close(),就会导致连接重置。

由于程序结束前未调用关闭接口,服务器连接不上就会尝试重置连接,由于session已经丢失就会连接失败,所以会报错。

想要解决此问题,需要将不再使用的session及时关闭。

 

 

> go-client connection reset problem
> ----------------------------------
>
>                 Key: IOTDB-5142
>                 URL: https://issues.apache.org/jira/browse/IOTDB-5142
>             Project: Apache IoTDB
>          Issue Type: Bug
>          Components: Client/Others
>            Reporter: Xingyu Liu
>            Assignee: Xingyu Liu
>            Priority: Major
>         Attachments: image-2022-12-08-11-07-55-398.png, image-2022-12-08-11-09-00-848.png, image-2022-12-08-11-09-05-286.png
>
>
> 现在有台服务器大量报连接重置
>  !image-2022-12-08-11-07-55-398.png! 
>  !image-2022-12-08-11-09-00-848.png! 
>  !image-2022-12-08-11-09-05-286.png! 
> 问题:go client会在每天0点左右重连,但是其中zoneId参数为空,前几天是0点左右,刚发现了9点也有一条,看来和时间无关



--
This message was sent by Atlassian Jira
(v8.20.10#820010)