Icalendar binding: General SSLEngine problem

  • Platform information:
    • Hardware: CPUArchitecture/RAM/storage
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version:
      ###############################################################################
      ############### openhab #####################################################
      ###############################################################################
      ## Ip = 192.168.XXX.YYY
      ## Release = Raspbian GNU/Linux 10 (buster)
      ## Kernel = Linux 5.4.51-v7l+
      ## Platform = Raspberry Pi 4 Model B Rev 1.2
      ## Uptime = 1 day(s). 1:13:15
      ## CPU Usage = 0.25% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
      ## CPU Load = 1m: 0.12, 5m: 0.11, 15m: 0.09
      ## Memory = Free: 0.30GB (8%), Used: 3.47GB (92%), Total: 3.78GB
      ## Swap = Free: 2.58GB (100%), Used: 0.00GB (0%), Total: 2.58GB
      ## Root = Free: 4.40GB (32%), Used: 9.31GB (68%), Total: 14.32GB
      ## Updates = 0 apt updates available.
      ## Sessions = 0 session(s)
      ## Processes = 134 running processes of 32768 maximum processes
      ###############################################################################

icalendar-binding 2.5.8. and 2.5.9.202009171220 installed
configuration:
URL for calendar:

https://192.168.XXX.XXX/remote.php/dav/calendars/openhab/pinneberg_shared_by_XXXXX/

user:openhab
password:passwd

Calendar used is nextcloud

I copied the certificate to openhab and installed it to the ca-certificates using

sudo update-ca-certificates

I also installed it in the keystore using

keytool -importcert -file nextcloud.crt -keystore keystore -alias “XXXXXXXX”

restarted openhab

sudo systemctl restart openhab2

Switched the debug mode for the binding in karaf:

log:set DEBUG org.openhab.binding.icalendar

and get following error messages:

2020-09-17 17:40:54.020 [WARN ] [g.icalendar.internal.handler.PullJob] - Response for calendar request could not be retrieved. Error message is: javax.net.ssl.SSLHandshakeException: General SSLEngine problem

2020-09-17 17:42:54.086 [WARN ] [g.icalendar.internal.handler.PullJob] - Response for calendar request could not be retrieved. Error message is: java.io.EOFException: HttpConnectionOverHTTP@1c2e57a::DecryptedEndPoint@8772d8{/192.168.XXX.XXX:443<->/192.168.XXX.YYY:49468,CLOSED,fill=-,flush=C,to=1/0}

the calendar stays offline, since the binding is not downloading calendar entries.
I am lost
Thanks for help
Georg

That looks fairly rough.

Thanks for the hint.
I have now rebooted and the memory is now:

## Memory = Free: 2.68GB (71%), Used: 1.10GB (29%), Total: 3.78GB
## Swap = Free: 2.58GB (100%), Used: 0.00GB (0%), Total: 2.58GB
## Root = Free: 4.61GB (33%), Used: 9.09GB (67%), Total: 14.32GB

The error message on icalendar is still the same.
Georg

I can’t provide a lot of specifics to help but I think I can point you in the right direction.

openHAB is a Java application and as such, it has it’s own way to manage certificates. Put another way, adding the CA cert to your operating system, as you described above, will have no affect on openHAB. You need to search for how to add that cert to the truststore used by the Java that is running openHAB.

Thanks Rich,
I thought the certificates for openhab are installed in the keystore. keystore is located in /var/lib/openhab2/etc.
I checked the keystore - using

keytool -list -keystore keystore

the nextcloud certificate is installed:

nextcloud, 18.09.2020, trustedCertEntry,
Zertifikat-Fingerprint (SHA1): 47:ED:7D:89:31:59:3C:2…

Is there any other path where to install the certificate?
Regards Georg

If that isn’t working than you need to look for the Java Virtual Machine’s keystore. I don’t know where that is located and there are a specific set of tools to use to add something to it. I don’t really have any more knowledge than that to offer.