# Upgrade Error: Cannot write to a field alias \[host.hostname\]

**URL:** <https://discuss.elastic.co/t/upgrade-error-cannot-write-to-a-field-alias-host-hostname/286543>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 12, 2021, 7:50pm UTC](https://discuss.elastic.co/t/upgrade-error-cannot-write-to-a-field-alias-host-hostname/286543 "2021-10-12T19:50:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_ek](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@Karthik\_ek](https://discuss.elastic.co/u/Karthik_ek)\
**Post date:** [October 12, 2021, 7:50pm UTC](https://discuss.elastic.co/t/upgrade-error-cannot-write-to-a-field-alias-host-hostname/286543/1 "2021-10-12T19:50:44Z")

</div>

Hi,

Can you please help here. I'm getting error after upgrading from filebeat 6.8.6 to filebeat 7.9.2.

I see the below error in the logs folder:  
**Cannot write to a field alias [host.hostname]**

2021-10-12T10:34:28.800-0400 WARN [Elasticsearch] Elasticsearch/client.go:407 Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Time{wall:0xc051851cee3123c3, ext:232092920395037, loc:(\*time.Location)(0x607ff60)}, Meta:null, Fields:{"agent":{"ephemeral\_id":"fae97d31-7b21-42e0-91fb-f32e085d0d6f","hostname":"_ **masked** _","id":"bd73ad37-acca-4c3c-8cc5-faef7ea19241","name":"_ **masked** _","type":"filebeat","version":"7.9.2"},"ecs":{"version":"1.5.0"},"fields":{"type":"_ **masked** _"},"host":{"architecture":"x86\_64","containerized":false,"hostname":"_ **masked** _","id":"b05d54dab44b427880e60fa36613f5ea","ip":["_ **masked** _"],"mac":["_ **masked** _"],"name":"_ **masked** _","os":{"codename":"Maipo","family":"redhat","kernel":"3.10.0-1160.36.2.el7.x86\_64","name":"Red Hat Enterprise Linux Server","platform":"rhel","version":"7.9 (Maipo)"}},"input":{"type":"log"},"log":{"file":{"path":"/app\_home/logs/log-file-name.2021-10-12.2.log"},"offset":13885800},"message":"_ **masked** _"}, Private:file.State{Id:"native::201345283-64770", PrevId:"", Finished:false, Fileinfo:(\*os.fileStat)(0xc0012cad00), Source:"/app\_home/logs/log-file-name.2021-10-12.2.log", Offset:13886008, Timestamp:time.Time{wall:0xc05180484080fb49, ext:227146153875712, loc:(\*time.Location)(0x607ff60)}, TTL:-1, Type:"log", Meta:map[string]string(nil), FileStateOS:file.StateOS{Inode:0xc004903, Device:0xfd02}, IdentifierName:"native"}, TimeSeries:false}, Flags:0x1, Cache:publisher.EventCache{m:common.MapStr(nil)}} (status=400): {"type":"mapper\_parsing\_exception","reason":"failed to parse","caused\_by":{"type":"illegal\_argument\_exception","reason":"Cannot write to a field alias [host.hostname]."}}

Thanks in advance!

---

<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:** [November 9, 2021, 9:51pm UTC](https://discuss.elastic.co/t/upgrade-error-cannot-write-to-a-field-alias-host-hostname/286543/2 "2021-11-09T21:51:43Z")

</div>

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