ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-983

running zkServer.sh start remotely using ssh hangs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4.0
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      If zkServer.sh is run remotely using ssh as follows ssh will "hang" - i.e. not complete/return once the server is started. This is even though zkServer.sh starts the java vm in the background.

      $ ssh <host> "zkServer.sh start"

      this is due to the following issue:

      http://www.slac.stanford.edu/comp/unix/ssh_faq.html#logoff_hangs

        Activity

        Hide
        Bill Au added a comment -

        The "-q" option to nc introduced in this patch isn't available in all Linux distro (not in RedHat and FreeBSD). I have file ZOOKEEPER-1089 for that.

        Show
        Bill Au added a comment - The "-q" option to nc introduced in this patch isn't available in all Linux distro (not in RedHat and FreeBSD). I have file ZOOKEEPER-1089 for that.
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1107 (See https://hudson.apache.org/hudson/job/ZooKeeper-trunk/1107/)
        ZOOKEEPER-983. running zkServer.sh start remotely using ssh hangs (phunt)

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1107 (See https://hudson.apache.org/hudson/job/ZooKeeper-trunk/1107/ ) ZOOKEEPER-983 . running zkServer.sh start remotely using ssh hangs (phunt)
        Hide
        Patrick Hunt added a comment -

        Committed.

        976 does include this change accidentally, good catch, I'll fix that patch before committing 976.

        Show
        Patrick Hunt added a comment - Committed. 976 does include this change accidentally, good catch, I'll fix that patch before committing 976.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12470108/ZOOKEEPER-983.patch
        against trunk revision 1072085.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/161//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/161//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/161//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12470108/ZOOKEEPER-983.patch against trunk revision 1072085. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/161//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/161//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/161//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12470108/ZOOKEEPER-983.patch
        against trunk revision 1072085.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/142//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/142//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/142//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12470108/ZOOKEEPER-983.patch against trunk revision 1072085. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/142//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/142//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/142//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        +1 for the patch. again this clashes with ZOOKEEPER-976, you can go ahead and commit this as one.

        Show
        Mahadev konar added a comment - +1 for the patch. again this clashes with ZOOKEEPER-976 , you can go ahead and commit this as one.
        Hide
        Mahadev konar added a comment -

        pat, the changes look good but again you have a change thats reflected in ZOOKEEPER-976 as well? This is regarding zoo pid file. Should we remove that change from this patch?

        Show
        Mahadev konar added a comment - pat, the changes look good but again you have a change thats reflected in ZOOKEEPER-976 as well? This is regarding zoo pid file. Should we remove that change from this patch?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12470108/ZOOKEEPER-983.patch
        against trunk revision 1062244.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 9 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/114//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/114//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/114//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12470108/ZOOKEEPER-983.patch against trunk revision 1062244. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 9 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/114//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/114//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/114//console This message is automatically generated.
        Hide
        Patrick Hunt added a comment -

        fixes the problem with ssh by redirecting stdin/out/err.

        you can test by running

        ssh localhost "cd zk; bin/zkServer.sh start"

        I also fixed a problem with stop, where start would fail to write the pid file if the datadirectory didn't yet exist (or the pid file directory didn't already exist - anything that would cause writing the pid file to fail)

        Show
        Patrick Hunt added a comment - fixes the problem with ssh by redirecting stdin/out/err. you can test by running ssh localhost "cd zk; bin/zkServer.sh start" I also fixed a problem with stop, where start would fail to write the pid file if the datadirectory didn't yet exist (or the pid file directory didn't already exist - anything that would cause writing the pid file to fail)

          People

          • Assignee:
            Patrick Hunt
            Reporter:
            Patrick Hunt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development