Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6628

Cannot start taskmanager with cygwin in directory containing spaces

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 1.4.0
    • Fix Version/s: 1.3.0, 1.4.0
    • Component/s: Startup Shell Scripts
    • Labels:
      None

      Description

      Zento@Lily /cygdrive/c/Users/Zento/Documents/GitHub/flink/flink-dist/target/flink-1.3.0-bin/flink 1.3.0
      $ ./bin/taskmanager.sh start
      ./bin/taskmanager.sh: line 82: C:\Users\Zento\Documents\GitHub\flink\flink-dist\target\flink-1.3.0-bin\flink: command not found
      
      

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user zentol opened a pull request:

          https://github.com/apache/flink/pull/3954

          FLINK-6628 Fix start scripts on Windows

          This PR fixes the `flink-daemon.sh` and `taskmanager.sh` script for cygwin for directories containing spaces.
          They were broken in 11c868f91db773af626ac6ac4dcba9820c13fa8a.

          The change in the daemon script is straight-forward; to prevent the path containing the space to be interpreted as to arguments we wrap it in `"` which causes the entire path, including the space, to be passed as a single argument.

          The change in the taskmanager script is as subtle as it gets. When storing the call like this `TM_COMMAND="$

          {FLINK_BIN_DIR}

          /flink-daemon.sh $STARTSTOP taskmanager $

          {args[@]}

          "` and executing it later spaces are once again used as to separate arguments, breaking the execution. We can't use the trick used above, since then the entire expressions is used as a single argument (i.e. path to an executable) which obviously fails.

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

          $ git pull https://github.com/zentol/flink 6628_win_script

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

          https://github.com/apache/flink/pull/3954.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 #3954


          commit f4da72abc7d8d5c380f4552eead69ee477833c8a
          Author: zentol <chesnay@apache.org>
          Date: 2017-05-19T14:50:37Z

          FLINK-6628 Fix start scripts on Windows


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user zentol opened a pull request: https://github.com/apache/flink/pull/3954 FLINK-6628 Fix start scripts on Windows This PR fixes the `flink-daemon.sh` and `taskmanager.sh` script for cygwin for directories containing spaces. They were broken in 11c868f91db773af626ac6ac4dcba9820c13fa8a. The change in the daemon script is straight-forward; to prevent the path containing the space to be interpreted as to arguments we wrap it in `"` which causes the entire path, including the space, to be passed as a single argument. The change in the taskmanager script is as subtle as it gets. When storing the call like this `TM_COMMAND="$ {FLINK_BIN_DIR} /flink-daemon.sh $STARTSTOP taskmanager $ {args[@]} "` and executing it later spaces are once again used as to separate arguments, breaking the execution. We can't use the trick used above, since then the entire expressions is used as a single argument (i.e. path to an executable) which obviously fails. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zentol/flink 6628_win_script Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3954.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 #3954 commit f4da72abc7d8d5c380f4552eead69ee477833c8a Author: zentol <chesnay@apache.org> Date: 2017-05-19T14:50:37Z FLINK-6628 Fix start scripts on Windows
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3954

          This affects more than Windows ... at least MacOS and I expect Linux as well.

          Also need to update `rotateLogFilesWithPrefix` in `config.sh` to: `rotateLogFile "$log"`.

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3954 This affects more than Windows ... at least MacOS and I expect Linux as well. Also need to update `rotateLogFilesWithPrefix` in `config.sh` to: `rotateLogFile "$log"`.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

          https://github.com/apache/flink/pull/3954

          @greghogan done.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/3954 @greghogan done.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user greghogan commented on the issue:

          https://github.com/apache/flink/pull/3954

          +1 and to fix in 1.3.0

          Show
          githubbot ASF GitHub Bot added a comment - Github user greghogan commented on the issue: https://github.com/apache/flink/pull/3954 +1 and to fix in 1.3.0
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

          https://github.com/apache/flink/pull/3954

          merging.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/3954 merging.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3954

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3954
          Hide
          Zentol Chesnay Schepler added a comment -

          1.3: 1bd7599118851e32db1f3d4abad2cac1335e08cb
          1.4: 0a5b98e34b73c5766a6a9d2b49f2eda70624cf26

          Show
          Zentol Chesnay Schepler added a comment - 1.3: 1bd7599118851e32db1f3d4abad2cac1335e08cb 1.4: 0a5b98e34b73c5766a6a9d2b49f2eda70624cf26

            People

            • Assignee:
              Zentol Chesnay Schepler
              Reporter:
              Zentol Chesnay Schepler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development