HABPanel Widget Gallery

Looks like another TLS issue: first try running curl https://community.openhab.org/tags/c/apps-services/habpanel/widgetgallery.json
on your openHAB machine, if you do get the same error either try upgrading your JRE like @Dr_Kuebel did here:

Or follow these steps (including the Java part): [Techy] Getting cURL to work with Let’s Encrypt: unable to get local issuer certificate error – Richy's Random Ramblings

this is great, thanks. :slight_smile:

Hello, I just updated my version of OpenHAB from 2.1.0 to 2.2.0-SNAPSHOT. When I open HABPanel, I see the Get More under Custom Widgets but when I click on it I get the following error:

Error: java.lang.IllegalStateException

Here’s the details of my setup:

openjdk version “1.8.0_151”
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK Client VM (build 25.151-b12, mixed mode)
Linux version 4.4.38-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #938 SMP Thu Dec 15 15:22:21 GMT 2016

HABPanel
ui-habpanel - 2.2.0.SNAPSHOT

Any suggestions would be appreciated.

Huh, no clue. :frowning:
If you go directly to http://openhab:8080/rest/habpanel/gallery/community/widgets (change the host as necessary), is there more info about the error? Also do you have anything in the openHAB logs?

Nothing is showing up in the openHAB logs unfortunately. When I go directly to the link you provided I receive the following:
{"error":{"message":"java.lang.IllegalStateException","http-code":500,"exception":{"class":"javax.net.ssl.SSLException","message":"java.lang.IllegalStateException","localized-message":"java.lang.IllegalStateException","cause":"javax.net.ssl.SSLException"}}}

I’m using Build #1096 at the moment.

I’ve tried to set logging in Karaf to DEBUG but my Raspberry PI wasn’t handling it well.

I just noticed you’re using OpenJDK as your JRE, which is not recommended for running openHAB (see: http://docs.openhab.org/installation/index.html#prerequisites).

You should install Zulu or Oracle Java as mentioned - that might fix the problem you’re having, and your openHAB instance will probably run better too.

That was it!!! Thank you much!

Hi!

From where do i download or install the widget galeery

Regards,
Samir

Hi
I get an error message
Error: Received fatal alert: handshake_failure
someone who knows why?

uses this java version

openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25,152-b76, mixed mode, evaluation)

openhab 2.2

Hi All

can someone help me? When i want to install new widgets from gallery a get error:

java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

I’m using Ubuntu 18.04.01 and latest OH2

I was trying to fix this problem with solution proposed from Ubuntu support but it didn’t help.

Everything is fine now. It was necessary to restart the computer. My bad.

Sorry if I revive an old thread, but for anyone with SSL problems, you are probably missing the let’s encrypt certificates in your java keystore.
I recently installed openhabian on my pi and got the

{“error”:{“message”:“java.lang.IllegalStateException”,“http-code”:500,“exception”: {“class”:“javax.net.ssl.SSLException”,“message”:“java.lang.IllegalStateException”,“localized-message”:“java.lang.IllegalStateException”,“cause”:“javax.net.ssl.SSLException”}}}

error, so I’m probably not the only one that even now still bumps into this problem.

I got it fixed and made the following list of steps.

How to import the Let’s Encrypt certificates in the Java truststore:

  1. Save https://letsencrypt.org/certs/isrgrootx1.pem.txt as letsencrypt-root.pem
  2. Save https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem.txt as letsencrypt-int-1.pem
  3. Save https://letsencrypt.org/certs/letsencryptauthorityx3.pem.txt as letsencrypt-int-2.pem
  4. Use WinSCP (WinSCP :: Official Site :: Download) or similar and place the 3 files in /home
  5. SSH into your raspberry with Putty (https://putty.org/) or similar
  6. Navigate to /home:

cd /home

  1. Transform the .pem certificates in .der ones: `

sudo openssl x509 -in letsencrypt-root.pem -inform pem -out letsencrypt-root.der -outform der
sudo openssl x509 -in letsencrypt-int-1.pem -inform pem -out letsencrypt-int-1.der -outform der
sudo openssl x509 -in letsencrypt-int-2.pem -inform pem -out letsencrypt-int-1.der -outform der

  1. Locate Java truststore and keep the path in an environment variable for easy re-use:

JAVA_TRUSTSTORE=$(sudo find / -wholename *jre/lib/security/cacerts)

  1. Import the .der certificates into the Java trustore :
    (do NOT change the changeit password, this is the default one and I’m pretty sure you haven’t changed it)

sudo keytool -importcert -alias letsencrypt_root -keystore $JAVA_TRUSTSTORE -storepass changeit -file letsencrypt-root.der
-
sudo keytool -importcert -alias letsencrypt_int_1 -keystore $JAVA_TRUSTSTORE -storepass changeit -file letsencrypt-int-1.der
-
sudo keytool -importcert -alias letsencrypt_int_2 -keystore $JAVA_TRUSTSTORE -storepass changeit -file letsencrypt-int-2.der

  1. Test if the certificates are added, you should see them outputted:
    (Again, do not change the changeit password)

keytool -keystore $JAVA_TRUSTSTORE -storepass changeit -list | grep letsencrypt

  1. Restart Openhab, a fresh java process is needed:

sudo service openhab2 restart

I hope this could help!

1 Like

This is great @rdhaese
Could you publish this again in it’s own thread under the solution category
with a relevant title

It will make it much easier to find in a forum search, thanks

Thanks that you like it.

The new topic:

I hope I created it in the right place and stuff, I’m still new to the forum and frankly, this is the first time I’m getting engaged with a community. I don’t want to do anything the wrong way :wink:

2 Likes

Hello, I have a proxy (HTTP/HTTPS) the HABPanel widget-gallerie has to use to connect to the internet. I have configured it on my Raspi Pi 4B for OpenHAB 3.4.4 and curl. Both is working well and using the proxy. But I was not able to find any configuration for HABPanel. Therefore I recieve following error message when I try to connect:
Fehler: {“data”:{“cause1”:“java.net.ConnectException: Die Wartezeit für die Verbindung ist abgelaufen (Connection timed out)”,“servlet”:“cxf-servlet”,“cause0”:“org.apache.cxf.interceptor.Fault: Die Wartezeit für die Verbindung ist abgelaufen (Connection timed out)”,“message”:“org.apache.cxf.interceptor.Fault: Die Wartezeit für die Verbindung ist abgelaufen (Connection timed out)”,“url”:“/rest/habpanel/gallery/community/widgets”,“status”:“500”},“status”:500,“config”:{“method”:“GET”,“transformRequest”:[null],“transformResponse”:[null],“url”:“/rest/habpanel/gallery/community/widgets”,“headers”:{“Accept”:“application/json, text/plain, /”}},“statusText”:“Server Error”}

the main error message is “Connection timed out”. Which of course make sense. Using wireshark I see that HABPanel is trying to connect directly to community.openhab.org at 46.101.248.207 and port 443.
Is there any possibility to configure HABPanel to use the proxy like it is possible with openHAB?

Many thanks.