Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9360

Solr script not properly checking SOLR_PID

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.1
    • Fix Version/s: 6.4, 7.0
    • Component/s: scripts and tools
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      In the solr script we see in 3-4 areas this check :

      SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '

      {print $2}

      ' | sort -r`

      This can potentially prevent a solr instance to start in the case another process by any chance contains the port int the command itself ( not necessarily actually using the port) .

      e.g.
      java -server -Djetty.port=10504 -DSTOP.PORT=9504 -DSTOP.KEY=solrrocks -DMASTER_CORE_URL=external-server:10500/solr -jar start.jar --module=http

      A solr is running on 10504.
      A new Solr will not be able to start on 10500 ( but actually the port is free).
      This should be replaced by a real check if the port is used ( like netstat or similar) .

        Attachments

        1. SOLR_9360.patch
          3 kB
          Alessandro Benedetti
        2. SOLR-9360.patch
          3 kB
          Erick Erickson
        3. SOLR-9360.patch
          4 kB
          Erick Erickson

          Activity

            People

            • Assignee:
              erickerickson Erick Erickson
              Reporter:
              alessandro.benedetti Alessandro Benedetti
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: