langgenius/dify · error · Error
Cannot start the E2E Agent backend because ${agentBackendHos
Error message
Cannot start the E2E Agent backend because ${agentBackendHost}:${agentBackendPort} is already in use.${listenerMessage} What it means
Error "Cannot start the E2E Agent backend because ${agentBackendHost}:${agentBackendPort} is already in use.${listenerMessage}" thrown in langgenius/dify.
Source
Thrown at e2e/scripts/setup.ts:353
'--no-sync',
'flask',
'run',
'--host',
apiBindHost,
'--port',
String(apiPort),
],
cwd: apiDir,
env,
})
}
export const startAgentBackend = async () => {
if (await isTcpPortReachable(agentBackendHost, agentBackendPort)) {
const listenerDescription = await getTcpPortListenerDescription(agentBackendPort)
const listenerMessage = listenerDescription ? `\n\nPort listener:\n${listenerDescription}` : ''
throw new Error(
`Cannot start the E2E Agent backend because ${agentBackendHost}:${agentBackendPort} is already in use.${listenerMessage}`,
)
}
await runForegroundProcess({
command: 'uv',
args: [
'run',
'--project',
'.',
'--extra',
'server',
'uvicorn',
'dify_agent.server.app:app',
'--host',
agentBackendBindHost,
'--port',
String(agentBackendPort),View on GitHub (pinned to ef8544b173)
When it happens
Trigger: Thrown at e2e/scripts/setup.ts:353 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/2676118d4cdf1120.
Report an issue: GitHub.