Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2042

zkServer.sh does not work properly on Solaris

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 3.4.6
    • None
    • scripts
    • None
    • Solaris 5.11

    Description

      There are two issues in the zkServer.sh script that make it not work properly out of the box on Solaris.

      1. The bin/zkServer.sh script uses plain "echo" in all instances but one: when writing the pid to the pid file. In that instance it uses "/bin/echo".

      The "/bin/echo" command on Solaris does not understand the "-n" parameter and interprets it as a literal string, so the "-n" gets written into the pid file along with the pid. This causes the "stop" command to fail.

      2. The /bin/grep command in Solaris does not understand special character classes like "[[:space:]]". You must use the alternate posix version of grep as found in /usr/xpg4/bin/grep for this to work. If the script cannot be made completely generic then at least we should document the need to use the posix grep implementation on Solaris.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cnauroth Chris Nauroth
            jlindwall John Lindwall
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment