Importing My Letsencrypt SSL Certificates

I have been trying to import my letsencrypt SSL certificates into Openfire, I have used this script keytool -import -keystore keystore -alias perthdronephotos.com -file cert.pem

it created the file then I copied it into the /etc/openfire/security directory and sudo chown -R openfire:openfire keystore so openfire could access it. It all seemed to change over without any errors until I tried to login to the https admin console of my site and it would open, I had to access it via the IP address or the http site, I changed everything back to the original and it is working fine again just saying site is unsecure with a red line through https. I hope someone can help me get this sorted

There are 4 .pem files within my letsencrypt directory they are

cert.pem

chain.pem

fullchain.pem

privkey.pem

I think you need to import the fullchain.pem, so that the intermediate is included

I imported with keytool the fullchain.pem certificate but after I start openfire I’m not able anymore to connect with my jabber client giving the error “Failed SSL Handshake”.

Is there anything I need to check to understand why it’s happening?