# Getting connection timed out while installing Jenkins plugins through Dockerfile

**URL:** https://community.jenkins.io/t/getting-connection-timed-out-while-installing-jenkins-plugins-through-dockerfile/6134
**Category:** Using Jenkins
**Created:** [March 7, 2023, 4:17pm UTC](https://community.jenkins.io/t/getting-connection-timed-out-while-installing-jenkins-plugins-through-dockerfile/6134 "2023-03-07T16:17:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Anurag](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Anurag](https://community.jenkins.io/u/Anurag)
#### Post date: [March 7, 2023, 4:17pm UTC](https://community.jenkins.io/t/getting-connection-timed-out-while-installing-jenkins-plugins-through-dockerfile/6134/1 "2023-03-07T16:17:27Z")

</div>

I am trying to install Jenkins 2.393 version through Dockerfile, I am getting an timed out error while trying to download Plugins. Can someone help me out? Please find the below Dockerfile and Attached error what I am getting. Error I am getting:

> ```auto
> 
> ```

Unable to resolve plugin URL [https://updates.jenkins.io/download/plugins/ansicolor/1.0.2/ansicolor.hpi](https://updates.jenkins.io/download/plugins/ansicolor/1.0.2/ansicolor.hpi), or download plugin ansicolor to file: Connect to [ftp-chi.osuosl.org:443](http://ftp-chi.osuosl.org:443) [[ftp-chi.osuosl.org/64.50.236.52](http://ftp-chi.osuosl.org/64.50.236.52)] failed: Connection timed out (Connection timed out)  
Tried downloading ansicolor from [https://ftp-chi.osuosl.org/pub/jenkins/plugins/ansicolor/1.0.2/ansicolor.hpi](https://ftp-chi.osuosl.org/pub/jenkins/plugins/ansicolor/1.0.2/ansicolor.hpi) (attempt 1 of 3)

```auto

```

---

<div class="post-metadata">

### Author: ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)
#### Post date: [March 7, 2023, 4:54pm UTC](https://community.jenkins.io/t/getting-connection-timed-out-while-installing-jenkins-plugins-through-dockerfile/6134/2 "2023-03-07T16:54:43Z")

</div>

Hello @Anurag and welcome to this community 👋

Sometimes, I have the same error too, but most of the times, it is transient.  
Your error message indicates that the connection to the Jenkins plugin repository at `https://updates.jenkins.io` is timing out. This can happen due to network issues, firewalls, or the server being overloaded.

To troubleshoot the issue, you can try the following steps:

1. Verify that you can access the plugin repository URL `https://updates.jenkins.io` from your Docker container by running the `curl` command (while being in the container thanks to a `docker exec -ti`) for example:

```auto
$ curl -I https://updates.jenkins.io

```

If you see a response with HTTP status code 200, it means that you can access the plugin repository.  
2. Check if there are any network issues that may be causing the timeout. You can try running the `ping` command to see if you can reach the plugin repository:

```auto
$ ping updates.jenkins.io

```

If you see a response from the server, it means that you can reach the server and there is no network issue.  
3. If you are behind a firewall or proxy server, make sure that the Docker container is configured to use the appropriate proxy settings. You can set the proxy settings in the Dockerfile using the `ENV` command, for example:

```auto
ENV http_proxy http://your.proxy.server:port
ENV https_proxy http://your.proxy.server:port

```

Replace `your.proxy.server` and `port` with your actual proxy server and port number.  
4. Another option is to pre-install the required plugins in the Docker image. You can download the plugins manually from the Jenkins plugin repository and copy them to the Docker image using the `COPY` command in the Dockerfile. For example:

```bash
COPY plugins/ansicolor.hpi /usr/share/jenkins/ref/plugins/

```

Replace `plugins/ansicolor.hpi` with the path to the downloaded plugin file, and make sure to update the plugin list in the `plugins.txt` file.

---

<div class="post-metadata">

### Author: ![ayush-shah-1501](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/ayush-shah-1501/32/7213_2.png) [@ayush-shah-1501](https://community.jenkins.io/u/ayush-shah-1501)
#### Post date: [February 28, 2024, 11:03am UTC](https://community.jenkins.io/t/getting-connection-timed-out-while-installing-jenkins-plugins-through-dockerfile/6134/3 "2024-02-28T11:03:38Z")

</div>

Hi @poddingue I am not able to ping the [updates.jenkins.io](http://updates.jenkins.io)

How can i resolve this
