Of course I already checked the “Accept all SSL certificates” option, but to no avail.
Also I am absolutely certain that the protocol (https), host, port and credentials are correct. I can connect to the Elastic server in a browser or with a Python script with these settings.