# Metricbeat activemq & jolokia modules error (using HTTP when HTTPS specified)

**URL:** <https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992>\
**Category:** Beats\
**Created:** [June 5, 2020, 5:33pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992 "2020-06-05T17:33:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don-cloud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/don-cloud/32/69838_2.png) [@Don-cloud](https://discuss.elastic.co/u/Don-cloud)\
**Post date:** [June 5, 2020, 5:33pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/1 "2020-06-05T17:33:13Z")

</div>

Hi,

## I have turned on these two modules in activemq server (version 5.15.9). jolokia is enabled by default on HTTPS port. i am seeing that, even after clearly specifying on activemq.yml and jolokia.yml the value of host with [HTTPS://serverip:8162](HTTPS://serverip:8162) , the beat is trying to POST using HTTP protocol.

```
Error fetching data for metricset activemq.topic: error making http request: Post http://xxxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false: EOF

```

2020-06-05T13:25:27.453-0400 INFO module/wrapper.go:252 Error fetching data for metricset activemq.broker: error making http request: Post [http://xxxxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false:](http://xxxxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false:) EOF  
2020-06-05T13:25:27.453-0400 INFO module/wrapper.go:252 Error fetching data for metricset activemq.queue: error making http request: Post [http://xxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false:](http://xxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false:) EOF

* * *

activemq.yml  
Docs: [https://www.elastic.co/guide/en/beats/metricbeat/7.6/metricbeat-module-activemq.html](https://www.elastic.co/guide/en/beats/metricbeat/7.6/metricbeat-module-activemq.html)

- module: activemq  
metricsets: ['broker', 'queue', 'topic']  
period: 10s  
hosts: ['[https://xxx.com:8162](https://xxx.com:8162)']  
path: '/api/jolokia/?ignoreErrors=true&canonicalNaming=false'  
.2020-06-05T14:36:41.202-0400 INFO module/wrapper.go:252 Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 Not Found  
.  
.  
-.

* * *

please help.

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [June 5, 2020, 6:24pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/2 "2020-06-05T18:24:19Z")

</div>

Hi @Don-cloud,

Welcome to the Elastic community forums!

I just tried this with building Metricbeat from the `master` branch and I'm unable to reproduce this. I see `https` being used in the URL. Could you tell us your Metricbeat version please?

Thanks,

Shaunak

---

<div class="post-metadata">

**Author:** ![Don-cloud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/don-cloud/32/69838_2.png) [@Don-cloud](https://discuss.elastic.co/u/Don-cloud)\
**Post date:** [June 5, 2020, 6:32pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/3 "2020-06-05T18:32:27Z")

</div>

metricbeat version 7.6.2  
i have updated the error log, up in original post to put more details  
2020-06-05T14:36:41.202-0400 INFO module/wrapper.go:252 Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 Not Found

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [June 5, 2020, 6:51pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/4 "2020-06-05T18:51:49Z")

</div>

Thanks. I was indeed able to reproduce this locally with Metricbeat 7.6.2. However, I also tried with the next release — Metricbeat 7.7.0 — and this problem seems to have been fixed in it. So you might want to give that a try.

Shaunak

---

<div class="post-metadata">

**Author:** ![Don-cloud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/don-cloud/32/69838_2.png) [@Don-cloud](https://discuss.elastic.co/u/Don-cloud)\
**Post date:** [June 5, 2020, 7:34pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/5 "2020-06-05T19:34:24Z")

</div>

will metricbeat 7.7.0 can communicate to elastic version 7.6.2?

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [June 5, 2020, 7:49pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/6 "2020-06-05T19:49:44Z")

</div>

We strongly recommend you run the entire Elastic Stack on the same version but I can't think of a reason why Metricbeat 7.7.0 wouldn't work against Elasticsearch 7.6.2.

Shaunak

---

<div class="post-metadata">

**Author:** ![Don-cloud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/don-cloud/32/69838_2.png) [@Don-cloud](https://discuss.elastic.co/u/Don-cloud)\
**Post date:** [June 6, 2020, 4:58pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/7 "2020-06-06T16:58:17Z")

</div>

i upated metricbeat to 7.7.1.  
i am not getting the error on activemq.  
I am still getting the error on jolokia though.  
2020-06-06T12:56:30.682-0400 INFO module/wrapper.go:259 Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 Not Found

---------- jolokia.yml

# Module: jolokia

# docs

- module: jolokia  
metricsets: ["jmx"]  
period: 10s  
hosts: ["[https://xxxxxx.com:8162](https://xxxxxx.com:8162)"]  
namespace: "metrics"

# path: "api/jolokia"

username: "xxxx"  
password: "xxxx"  
jmx.mappings:  
- mbean: 'java.lang:type=Runtime'  
attributes:  
- attr: Uptime  
field: uptime  
#- mbean: 'java.lang:type=Memory'  
# attributes:  
# - attr: HeapMemoryUsage  
# field: memory.heap\_usage  
# - attr: NonHeapMemoryUsage  
# field: memory.non\_heap\_usage  
# GC Metrics - this depends on what is available on your JVM  
#- mbean: 'java.lang:type=GarbageCollector,name=ConcurrentMarkSweep'  
# attributes:  
# - attr: CollectionTime  
# field: gc.cms\_collection\_time  
# - attr: CollectionCount  
# field: gc.cms\_collection\_count

jmx.application:  
jmx.instance:

---

<div class="post-metadata">

**Author:** ![Don-cloud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/don-cloud/32/69838_2.png) [@Don-cloud](https://discuss.elastic.co/u/Don-cloud)\
**Post date:** [June 6, 2020, 5:37pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/8 "2020-06-06T17:37:54Z")

</div>

this seems to be working. there was a typo, slash before api/jolokia

---

<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:** [July 4, 2020, 7:38pm UTC](https://discuss.elastic.co/t/metricbeat-activemq-jolokia-modules-error-using-http-when-https-specified/235992/9 "2020-07-04T19:38:01Z")

</div>

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