# Fleet Server not connecting to Elastic after install, x509 error

**URL:** <https://discuss.elastic.co/t/fleet-server-not-connecting-to-elastic-after-install-x509-error/315560>\
**Category:** Elasticsearch\
**Tags:** docker, fleet\
**Created:** [September 30, 2022, 1:21pm UTC](https://discuss.elastic.co/t/fleet-server-not-connecting-to-elastic-after-install-x509-error/315560 "2022-09-30T13:21:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marchias](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@marchias](https://discuss.elastic.co/u/marchias)\
**Post date:** [September 30, 2022, 1:21pm UTC](https://discuss.elastic.co/t/fleet-server-not-connecting-to-elastic-after-install-x509-error/315560/1 "2022-09-30T13:21:19Z")

</div>

I have deployed two Docker containers for elastic and kibana. Those two are talking to each other and working fine. I am now trying to deploy Fleet Server and have followed all the documentation and the Fleet Server and its integrations will not communicate with the elastic server. I am using self generated certs and I installed the Fleet server with --fleet-server-es-insecure to get the Fleet server to install as I was getting the x509 certificate signed by unknown error. I tried both the method where you don't supply certs for Fleet Server at install and I also used the Elastic utility to generate a new fleet crt and key file and installed that way as well. All installs require the --fleet-server-es-insecure option to work. I added other agents on completely separate hosts and when I look in the agent logs after install using the --insecure option I continue to get x509 errors. What am I missing that I should do for the fleet policy to work after a successful install. I looks like any agent I install will not communicate with the 172.18.0.2:9200 without x509 errors.

With certs:

./elastic-agent install --url=[https://172.18.0.2:8220](https://172.18.0.2:8220)   
--fleet-server-es-insecure   
--fleet-server-es=[https://172.18.0.2:9200](https://172.18.0.2:9200)   
--fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NjQ0OTczNzA1MjI6UXlZZ3Rqa3NTX2l2WVJUY2FHRFlIdw   
--fleet-server-policy=fleet-server-policy   
--certificate-authorities=/usr/share/elasticsearch/ca/ca.crt   
--fleet-server-es-ca=/usr/share/elasticsearch/ca/ca.crt   
--fleet-server-cert=/usr/share/elasticsearch/fleet-server/fleet-server.crt   
--fleet-server-cert-key=/usr/share/elasticsearch/fleet-server/fleet-server.key

Without certs:

./elastic-agent install   
--fleet-server-es-insecure   
--fleet-server-es=[https://172.18.0.2:9200](https://172.18.0.2:9200)   
--fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NjQ1MDkyNTcxNjE6SGNTdW9ueEVSQ2kyZWNPRDI4aUptZw   
--fleet-server-policy=fleet-server-policy

---

<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:** [October 28, 2022, 1:21pm UTC](https://discuss.elastic.co/t/fleet-server-not-connecting-to-elastic-after-install-x509-error/315560/2 "2022-10-28T13:21:25Z")

</div>

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