Error: Failed to start tunnel, could not establish a connection

I’ve ran the command forge tunnel. It leads to an error from past two days.

# forge tunnel --verbose

Tunnel redirects requests you make to your local machine. This occurs for any Atlassian site where your app is installed in the development environment. You will not see requests from other users.
Press Ctrl+C to cancel.

Checking Docker image... 100%
Your Docker image is up to date.
...

▶️  GraphQL https://api.atlassian.com/graphql
Query:
      mutation forge_cli_deleteApplicationTunnels($input: DeleteAppTunnelInput!) {
        deleteAppTunnels(input: $input) {
          success
          errors {
            message
            extensions {
              errorType
            }
          }
        }
      }

Variables: {
  "input": {
    "appId": "ari:cloud:ecosystem::app/1727fe19-897a-458e-98ea-85e7989c21ae",
    "environmentKey": "default"
  }
}
◀️  GraphQL
Request ID: 3a6f4a92447fce39
Result: {
  "deleteAppTunnels": {
    "success": true,
    "errors": null
  }
}

Error: Failed to start tunnel, could not establish a connection.

Error: Failed to start tunnel, could not establish a connection.
    at NgrokCreateTunnelService.establishTunnel (/tunnel/node_modules/@forge/tunnel/out/tunnelling/services/create-tunnel-service.js:40:19)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async StartTunnelCommand.startFaaSTunnelServer (/tunnel/node_modules/@forge/tunnel/out/tunnelling/command/start-tunnel-command.js:37:35)
    at async StartTunnelCommand.execute (/tunnel/node_modules/@forge/tunnel/out/tunnelling/command/start-tunnel-command.js:70:38)
    at async runTunnel (/tunnel/node_modules/@forge/tunnel/out/index.js:31:24)

Hi

You might be experiencing an intermittent network issue or you may have a firewall blocking the port.
Would you be able to test again on different networks to see if it isn’t a firewall issue.

I’m testing forge tunnel on my end and am not able to reproduce the problem.

Hello, Im running into a similar issue on my companies network (forge tunnel at home and on vpn works fine, but not in office)
What location would I use to open up the firewall to allow forge tunnel to work as intended?

Hi @JasonDunn1,

You’ll need to allow outbound connections to Ngrok.
See if this guide helps: Corporate Firewall | ngrok documentation

1 Like