usebruno/bruno · error · Error
Port ${port} is not available.
Error message
Port ${port} is not available. What it means
Error "Port ${port} is not available." thrown in usebruno/bruno.
Source
Thrown at packages/bruno-electron/src/app/mock-server/mock-server.js:148
}
return { available: true, reason: null };
};
const assertIsolatedPortAvailable = async (requestedPort, mockServerUid) => {
const port = Number(requestedPort) || DEFAULT_GATEWAY_PORT;
const result = await checkPortAvailable(port, { mockServerUid });
if (!result.available) {
if (result.reason === 'bruno' || result.reason === 'bruno-config') {
throw new Error(`Port ${port} is already used by another mock server in Bruno.`);
}
if (result.reason === 'system') {
throw new Error(`Port ${port} is already in use on this system.`);
}
throw new Error(`Port ${port} is not available.`);
}
return port;
};
const resolveIsolatedPort = async (requestedPort, mockServerUid) => (
assertIsolatedPortAvailable(requestedPort, mockServerUid)
);
const suggestPort = async (startPort = DEFAULT_GATEWAY_PORT, { additionalUsedPorts = [] } = {}) => {
const used = getUsedPorts();
for (const port of additionalUsedPorts) {
const normalizedPort = Number(port);
if (normalizedPort >= 1 && normalizedPort <= 65535) {
used.add(normalizedPort);
}
}
View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Select another port number.
- Ensure the port is free and allowed by the OS/firewall.
When it happens
Trigger: Thrown at packages/bruno-electron/src/app/mock-server/mock-server.js:148 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/1bb82f68eb7b7b17.
Report an issue: GitHub.