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

bin/solr -e cloud can fail on MacOS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.3
    • Component/s: scripts and tools
    • Labels:
      None
    • Environment:

      Unix

      Description

      On MacOS:

      bin/solr -e cloud
      said:
      Please enter the port for node1 [8983]
      Oops! Looks like port 8983 is already being used by another process. Please choose a different port.

      Looking at the script, it uses:
      PORT_IN_USE=`lsof -Pni:$CLOUD_PORT`
      which gave the output:
      {{
      COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
      Google 365 upayavira 130u IPv6 0xab1d227df2e5a7db 0t0 TCP [::1]:49889->[::1]:8983 (ESTABLISHED)
      java 10889 upayavira 118u IPv6 0xab1d227df2e73ddb 0t0 TCP *:8983 (LISTEN)
      java 10889 upayavira 134u IPv6 0xab1d227df2e756db 0t0 TCP [::1]:8983->[::1]:49889 (ESTABLISHED)
      }}
      This was connections Google Chrome was attempting to make to Solr.

      Replacing the above line with this:

      PORT_IN_USE=`lsof -Pni:$CLOUD_PORT | grep LISTEN`

      resolved the issue. Very simple patch attached.

        Attachments

        1. SOLR-7635.patch
          0.7 kB
          Upayavira
        2. SOLR-7635.patch
          1.0 kB
          Upayavira
        3. SOLR-7635.patch
          1.0 kB
          Ramkumar Aiyengar

          Activity

            People

            • Assignee:
              andyetitmoves Ramkumar Aiyengar
              Reporter:
              upayavira Upayavira
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: