Since this is a production environment, I tried installing fleet by providing my own certificates and this is the error I see:
sudo ./elastic-agent install --url=https://abc:8220 \ -f \ --fleet-server-es=https://xyz:9200 \ --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2Mjk5MjYzMzAxMDA6UmR0cEtYVHRRX0c0bVBTZUJQdGRNZw \ --fleet-server-policy=bcd74e90-0193-11ec-bbdc-613ccb01fbf0 \ --certificate-authorities=/root/fleet-certs/ca.crt \ --fleet-server-es-ca=/etc/elasticsearch/cert.crt \ --fleet-server-cert=/root/fleet-certs/fleet-server.crt \ --fleet-server-cert-key=/root/fleet-certs/fleet-server.key --enrollment-token=SVF0QWZIc0IyN3VtR0hiLWFqdmg6VGhqMVdFYktRc0d2azh6ckhyTEloQQ==
Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:y 2021-08-25T17:19:38.869-0400 INFO cmd/enroll_cmd.go:414 Starting enrollment to URL: https://abc:8220/ 2021-08-25T17:19:38.971-0400 WARN cmd/enroll_cmd.go:425 Remote server is not ready to accept connections, will retry in a moment.
I don't get how is it trying to connect to port 8220 when the command above is intended to install fleet server in the first place. Isn't this command supposed to open the port 8220?
Also a quick note, I am trying to install fleet server on one of my elastic data nodes. Would that be a problem in anyway?