# Error setting up Fleet Server to monitor .NET or JAVA code monitoring using APM feature

**URL:** <https://discuss.elastic.co/t/error-setting-up-fleet-server-to-monitor-net-or-java-code-monitoring-using-apm-feature/309352>\
**Category:** Elastic Agent\
**Created:** [July 11, 2022, 6:10pm UTC](https://discuss.elastic.co/t/error-setting-up-fleet-server-to-monitor-net-or-java-code-monitoring-using-apm-feature/309352 "2022-07-11T18:10:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [July 11, 2022, 6:10pm UTC](https://discuss.elastic.co/t/error-setting-up-fleet-server-to-monitor-net-or-java-code-monitoring-using-apm-feature/309352/1 "2022-07-11T18:10:36Z")

</div>

Hi,  
I want to use APM feature for my .NET or JAVA code monitoring.  
Going through `APM Guide 8.1`, it tells us in order to install APM, we must have below 4 components:  
`APM Agents, Elastic APM Integration, Elasticsearch, Kibana`  
Going through Elastic APM Integration, it tell us that  
`the Elastic Integration runs on Elastic Agent.`  
Which again takes us to `Fleet and Elastic Agent Guide`  
In the Guide, it tells us that there are 2 ways to install `Elastic Agent`  
`Install a Fleet-managed Elastic Agent (Recommended)` and `Install Elastic Agent in standalone mode (advanced users)`  
I choose the recommended step since it is a first time for me.  
It is telling us we need to first install `Fleet Server`  
I followed this link then, since I am a new user: [https://www.elastic.co/guide/en/observability/8.1/ingest-traces.html](https://www.elastic.co/guide/en/observability/8.1/ingest-traces.html)  
Inside Step 1: Set up Fleet  
It is giving us the steps to install Fleet.  
I followed the steps under `Self-managed`

1. Login to Kibana and go to Management\>Fleet\>Settings

2. Under Fleet Server hosts, I gave the fleet url as [https://localhost:8220](https://localhost:8220)  

3. I skipped the 3rd step, since my elasticsearch is running with security enabled.

4. Save and apply the settings.

5. Click the Agents tab and follow the in-product instructions to add a Fleet Server.

6. Using the agent policy as below:  

7. Downloaded the elastic agent which will be used as a Fleet Server:  

8. Chosen the deployment mode for security as below:  

9. Added Fleet Server host as below:  

10. Generated a service token as below:  

11. Tried starting Fleet Server on my windows machine using the command as given below:

---

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [July 13, 2022, 3:55pm UTC](https://discuss.elastic.co/t/error-setting-up-fleet-server-to-monitor-net-or-java-code-monitoring-using-apm-feature/309352/2 "2022-07-13T15:55:47Z")

</div>

Hi, after the last error as mentioned above, I see that the Elastic Agent is installed and running in Windows Service Manager, but the errors are still coming the same in cmd as above and in the Kibana UI, I see it is stuck at:

 ![fleet-server-10](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc303a06ab467b388eb309def135ef682ee881ca.png)

As I understand from the APM Guide 8.1, I need to first install Fleet Server before doing anything else can anybody help me with this.

---

<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 3, 2022, 11:55am UTC](https://discuss.elastic.co/t/error-setting-up-fleet-server-to-monitor-net-or-java-code-monitoring-using-apm-feature/309352/3 "2022-08-03T11:55:51Z")

</div>

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