phacility/phabricator · warning · Exception
Client closed connection before sending a complete protocol
Error message
Client closed connection before sending a complete protocol frame.
What it means
During repository identification the SSH client closed its side before sending a complete first ra_svn frame - the frame that carries the repository URL. The server aborts because it never learned which repository the client wanted; the failure is on the client side, not in Phabricator.
Source
Thrown at src/applications/diffusion/ssh/DiffusionSubversionServeSSHWorkflow.php:127
$struct = $message['structure'];
// This is the:
//
// ( version ( cap1 ... ) url ... )
//
// The `url` allows us to identify the repository.
$uri = $struct[2]['value'];
$path = $this->getPathFromSubversionURI($uri);
return $this->loadRepositoryWithPath(
$path,
PhabricatorRepositoryType::REPOSITORY_TYPE_SVN);
}
}
if (!$io_channel->isOpenForReading()) {
throw new Exception(
pht(
'Client closed connection before sending a complete protocol '.
'frame.'));
}
// If the client has disconnected, kill the subprocess and bail.
if (!$io_channel->isOpenForWriting()) {
throw new Exception(
pht(
'Client closed connection before receiving response.'));
}
}
}
protected function executeRepositoryOperations() {
$repository = $this->getRepository();
$args = $this->getArgs();View on GitHub (pinned to 5720a38cfe)
Solutions
- Retry the svn command - a disconnect during handshake is usually transient and client-initiated
- Inspect the client output above the error for the real cause (host key prompt, auth failure, timeout)
- If reproducible, test the same client against another svn+ssh host to rule out client corruption
Defensive patterns
Strategy: try-catch
Try / catch
try {
$workflow->execute($args);
} catch (Exception $ex) {
// Client abandoned the handshake: exit quietly with a non-zero code.
// No server state was modified, so no rollback is needed.
return 1;
} Prevention
- Make automated clients non-interactive (accept host keys, provide credentials up front) so they never die mid-handshake
- Do not build tooling that opens svn+ssh sockets and abandons them
When it happens
Trigger: User cancels svn mid-handshake; client-side timeout or host-key prompt refusal; network drop immediately after connect; a client bug truncating the first write.
Common situations: Interactive users canceling at password or host-key prompts; CI jobs killed during checkout; flaky links between client and the Phabricator host.
Related errors
- Client closed connection before receiving response.
- This repository is read-only over SSH.
- Expected `%s`!
- This public key is already associated with another user or d
- Analyzing or decrypting SSH keys requires the "ssh-keygen" b
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/ce12ef4d7b6cfb5d.
Report an issue: GitHub.