# Elastic-agent fails "enroll\_cmd.go:776	Fleet Server - Error - EOF"

**URL:** <https://discuss.elastic.co/t/elastic-agent-fails-enroll-cmd-go-776-fleet-server-error-eof/293779>\
**Category:** Beats\
**Tags:** fleet\
**Created:** [January 7, 2022, 8:22pm UTC](https://discuss.elastic.co/t/elastic-agent-fails-enroll-cmd-go-776-fleet-server-error-eof/293779 "2022-01-07T20:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevebanik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevebanik/32/100001_2.png) [@stevebanik](https://discuss.elastic.co/u/stevebanik)\
**Post date:** [January 7, 2022, 8:22pm UTC](https://discuss.elastic.co/t/elastic-agent-fails-enroll-cmd-go-776-fleet-server-error-eof/293779/1 "2022-01-07T20:22:04Z")

</div>

[root@es1 elastic-agent-7.16.2-linux-x86\_64]# uname -a  
Linux es1 3.10.0-1160.49.1.el7.x86\_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86\_64 x86\_64 x86\_64 GNU/Linux  
[root@es1 elastic-agent-7.16.2-linux-x86\_64]# ./elastic-agent install --fleet-server-es=http://10.128.0.12:9200 --fleet-server-service-token= --fleet-server-policy= --fleet-server-insecure-http  
Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:y  
2022-01-07T20:17:21.775Z INFO cmd/enroll\_cmd.go:776 Fleet Server - Error - EOF

---

<div class="post-metadata">

**Author:** ![MichelLaterman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michellaterman/32/110221_2.png) [@MichelLaterman](https://discuss.elastic.co/u/MichelLaterman)\
**Post date:** [January 20, 2022, 5:09pm UTC](https://discuss.elastic.co/t/elastic-agent-fails-enroll-cmd-go-776-fleet-server-error-eof/293779/2 "2022-01-20T17:09:34Z")

</div>

I think you're missing the `--fleet-server-es-inscure` flag (ref: [Elastic Agent command reference | Fleet and Elastic Agent Guide [7.16] | Elastic](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#_options_2))

---

<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:** [February 17, 2022, 7:09pm UTC](https://discuss.elastic.co/t/elastic-agent-fails-enroll-cmd-go-776-fleet-server-error-eof/293779/3 "2022-02-17T19:09:38Z")

</div>

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