# Elastic-agent not respecting the config file parameters

**URL:** <https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898>\
**Category:** Beats\
**Tags:** fleet, elastic-agent\
**Created:** [November 23, 2021, 4:07am UTC](https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898 "2021-11-23T04:07:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [November 23, 2021, 4:07am UTC](https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898/1 "2021-11-23T04:07:57Z")

</div>

Elastic agent doesn't seem to respect the parameters specified in the config file. As per below config, gRPC should bind to 6790. Rather it binds on 6789 (default).

```auto
agent.grpc:
  address: localhost
  port: 6790

```

Here's the open ports for ES agent after running it.

```auto
[elastic-agent.exe]
  TCP 127.0.0.1:6789 127.0.0.1:53942 ESTABLISHED 27460
 [elastic-agent.exe]
  TCP 127.0.0.1:6789 127.0.0.1:53945 ESTABLISHED 27460
 [elastic-agent.exe]
  TCP 127.0.0.1:6789 127.0.0.1:53954 ESTABLISHED 27460
 [elastic-agent.exe]
  TCP 127.0.0.1:6789 127.0.0.1:63411 ESTABLISHED 27460

```

Is this a bug?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [November 23, 2021, 2:56pm UTC](https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898/2 "2021-11-23T14:56:08Z")

</div>

This is a bug. Do you mind opening an issue on GH? [Sign in to GitHub · GitHub](https://github.com/elastic/beats/issues/new)

As a workaround, you can add the same configuration to `fleet.yml`, and it will work.

---

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [November 24, 2021, 12:59pm UTC](https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898/3 "2021-11-24T12:59:11Z")

</div>

Should I report an issue with beats repo? Already raised an issue with [elastic-agent-client](https://github.com/elastic/elastic-agent-client/issues/28).

---

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [November 24, 2021, 1:45pm UTC](https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898/4 "2021-11-24T13:45:15Z")

</div>

> [@Munavir\_Chavody](#):
>
> `63411`

Getting below error while trying to run a second elastic agent process.

`Error: could not start the HTTP server for the API: failed to listen on the named pipe \\.\pipe\elastic-agent: open \\.\pipe\elastic-agent: Access is denied.`

P.S.: I'm not performing install, trying to run two processes using `enroll` and then `run`.

---

<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:** [December 22, 2021, 3:45pm UTC](https://discuss.elastic.co/t/elastic-agent-not-respecting-the-config-file-parameters/289898/5 "2021-12-22T15:45:37Z")

</div>

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