# Cannot write to a field alias \[agent.hostname\]

**URL:** <https://discuss.elastic.co/t/cannot-write-to-a-field-alias-agent-hostname/362019>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [June 25, 2024, 11:44am UTC](https://discuss.elastic.co/t/cannot-write-to-a-field-alias-agent-hostname/362019 "2024-06-25T11:44:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhagt](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@bhagt](https://discuss.elastic.co/u/bhagt)\
**Post date:** [June 25, 2024, 11:44am UTC](https://discuss.elastic.co/t/cannot-write-to-a-field-alias-agent-hostname/362019/1 "2024-06-25T11:44:28Z")

</div>

Hi,

I encounter the following error during installation of packetbeat:

{"type":"mapper\_parsing\_exception","reason":"failed to parse","caused\_by":{"type":"illegal\_argument\_exception","reason":"Cannot write to a field alias [agent.hostname]."}

using:  
Name : packetbeat  
Version : 7.7.0  
Release : 1  
Architecture: x86\_64  
Install Date: (not installed)  
Group : default  
Size : 58606542  
License : ASL-2.0  
Signature : RSA/SHA512, Tue 12 May 2020 06:52:33 AM CEST, Key ID d27d666cd88e42b4  
Source RPM : packetbeat-7.7.0-1.src.rpm  
Build Date : Tue 12 May 2020 02:41:55 AM CEST  
Build Host : 88766214fc4c  
Relocations : /  
Packager : \<@88766214fc4c\>  
Vendor : Elastic  
URL : [Packetbeat: Network Analytics Using Elasticsearch | Elastic](https://www.elastic.co/products/beats/packetbeat)  
Summary : Packetbeat analyzes network traffic and sends the data to Elasticsearch.  
Description :  
Packetbeat analyzes network traffic and sends the data to Elasticsearch.

with AWS opensearch OpenSearch\_2\_3\_R20240502-P2

Regards,

---

<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:** [June 25, 2024, 11:44am UTC](https://discuss.elastic.co/t/cannot-write-to-a-field-alias-agent-hostname/362019/2 "2024-06-25T11:44:29Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance. See [What is OpenSearch and the OpenSearch Dashboard? | Elastic](https://www.elastic.co/elasticsearch/opensearch) for more details.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![bhagt](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@bhagt](https://discuss.elastic.co/u/bhagt)\
**Post date:** [June 25, 2024, 11:56am UTC](https://discuss.elastic.co/t/cannot-write-to-a-field-alias-agent-hostname/362019/3 "2024-06-25T11:56:43Z")

</div>

Removed #opensearch
