Skip to content

SSH connection issue hostname doesn't match hostname #131

@lightningorb

Description

@lightningorb

This is a totally strange one.

~/.lightning/config

plugin=/home/ubuntu/c-lightning-REST/plugin.js
rest-port=3001
rest-docport=4001
rest-protocol=https
rest-domain=A.B.C.D

Then after starting lightningd, the contents of certs/certificate.pem and certs/access.macaroon are provided to the requests library. It works with workbench however with a hand built setup it says:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
    return request("get", url, params=params, **kwargs)
  File ".../python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File ".../lib/python3.9/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File ".../lib/python3.9/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File ".../lib/python3.9/site-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='A.B.C.D', port=3001): Max retries exceeded with url: /v1/getinfo (Caused by SSLError(CertificateError("hostname 'A.B.C.D' doesn't match 'A.B.C.D'")))

Same issue with rest-domain=localhost.

Clearly a user error, just not sure where to turn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions