7

On a Windows 2008 R2 box, I've installed the latest 64-bit JRE, and Tomcat 7.0. I'm trying to host two instances of Jenkins within this single Tomcat instance. I've created context descriptor files in the conf/Catalina/localhost/ folder to set JENKINS_HOME to different home directories for each instance. To deploy the instances of Jenkins, I downloaded the LTS release of Jenkins, named one Batman and the other one Robin.

What I'm seeing is that I can use/manage one instance without any issues, but if I try to use/manage the other instance in another tab, it looks like Tomcat is just hanging using up about 25% of CPU and memory usage climbing. Looking at the logs file in the Tomcat directory, I'm not seeing any files growing or being updated.

To make things worse, if I add a third instance Joker, accessing the Tomcat home page has no problems, but I can't access any of the 3 instances.

Is there a proper way to host multiple instances of Jenkins within Tomcat?

I found one thread that talked about attempting to use Tomcat, but eventually abandoning it and using the built in Winstone. I need to use a container rather than the built in Winstone, because the default Winstone seems to run as a 32-bit process, and the builds that I am working on invoke SharePoint PowerShell cmdlets which are only available from within a 64-bit process.

Ants
  • 2,628
  • 22
  • 35
  • The question is more why do you want to have multiple jenkins instances within one tomcat? This will not help with parallel builds. – PowerStat Oct 16 '18 at 06:20
  • It's not for parallelization. It's for job isolation. There are some jobs that we don't want other teams to even know exist. – Ants Jun 05 '19 at 12:23
  • Ok I understand, but then how about using Jenkins user/role based authentication? For example here is a link that might do what you want: https://www.thegeekstuff.com/2017/03/jenkins-users-groups-roles/ – PowerStat Jun 05 '19 at 12:57
  • That is actually one of the routes I originally was going down. Unfortunately, one of the roles I wanted to grant some users is essentially full admin. Since admins can see everything, then they can see the other jobs. Back to square one. Anyway I solved this a while back with a lot of config file hacking, I just don't recall what it was anymore since corporate politics ousted Jenkins and forced the use of Bamboo. :( I want my Jenkins back. – Ants Jun 05 '19 at 22:03
  • Ok, then it might be simpler to use Jenkins without Tomcat within docker containers or virtual(box) machines. - Or why not using multiple tomcat instances? – PowerStat Jun 06 '19 at 05:29

0 Answers0