elogrus找不到活动的连接

I'm using elasticsearch, kibana on docker, and Go.

time="2019-09-17T09:52:02+08:00" level=panic msg="no active connection found: no Elasticsearch node available" panic: (*logrus.Entry) (0x736fe0,0xc000136150)

import (
"github.com/olivere/elastic/v7"
"github.com/sirupsen/logrus"
"gopkg.in/sohlich/elogrus.v7"
)

func main() {
 log := logrus.New()
 client, err := elastic.NewClient(elastic.SetURL("http://localhost:9200"))
if err != nil {
    log.Panic(err)
}
 hook, err := elogrus.NewAsyncElasticHook(client, "localhost", logrus.DebugLevel, "mylog")
 if err != nil {
    log.Panic(err)
}
 log.Hooks.Add(hook)

 log.WithFields(logrus.Fields{
    "name": "joe",
    "age":  42,
 }).Error("Hello world!")
}

This is the package I'm using https://github.com/sohlich/elogrus

enter image description here