Skip to content

HTTP protocol has unexpected EOF error #846

Open
@hantmac

Description

@hantmac

Issue description

Tell us what should happen and what happens instead

Example code

package main

import (
	"fmt"
	"github.com/databendcloud/databend-go2"
	"time"
)

func main() {
	conn := clickhouse.OpenDB(&clickhouse.Options{
		Addr: []string{"127.0.0.1:8124"},
		Auth: clickhouse.Auth{
			Database: "default",
			Username: "root",
			Password: "pass",
		},
		Settings: clickhouse.Settings{
			"max_execution_time": 60,
		},
		DialTimeout: 5 * time.Second,
		Compression: &clickhouse.Compression{
			Method: clickhouse.CompressionGZIP,
		},
		Protocol: clickhouse.HTTP,
	})
	res, err := conn.Exec("show tables")
	if err != nil {
		fmt.Printf("err is %v\n", err)
	}
	fmt.Println(res)
}

Error log

err is bytes: raw: read str: unexpected EOF

Configuration

OS:
Mac os

Interface:
HTTP

Driver version:
The newest version.

Go version: run go version in your console
go version go1.18.2 darwin/arm64

ClickHouse Server version:
clickhouse/clickhouse-server:latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions