{"record":{"id":"72dadf1854e8e184","repo":"langgenius/dify","slug":"cannot-start-the-e2e-shellctl-sandbox-because-sh","errorCode":null,"errorMessage":"Cannot start the E2E shellctl sandbox because ${shellctlHost}:${shellctlPort} is already in use.${listenerMessage}","messagePattern":"Cannot start the E2E shellctl sandbox because (.+?):(.+?) is already in use\\.(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"e2e/scripts/setup.ts","lineNumber":407,"sourceCode":"    command: 'docker',\n    args: [\n      'build',\n      '-f',\n      path.join(difyAgentRuntimeDir, 'docker', 'Dockerfile'),\n      '-t',\n      shellctlImage,\n      '.',\n    ],\n    cwd: difyAgentRuntimeDir,\n  })\n}\n\nexport const startShellctlSandbox = async () => {\n  if (await isTcpPortReachable(shellctlHost, shellctlPort)) {\n    const listenerDescription = await getTcpPortListenerDescription(shellctlPort)\n    const listenerMessage = listenerDescription ? `\\n\\nPort listener:\\n${listenerDescription}` : ''\n\n    throw new Error(\n      `Cannot start the E2E shellctl sandbox because ${shellctlHost}:${shellctlPort} is already in use.${listenerMessage}`,\n    )\n  }\n\n  await runCommand({\n    command: 'docker',\n    args: ['rm', '-f', shellctlContainerName],\n    cwd: rootDir,\n    stdio: 'pipe',\n  })\n\n  await ensureShellctlSandboxImage()\n\n  await runForegroundProcess({\n    command: 'docker',\n    args: [\n      'run',\n      '--rm',","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/e2e/scripts/setup.ts#L389-L425","documentation":"Error \"Cannot start the E2E shellctl sandbox because ${shellctlHost}:${shellctlPort} is already in use.${listenerMessage}\" thrown in langgenius/dify.","triggerScenarios":"Thrown at e2e/scripts/setup.ts:407 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}