Hi, currently I’m creating an automation on Ansible to install Jenkins completely offline. I’m facing issues with installing Plugins. Since we don’t have internet connectivity all the plugins and their dependencies had been downloaded to the “/plugins” folder, but Jenkins complains that cannot read some of the “hpi” files and even if the dependencies have the correct version it still cannot load them.
For a few plugins, this method of downloading and uploading to “/plugins” folder is working but when I add more plugins the issue starts.
On a online instance, I’ve already checked all the plugins and their versions, but when I try with the offline instance with the same plugins and versions it won’t work.
The Java and Jenkins core versions are exactly the same.
Files permissions to plugins folder are open and ownership is correct.
Each plugin hpi file is downloaded from a internal repository on a task loop while Jenkins is offline. The files uploaded to this repository are not literally the same files from the online instance’s folder but their equivalent versions from the Jenkins plugins repository.
The plugins file extension is renamed to “jpi” (Although I’ve tried the same without renaming)
Most of the errors are of this type: Failed to expand <jenkins home>/plugins/<plugin name>.jpi
The issue still persists, but thanks for the insights!
there is no limit how many plugins you can install. I assume you’re on Linux.
Is the plugins directory empty except for the .jpi files?
I would run a checksum on the jpi files and compare that to the checksum on the instance where you have no issues.
Also when you say you downloaded again, did you update the files in your internal repository? Maybe they are already corrupted there.
Is Failed to expand <jenkins home>/plugins/<plugin name>.jpi the only error message or is there a stacktrace attached?
Might be good to post the complete jenkins log