# OpenWeatherMap behind a proxy

**URL:** <https://community.openhab.org/t/openweathermap-behind-a-proxy/66113>\
**Category:** Bindings\
**Tags:** openweathermap\
**Created:** [January 30, 2019, 4:37pm UTC](https://community.openhab.org/t/openweathermap-behind-a-proxy/66113 "2019-01-30T16:37:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adolar](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/3be4f8/32.png) [@Adolar](https://community.openhab.org/u/Adolar)\
**Post date:** [January 30, 2019, 4:37pm UTC](https://community.openhab.org/t/openweathermap-behind-a-proxy/66113/1 "2019-01-30T16:37:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HaZet](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/43a26b/32.png) [@HaZet](https://community.openhab.org/u/HaZet)\
**Post date:** [September 11, 2019, 12:21pm UTC](https://community.openhab.org/t/openweathermap-behind-a-proxy/66113/2 "2019-09-11T12:21:28Z")

</div>

Any solution here? I have the same problem…

---

<div class="post-metadata">

**Author:** ![dobebo](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/9fc348/32.png) [@dobebo](https://community.openhab.org/u/dobebo)\
**Post date:** [September 23, 2021, 6:09pm UTC](https://community.openhab.org/t/openweathermap-behind-a-proxy/66113/3 "2021-09-23T18:09:04Z")

</div>

Hello,

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.
