Hello everyone,
my OpenHAB installation runs behind a proxy. I configured the proxy host and port in setenv.bat:
set EXTRA_JAVA_OPTS=-XX:+UseG1GC ^
-Djava.awt.headless=true ^
-Dhttp.proxyHost=10.***.***.***^
-Dhttp.proxyPort=8080 ^
-Dhttps.proxyHost=10.***.***.***^
-Dhttps.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 = 'https://api.openweathermap.org/data/2.5/weather?appid=*****&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(HttpDestination.java:515) ~[?:?]
at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:271) ~[?:?]
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?
Regards,
Thomas