Skip to content

bin/runconnect.sh: 37: [[: not found #541

Open

Description

@dyrnq

step1

git clone git@github.com:apache/rocketmq-connect.git
cd rocketmq-connect
mvn -Prelease-connect -Dmaven.test.skip=true clean package -U

step2

cd distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT
./bin/connect-standalone.sh
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 37: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 41: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 84: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 37: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 41: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 87: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 93: [: Linux: unexpected operator
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 37: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 41: [[: not found
/rocketmq-connect/distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT/bin/runconnect.sh: 110: [[: not found

Activity

  1. RockteMQ-AI commented on Aug 5, 2026

    @RockteMQ-AI

    Issue Evaluation

    Category: bug | Status: Confirmed

    Root Cause: The error bin/runconnect.sh: 37: [[: not found indicates the script is being executed with /bin/sh instead of /bin/bash. The [[ conditional syntax is bash-specific and not available in POSIX sh.

    Fix: Ensure the script is executed with bash:

    bash bin/connect-standalone.sh

    Or add a proper shebang line #!/usr/bin/env bash at the top of the script if missing.


    Automated evaluation by RockteMQ-AI

  2. RockteMQ-AI commented on Aug 8, 2026

    @RockteMQ-AI

    Feedback Timeout\n\nNo feedback has been received on the proposed spec within 72 hours. The issue will remain open for community review, but the automated fix workflow is being paused.\n\nIf you'd like to proceed with this fix, please comment with:\n- /approve - Generate a PR for this fix\n- /revise - Request changes to the spec\n- /reject - Cancel this fix\n\nAlternatively, community members can submit their own PR to address this issue.

  3. RockteMQ-AI commented on Aug 10, 2026

    @RockteMQ-AI

    Issue Evaluation

    Category: bug | Status: Confirmed

    The script bin/runconnect.sh uses [[ (a bash-ism) but is executed with /bin/sh (which on many systems like Ubuntu/Debian is dash, not bash). The [[ construct is not supported in POSIX sh.

    Root Cause: Missing #!/bin/bash shebang or script is invoked with sh instead of bash. The [[ conditional on lines 37, 41, 84, 87, 110 requires bash.
    Impact: Script fails to start on systems where /bin/sh is not bash.
    Severity: Medium — prevents Connect from starting on common Linux distributions.

    Fix options:

    1. Add #!/bin/bash shebang and ensure the script is invoked directly (not via sh runconnect.sh)
    2. Replace [[ with POSIX-compatible [ tests

    Automated evaluation by github-manager

  4. RockteMQ-AI commented on Sep 1, 2026

    @RockteMQ-AI

    Issue Evaluation

    Category: bug | Status: Confirmed

    The error [[: not found indicates bin/runconnect.sh uses bash-specific syntax ([[) but is being executed by sh (dash on Ubuntu/Debian). The script shebang should be #!/usr/bin/env bash or the script should be invoked explicitly with bash.

    Root Cause: Missing or incorrect shebang line, or script invoked with sh instead of bash.
    Impact: Cannot start connect runtime on systems where /bin/sh is not bash.
    Severity: Medium


    Automated evaluation by RockteMQ-AI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions