Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60146

2 instances of jenkins on same Linux server

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      we have 2 jenkins_server.tcsh files :

      jenkins_server.tcsh

      jenkins_server_8082.tcsh

       

      The first one uses a different port ie 8080

      and the second one uses 8082

       

      This is content of the file:

      #!/bin/tcsh

      if( $#argv == 1 || $#argv == 3 ) then
      set pid = `ps -Af | grep java | grep jenkins | awk '{print $2}'`
      if( "$1" == "-start" ) then
      if( "$pid" != "" ) then
      echo "Jenkins PID ${pid} already running: use '$0 -stop' first"
      else
      java -jar /pan-asic/tools/jenkins/jenkins.war --httpPort=8082 >& jenkins.8082.log &
      set pid = `ps -Af | grep java | grep jenkins | awk '{print $2}'`
      echo ${pid} > jenkins_server.8082.pid
      endif
      else
      if( "$1" == "-stop" ) then
      if( "$pid" != "" ) then
      echo "Stopping Jenkins - PID ${pid} ...\n"
      kill ${pid}
      else
      echo "No Jenkins running - nothing to do.\n"
      endif
      else
      goto usage
      endif
      endif
      else
      goto usage
      endif

      done:
      exit 0

      usage:
      echo "Usage: $0 <-start | -stop>"
      echo " Where -start starts the Jenkins server and logs the output to release_server.log"
      echo " -stop sends a kill -s QUIT to the Jenkins PID\n"
      exit -1

       

      =========

      I ssh to a machine asic23 which already has 1 instance of jenkins running at :

      http://asic23:8080/

       

      When i try to do at :

      /pan-asic/projects/fe100/shared/jenkins% ./jenkins_server_8082.tcsh -start
      Jenkins PID 32194 already running: use './jenkins_server_8082.tcsh -stop' first

      There is no/jenkins_server_8082.tcsh running

      Do I need to run 2 jenkins.war file?

      ie :

      java -jar /pan-asic/tools/jenkins/jenkins.war --httpPort=8082 >& jenkins.8082.log &
      set pid = `ps -Af | grep java | grep jenkins | awk '{print $2}'`
      echo ${pid} > jenkins_server.8082.pid

       

      Currently both the files are pointing to /pan-asic/tools/jenkins/jenkins.war

      Please let me know this is a critical issue.

       

      Thanks

      Priya

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            pramaswamy Priya Ramaswamy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: