"An error occurred, Unable to connect to Jenkins"

After installing Jenkins on AWS Ubuntu. Login on browser and Click on Install plugins I’m getting “An error occurred, Unable to connect to Jenkins” . So now what I do to solve this problem ?

You’ll need to provide much more detail before others will be able to assist you or will be persuaded to assist you. Good guidelines on the types of information that need to be provided are included in the “How to report a issue” page.

Please note that I am not recommending that you open an issue in the Jenkins issue tracker. I am recommending that you look at the list of details included in that page, collect those details, and use those details to resolve your issue. If you can’t resolve the issue, then post those details here.

Posting an image of “An error occurred” is not enough information to persuade others to help you.

I am getting the same error, it seems the Issue is still not resolved.

I got the same issue but resolve after restarting

1 Like

Please have you resolved this. If yes, please share the solution. I am having same error

Same thing happening to me, narrowed it down a little I think:
I’m trying to get it working on an NVIDIA Jetson Nano (running I think nvidia’s custom ubuntu), and followed the steps here to get it installed, which works fine, and the service is getting launched on wifi connection, etc, but I get the same error message as @Sunny when trying to install default plugins.
journalctl doesn’t show any new info when I hit the “unable to connect to jenkins” screen either, but I stumbled on this post while Googling the error, and tried pinging updates.jenkins.io which doesn’t get any responses. As far as I know I’m not behind any proxies etc, any ideas on why the plugin repository might be inaccessible?

(edit: also rebooting didn’t solve anything unfortunately)

(edit 2: this could also be not the issue, because curl -i https://updates.jenkins.io returns 200, and I CAN grab the contents of the webpage with curl? - I can also manually get to the pluginManager endpoint and install stuff from there, so something wrong with the configuration step maybe?)

That is Ubuntu 18.04. Ubuntu 18.04 reached end of life earlier this year. The Jenkins project does not support Jenkins on operating systems that are not supported by the upstream vendor of the operating system.

Maybe you’re connecting from a pure IPv6 host and seeing the same issue as was reported in

1 Like

I also realised ping updates.jenkins.io doesn’t get responses on any of my devices, so it actually doesn’t seem like it’s a problem reaching that address at all, so maybe it is just a matter of 18.04 being unsupported,suppose I should try and upgrade it to 20 and see what happens

1 Like

@Meijis I am facing the same problem in Ubuntu 20, Ubuntu 22 and Mac too. Is this resolved by you?

@MarkEWaite we are not able to ping updates.jenkins.io

I was able to solve the above issue you were facing. I am using an EC2 free tier instance to try out Jenkins, so when I installed and accessed Jenkins by using Public IP and port from my browser I wasn’t able to install the plugins as it was giving me the above error you showed in the screen shot. Then, by just hard refreshing the browser tab I was able to successfully connect to the Jenkins and install the plugins.

I guess I found the cause.
In my case it was poor internet connection, web page calls the address http://JENKINS_HOST:8080/pluginManager/plugins?_=1711639337056 and waits only for 10 seconds, then gives an error. My installation was in cloud far away from my location, and I cant load page in 10 second, so I just use another machine, closer to Jenkins host, and it worked for me.
@MarkEWaite is there some setting of that timeout?

I am getting the same error but i am wait for 5-10 min and it’s working properly i think jenkins take some time after installation.

got the same issue and here you can find the logs
Handling GET /jenkins/static/25df74a6/images/svgs/logo.svg from : http-nio-8080-exec-8] hudson.init.impl.InstallUncaughtExceptionHandler.handleException null