Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1072

CLI gets stuck when wrong host/port is provided

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.9.0
    • Component/s: SQL Shell
    • Labels:
      None

      Description

      Hi,

      When a wrong host or port provided in CLI, exceptions are thrown and the session is stuck, the prompt is not back until ctrl+c is executed.
      I need to be able to run a command like the below in batch mode and get the prompt back with a proper exit code when connect fails.

      tsql -c "\version" -h localhost -port 26003

      Thanks,
      Niv

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-block_iteration-branch-build #15 (See https://builds.apache.org/job/Tajo-block_iteration-branch-build/15/)
        TAJO-1072: CLI gets stuck when wrong host/port is provided. (Jihun Kang via hyunsik) (hyunsik: rev 4e203f03fb533e04577f5c2947823fedd8680b8a)

        • CHANGES
        • tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-block_iteration-branch-build #15 (See https://builds.apache.org/job/Tajo-block_iteration-branch-build/15/ ) TAJO-1072 : CLI gets stuck when wrong host/port is provided. (Jihun Kang via hyunsik) (hyunsik: rev 4e203f03fb533e04577f5c2947823fedd8680b8a) CHANGES tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #386 (See https://builds.apache.org/job/Tajo-master-build/386/)
        TAJO-1072: CLI gets stuck when wrong host/port is provided. (Jihun Kang via hyunsik) (hyunsik: rev 4e203f03fb533e04577f5c2947823fedd8680b8a)

        • CHANGES
        • tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #386 (See https://builds.apache.org/job/Tajo-master-build/386/ ) TAJO-1072 : CLI gets stuck when wrong host/port is provided. (Jihun Kang via hyunsik) (hyunsik: rev 4e203f03fb533e04577f5c2947823fedd8680b8a) CHANGES tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-CODEGEN-build #28 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/28/)
        TAJO-1072: CLI gets stuck when wrong host/port is provided. (Jihun Kang via hyunsik) (hyunsik: rev 4e203f03fb533e04577f5c2947823fedd8680b8a)

        • CHANGES
        • tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-CODEGEN-build #28 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/28/ ) TAJO-1072 : CLI gets stuck when wrong host/port is provided. (Jihun Kang via hyunsik) (hyunsik: rev 4e203f03fb533e04577f5c2947823fedd8680b8a) CHANGES tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed. Fixing it as resolved. Thank you Jihun for your contribution.

        Show
        hyunsik Hyunsik Choi added a comment - committed. Fixing it as resolved. Thank you Jihun for your contribution.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/169

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/169
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/169#issuecomment-57910098

        +1

        Even though TravisCI showed the unit test failure, it seems to be a temporary problem. I verified 'mvn clean install' for this patch. All unit tests are passed well. Also, I also tested the problematic case. The patch fixes the problem.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/169#issuecomment-57910098 +1 Even though TravisCI showed the unit test failure, it seems to be a temporary problem. I verified 'mvn clean install' for this patch. All unit tests are passed well. Also, I also tested the problematic case. The patch fixes the problem.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/169#issuecomment-57432159

        Sorry guys.
        I leaved comments at wrong issue. So, I removed it.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/169#issuecomment-57432159 Sorry guys. I leaved comments at wrong issue. So, I removed it.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/169#issuecomment-57428358

        +1

        Hi @ykrips
        Thank you for your contribution.
        It looks good to me and it ran as expected on test cluster.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/169#issuecomment-57428358 +1 Hi @ykrips Thank you for your contribution. It looks good to me and it ran as expected on test cluster.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user ykrips opened a pull request:

        https://github.com/apache/tajo/pull/169

        TAJO-1072: CLI gets stuck when wrong host/port is provided

        TajoCli should release the external resources of netty client when exceptions occur.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/ykrips/tajo TAJO-1072

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/169.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #169


        commit 9ebc6db4403144a9221e69302e21ab6ca03416a2
        Author: Jihun Kang <ykrips@gmail.com>
        Date: 2014-09-28T00:51:30Z

        TAJO-1072: CLI gets stuck when wrong host/port is provided


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user ykrips opened a pull request: https://github.com/apache/tajo/pull/169 TAJO-1072 : CLI gets stuck when wrong host/port is provided TajoCli should release the external resources of netty client when exceptions occur. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ykrips/tajo TAJO-1072 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/169.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #169 commit 9ebc6db4403144a9221e69302e21ab6ca03416a2 Author: Jihun Kang <ykrips@gmail.com> Date: 2014-09-28T00:51:30Z TAJO-1072 : CLI gets stuck when wrong host/port is provided
        Hide
        ykrips Jihun Kang added a comment -

        No concerns about this issue. I will create a pull request in a short time.

        Show
        ykrips Jihun Kang added a comment - No concerns about this issue. I will create a pull request in a short time.
        Hide
        hyunsik Hyunsik Choi added a comment - - edited

        Hi guys,

        If Jihun agrees, I'll schedule it to 0.9.0 release.

        Show
        hyunsik Hyunsik Choi added a comment - - edited Hi guys, If Jihun agrees, I'll schedule it to 0.9.0 release.
        Hide
        nivo999 Niv Zvi added a comment -

        Hi Jihun Kang,

        Thanks for looking into it.
        Will this fix be available in Tajo 9 version? Is there a date for releasing version 9?
        Reason I ask this is that we plan to release support for Tajo in a few months and as this fix is important to us we will recommend our customers to use version 9 or above.

        Thanks,
        Niv

        Show
        nivo999 Niv Zvi added a comment - Hi Jihun Kang, Thanks for looking into it. Will this fix be available in Tajo 9 version? Is there a date for releasing version 9? Reason I ask this is that we plan to release support for Tajo in a few months and as this fix is important to us we will recommend our customers to use version 9 or above. Thanks, Niv
        Hide
        ykrips Jihun Kang added a comment - - edited

        This issue can be reproduced for TAJO-0.9.0. RpcChannelFactory class creates several worker threads and boss thread, and these threads are not be terminated when exception occurs.

        Show
        ykrips Jihun Kang added a comment - - edited This issue can be reproduced for TAJO-0.9.0. RpcChannelFactory class creates several worker threads and boss thread, and these threads are not be terminated when exception occurs.

          People

          • Assignee:
            ykrips Jihun Kang
            Reporter:
            nivo999 Niv Zvi
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development