# Trying to use Synthetics but it shows an error on enrollment

**URL:** <https://discuss.elastic.co/t/trying-to-use-synthetics-but-it-shows-an-error-on-enrollment/337915>\
**Category:** Elasticsearch\
**Tags:** docker, fleet\
**Created:** [July 7, 2023, 6:59pm UTC](https://discuss.elastic.co/t/trying-to-use-synthetics-but-it-shows-an-error-on-enrollment/337915 "2023-07-07T18:59:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![igorhodan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igorhodan/32/123214_2.png) [@igorhodan](https://discuss.elastic.co/u/igorhodan)\
**Post date:** [July 7, 2023, 6:59pm UTC](https://discuss.elastic.co/t/trying-to-use-synthetics-but-it-shows-an-error-on-enrollment/337915/1 "2023-07-07T18:59:06Z")

</div>

Hello,

I am trying to use the complete agent as recommended by the docs, for use the browser synthetics, according this post:

> [@\[synthetics\] errors with private location with synthetics browser monitors](https://discuss.elastic.co/t/synthetics-errors-with-private-location-with-synthetics-browser-monitors/327094):
>
> Hi, I am trying to create a monitor using a private location. I am following this [procedure](https://www.elastic.co/guide/en/observability/master/synthetics-private-location.html#synthetics-private-location-fleet-agent) however, when I set up the monitor with the private location from the uptime page in kibana, I get the following error: io:job could not be initialized: browser monitors cannot be created outside the official elastic docker image as additional information I am using fleet server on elastic cloud 8.6 and an elastic agent 8.6 installed in a container in GCP virtual machine . Could you help me? thanks…

Also i have alredy everything configured fine and working, without issues, but its a normal agent, so when i use browser synthetics i receive this error:  
Job could not be initialized: browser monitors cannot be created outside the official elastic docker image

At this time i am running this command to try install the elastic complete agent from the image docker provided on the docs:

```auto
/[root@vps-testes ~]# docker run --env FLEET_ENROLL=1 --env FLEET_URL=https://MYIPHERE:9200 --env FLEET_SERVER_ELASTICSEARCH_CA=/elastic_cert/http_ca.crt --env FLEET_ENROLLMENT_TOKEN=MYTOKENHERE== --env FLEET_INSECURE=1 --cap-add=NET_RAW --cap-add=SETUID --rm docker.elastic.co/beats/elastic-agent-complete:8.8.2 -e
{"log.level":"warn","@timestamp":"2023-07-07T18:44:41.339Z","log.logger":"tls","log.origin":{"file.name":"tlscommon/tls_config.go","file.line":104},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-07-07T18:44:41.682Z","log.origin":{"file.name":"cmd/enroll_cmd.go","file.line":478},"message":"Starting enrollment to URL: https://IPHERE:9200/","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2023-07-07T18:44:41.884Z","log.logger":"tls","log.origin":{"file.name":"tlscommon/tls_config.go","file.line":104},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}
Error: fail to enroll: fail to execute request to fleet-server: status code: 0, fleet-server returned an error: no handler found for uri [/api/fleet/agents/enroll?] and method [POST]
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.8/fleet-troubleshooting.html
Error: enrollment failed: exit status 1
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.8/fleet-troubleshooting.html
[root@vps-testes ~]# 

```

I was also tried used to see more verbose without successfull on verbose logs. Also in the server at /var/log/elasticsearch/elasticsearch.log or elasticsearch\_server.json dont have nothing relevant to this issue.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)\
**Post date:** [July 24, 2023, 1:34pm UTC](https://discuss.elastic.co/t/trying-to-use-synthetics-but-it-shows-an-error-on-enrollment/337915/2 "2023-07-24T13:34:03Z")

</div>

Hi Igor, welcome to the community.

The error message of the `docker` command indicates that the Fleet Server API is not found, are you using the right url for `FLEET_URL`? Fleet Server is started on port 8220 by default, 9200 sounds like Elasticsearch.

---

<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:** [August 21, 2023, 1:34pm UTC](https://discuss.elastic.co/t/trying-to-use-synthetics-but-it-shows-an-error-on-enrollment/337915/3 "2023-08-21T13:34:08Z")

</div>

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