# Containerized Fleet Server failing

**URL:** <https://discuss.elastic.co/t/containerized-fleet-server-failing/327875>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [March 16, 2023, 7:09pm UTC](https://discuss.elastic.co/t/containerized-fleet-server-failing/327875 "2023-03-16T19:09:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Johnston](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt_johnston/32/117427_2.png) [@Matt\_Johnston](https://discuss.elastic.co/u/Matt_Johnston)\
**Post date:** [March 16, 2023, 7:09pm UTC](https://discuss.elastic.co/t/containerized-fleet-server-failing/327875/1 "2023-03-16T19:09:47Z")

</div>

Hello. I am trying to run a containerized fleet server. I am running a docker container pulled using this command:

```auto
docker pull docker.elastic.co/beats/elastic-agent:8.6.2

```

But when I run the container I get a number of errors in the logs. Here is a sample of those error messages:

```auto
{"log.level":"error","@timestamp":"2023-03-16T19:00:15.591Z","message":"Fleet Server failed","component":{"binary":"fleet-server","dataset":"elastic_agent.fleet_server","id":"fleet-server-default","type":"fleet-server"},"log":{"source":"fleet-server-default"},"ecs.version":"1.6.0","service.name":"fleet-server","error.message":"EOF","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-03-16T19:00:15.591Z","log.origin":{"file.name":"coordinator/coordinator.go","file.line":857},"message":"Unit state changed fleet-server-default-fleet-server (STARTING->FAILED): Error - EOF","log":{"source":"elastic-agent"},"component":{"id":"fleet-server-default","state":"HEALTHY"},"unit":{"id":"fleet-server-default-fleet-server","type":"input","state":"FAILED","old_state":"STARTING"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-03-16T19:00:15.591Z","log.origin":{"file.name":"coordinator/coordinator.go","file.line":857},"message":"Unit state changed fleet-server-default (STARTING->FAILED): Error - EOF","log":{"source":"elastic-agent"},"component":{"id":"fleet-server-default","state":"HEALTHY"},"unit":{"id":"fleet-server-default","type":"output","state":"FAILED","old_state":"STARTING"},"ecs.version":"1.6.0"}

```

Here is the command I am running to start up the container:

```auto
docker run -e FLEET_SERVER_ENABLE=1 -e FLEET_SERVER_INSECURE_HTTP=true -e FLEET_SERVER_HOST=0.0.0.0 -e FLEET_SERVER_POLICY_ID=fleet-server-policy -e KIBANA_FLEET_SETUP=1 -e ELASTICSEARCH_USERNAME=elastic -e ELASTICSEARCH_PASSWORD=elastic -e KIBANA_HOST=http://ac8500af373d:5601 -e ELASTICSEARCH_HOST=http://facdb24c8cdd:9200 --net elastic --rm docker.elastic.co/beats/elastic-agent:8.6.2

```

When I run the command, Kibana outputs the following log messages:

```auto
[2023-03-16T19:06:59.846+00:00][INFO][plugins.fleet] Beginning fleet setup
[2023-03-16T19:07:00.149+00:00][INFO][plugins.fleet] Fleet setup completed
[2023-03-16T19:07:00.163+00:00][INFO][plugins.fleet] Beginning fleet setup
[2023-03-16T19:07:00.400+00:00][INFO][plugins.fleet] Fleet setup completed

```

And Elasticsearch outputs the following log messages:

```auto
{"@timestamp":"2023-03-16T19:08:09.708Z", "log.level": "WARN", "message":"received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/172.24.0.2:9200, remoteAddress=/172.24.0.4:59480}", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[facdb24c8cdd][transport_worker][T#4]","log.logger":"org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4HttpServerTransport","elasticsearch.cluster.uuid":"YJPezNz-Qs2IeF5WaMieJA","elasticsearch.node.id":"vNvEouvlSIqFVYTixzwEBA","elasticsearch.node.name":"facdb24c8cdd","elasticsearch.cluster.name":"docker-cluster"}

```

Any help trying to understand these errors and why my containerized fleet server is failing would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [March 17, 2023, 3:25am UTC](https://discuss.elastic.co/t/containerized-fleet-server-failing/327875/2 "2023-03-17T03:25:13Z")

</div>

> [@Matt\_Johnston](#):
>
> `received plaintext http traffic on an https channel`

Your elasticsearch is configured to use `https`, but you have something sending data using `http`, so it is rejecting the connection.

> [@Matt\_Johnston](#):
>
> ` -e ELASTICSEARCH_HOST=http://facdb24c8cdd:9200`

I think that this may be the issue, try to use `https://` instead of `http://`

---

<div class="post-metadata">

**Author:** ![Matt\_Johnston](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt_johnston/32/117427_2.png) [@Matt\_Johnston](https://discuss.elastic.co/u/Matt_Johnston)\
**Post date:** [March 17, 2023, 12:53pm UTC](https://discuss.elastic.co/t/containerized-fleet-server-failing/327875/3 "2023-03-17T12:53:03Z")

</div>

Hello. Okay, I changed it to `https`, but now I am receiving the following error when trying to run the fleet server container:

```auto
{"log.level":"error","@timestamp":"2023-03-17T12:49:34.128Z","log.origin":{"file.name":"coordinator/coordinator.go","file.line":857},"message":"Unit state changed fleet-server-default (STARTING->FAILED): Error - x509: certificate signed by unknown authority","log":{"source":"elastic-agent"},"component":{"id":"fleet-server-default","state":"HEALTHY"},"unit":{"id":"fleet-server-default","type":"output","state":"FAILED","old_state":"STARTING"},"ecs.version":"1.6.0"}

```

Any idea about what I can do to fix this error?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 14, 2023, 12:53pm UTC](https://discuss.elastic.co/t/containerized-fleet-server-failing/327875/4 "2023-04-14T12:53:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
