# Journalbeat can't create an alias and fails to work

**URL:** <https://discuss.elastic.co/t/journalbeat-cant-create-an-alias-and-fails-to-work/201875>\
**Category:** Beats\
**Tags:** journalbeat\
**Created:** [October 1, 2019, 11:05pm UTC](https://discuss.elastic.co/t/journalbeat-cant-create-an-alias-and-fails-to-work/201875 "2019-10-01T23:05:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![anderssonjohan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anderssonjohan/32/60037_2.png) [@anderssonjohan](https://discuss.elastic.co/u/anderssonjohan)\
**Post date:** [December 21, 2021, 5:09pm UTC](https://discuss.elastic.co/t/journalbeat-cant-create-an-alias-and-fails-to-work/201875/7 "2021-12-21T17:09:29Z")

</div>

> [@jerrac](#):
>
> AllowEncodedSlashes On

I also tried to fix this in an apache reverse proxy but ended up running the setup command directly without going through apache. After that I no longer saw the HEAD request from heartbeat that returned a 404, followed by the PUT (with strange encoding on the slashes) that returned 405.  
After the setup was done elsewhere the heartbeat agent no longer made these requests and logs in the apache reported 200s when the agent POSTed to `_bulk`

The first request(s):

```auto
"GET _alias/heartbeat-7.11.1 HTTP/1.1" 404
"HEAD heartbeat-7.11.1 HTTP/1.1" 404
"PUT %3Cheartbeat-7.11.1-%7Bnow%2Fd%7D-000001%3E HTTP/1.1" 405

```

After running heartbeat setup elsewhere:

```auto
"GET _alias/heartbeat-7.11.1 HTTP/1.1" 200
"POST _bulk HTTP/1.1" 200

```

To run the setup I used the following command from a location where I could reach ES without going through the Apache server:

```auto
docker run docker.elastic.co/beats/heartbeat:7.11.1 setup -E output.elasticsearch.hosts=["elasticsearchhostname:9200"]

```

Related: [Failed to create alias: \<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"\>](https://discuss.elastic.co/t/failed-to-create-alias-doctype-html-public-ietf-dtd-html-2-0-en/200226)

---

_[View the full topic](https://discuss.elastic.co/t/journalbeat-cant-create-an-alias-and-fails-to-work/201875)._
