OpenWeatherMap behind a proxy

Hello everyone,
my OpenHAB installation runs behind a proxy. I configured the proxy host and port in setenv.bat:

  -Djava.awt.headless=true ^
  -Dhttp.proxyPort=8080 ^

I think, that works for me, because OpenHAB can download bindings from internet.

Sadly OpenWeatherMap stays offline and shows an COMMUNICATION_ERROR. A look into the log file brings to light that the OpenWeatherMap request generates a timeout:

16:24:53.780 [DEBUG] [enWeatherMapWeatherAndForecastHandler] - Initialize OpenWeatherMapWeatherAndForecastHandler handler 'openweathermap:weather-and-forecast:api:hamburg'.
16:24:53.780 [DEBUG] [enWeatherMapWeatherAndForecastHandler] - Rebuilding thing 'openweathermap:weather-and-forecast:api:hamburg'.
16:25:08.771 [DEBUG] [enWeatherMapWeatherAndForecastHandler] - Update weather and forecast data of thing 'openweathermap:weather-and-forecast:api:hamburg'.
16:25:08.771 [TRACE] [l.connection.OpenWeatherMapConnection] - OpenWeatherMap request: URL = '*****&lon=*****&units=metric&lang=de&lat=*****'
16:25:08.802 [DEBUG] [enWeatherMapWeatherAndForecastHandler] - Update weather and forecast data of thing 'openweathermap:weather-and-forecast:api:hamburg'.
16:25:18.786 [DEBUG] [l.connection.OpenWeatherMapConnection] - Exception occurred during execution: Total timeout 10000 ms elapsed
java.util.concurrent.TimeoutException: Total timeout 10000 ms elapsed
        at org.eclipse.jetty.client.HttpDestination$TimeoutTask.onTimeoutExpired( ~[?:?]
        at$ ~[?:?]

It looks like the jetty client runs in a timeout, even through the requested url is correct. If I use this url in my browser with the apikey and location, the JSON response is plausible.

My question is: Uses the jetty client the proxy from the JVM environment or do I have to configure the jetty client proxy separatly by myself? Or is jetty ignoring the proxy in general?


Any solution here? I have the same problem…


as I am currently struggling with the same problem I am curious whether anyone found a solution for this.
All my bindings are running fine except for the openweathermap-binding or any http-binding requesting data from the internet.

They are all running in a timeout and I don’t have any idea how to get this to work. The system itself has internet access (openhabian 3.1.0 on a Raspberry Pi 4 Model B Rev 1.1) but those bindings which are using jetty don’t get any information from the internet.

Help is much appreciated.