# Error while using ssl with basic authorization

**URL:** <https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839>\
**Category:** Beats\
**Tags:** beats-module, metricbeat\
**Created:** [December 16, 2020, 10:33am UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839 "2020-12-16T10:33:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![loker](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@loker](https://discuss.elastic.co/u/loker)\
**Post date:** [December 16, 2020, 10:33am UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839/1 "2020-12-16T10:33:52Z")

</div>

Hello,

Here is my config:

```auto
- module: couchdb
  metricsets: ["server"]
  period: 10s
  hosts: ["https://xxx.xxxx.xxx.xxx:6984/_node/_local/_stats"]
  ssl.verification_mode: "none"
  username: xxxxx
  password: xxxxx

```

I would get this error:

```auto
couchdb...
  server...
    error... ERROR error trying to get CouchDB version. Retrying on next fetch...: cannot start CouchDB metricbeat module: error trying to do GET request to couchdb: Get "http://xxxxx:***@xxx.xxx.xxx.xxx:6984": EOF

```

It could see that the protocol has became http but https.  
If i didn't assign username nor password, it would show 401 Unauthorized.

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [December 22, 2020, 10:53am UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839/2 "2020-12-22T10:53:08Z")

</div>

Hi @loker 🙂

Which is your couchdb version? You are using port `6984` instead of `5986`, is that correct? Checking docs it seems also that you should use port `5984` when using a full path to access your metrics [https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-couchdb.html#\_compatibility\_13](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-couchdb.html#_compatibility_13)

---

<div class="post-metadata">

**Author:** ![loker](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@loker](https://discuss.elastic.co/u/loker)\
**Post date:** [December 23, 2020, 6:06am UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839/3 "2020-12-23T06:06:58Z")

</div>

Hi @Mario_Castro,

Thanks for your reply,  
I use couchdb 3.0.0 and i enable its ssl feature in 6984 port.

> **[How Do I Configure SSL (HTTPS) in CouchDB? - Apache CouchDB - Apache Software...](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=48203146)**

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [December 23, 2020, 12:51pm UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839/4 "2020-12-23T12:51:12Z")

</div>

Did you also check this? [https://www.elastic.co/guide/en/beats/filebeat/current/configuration-ssl.html](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-ssl.html)

---

<div class="post-metadata">

**Author:** ![loker](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@loker](https://discuss.elastic.co/u/loker)\
**Post date:** [December 24, 2020, 9:19am UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839/5 "2020-12-24T09:19:58Z")

</div>

Hi @Mario_Castro,

I thought couchdb module is used to collect statistics data as its input  
and i did not use ssl on my monitor es cluster output.  
I know it could not redirect https call to http, but i think this is not this case.

My problem is that i tell couchdb module to use `https` but it turn into `http` with specifying username and password.

---

<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:** [January 21, 2021, 11:20am UTC](https://discuss.elastic.co/t/error-while-using-ssl-with-basic-authorization/258839/6 "2021-01-21T11:20:11Z")

</div>

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