When custom port is specified, elasticsearch host assumes http even if secure = true

Description

A user ran into an issue which can be roughly described as:

"We need to provide a scheme, because otherwise http is used even if secure = true"

So a config like this:

will try http. If https://myhost:9201 is used, it will work.

Note that there is a check which checks the reverse (so if secure is false, but https is used), but not the other way round.

Cursory inspection of https://github.com/couchbase/couchbase-elasticsearch-connector/blob/4.2.0/src/main/java/com/couchbase/connector/config/ConfigHelper.java#L70 suggests that HttpHost will default to HTTP scheme if not explicitly provided, but it should use https if secure = true .. and/or some sanity check?

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created November 3, 2020 at 3:05 PM
Updated November 4, 2020 at 11:03 PM
Resolved November 4, 2020 at 11:03 PM
Instabug