Skip to content

Commit f7d16aa

Browse files
BrainSlugs83Copilot
andcommitted
docs: troubleshooting section with all failure modes
Covers: port owned by another user, port occupied by foreign service, version mismatch, session store not found, embedding model corrupt. Error message links now point to specific troubleshooting anchors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7446920 commit f7d16aa

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,83 @@ cat ~/.copilot/vector-memory.pid
184184
| `test.js` | 38 unit tests with DI mocks |
185185
| `eslint.config.js` | Lint config |
186186

187+
## Troubleshooting
188+
189+
### Port owned by another user
190+
191+
**Error:** `Port 31337 is owned by user "X" (expected "Y")`
192+
193+
Two users on the same machine are pointing at the same port. Each user needs a unique port. Edit `~/.copilot/mcp-config.json` and add a `VECTOR_MEMORY_PORT` env var:
194+
195+
```json
196+
{
197+
"mcpServers": {
198+
"vector-memory": {
199+
"command": "node",
200+
"args": ["<path-to>/index.js"],
201+
"env": {
202+
"VECTOR_MEMORY_PORT": "31338"
203+
}
204+
}
205+
}
206+
}
207+
```
208+
209+
See [Multi-user setup](#multi-user-setup) for full details.
210+
211+
### Port occupied by another service
212+
213+
**Error:** `Vector memory server failed to start — port 31337 may be in use by another service`
214+
215+
Something else is listening on the default port. Pick a different port using the same `VECTOR_MEMORY_PORT` env var as above.
216+
217+
To check what's on the port:
218+
```bash
219+
# Windows
220+
netstat -ano | findstr :31337
221+
222+
# macOS/Linux
223+
lsof -i :31337
224+
```
225+
226+
### Version mismatch
227+
228+
**Warning:** `server version X ≠ proxy version Y`
229+
230+
An older server is still running from before an update. Kill it and let the proxy spawn a fresh one:
231+
232+
```bash
233+
# Find and kill the server
234+
cat ~/.copilot/vector-memory.pid # get the PID
235+
kill <PID> # or Stop-Process -Id <PID> on Windows
236+
```
237+
238+
The next copilot launch will start the updated server automatically.
239+
240+
### Session store not found
241+
242+
**Error:** `Session store not found`
243+
244+
The file `~/.copilot/session-store.db` doesn't exist yet. This is normal on a fresh install — Copilot CLI creates it after your first conversation. Use copilot for a bit, then try again.
245+
246+
### Embedding model corrupt
247+
248+
**Symptom:** Server starts but search returns no results or errors.
249+
250+
The ONNX model file may be corrupt (e.g., interrupted download). The server self-heals on restart — kill the server and let it re-launch:
251+
252+
```bash
253+
cat ~/.copilot/vector-memory.pid
254+
kill <PID>
255+
```
256+
257+
If it persists, delete the model cache and reinstall:
258+
259+
```bash
260+
rm -rf node_modules/@huggingface/transformers/.cache
261+
npm run postinstall
262+
```
263+
187264
## License
188265

189266
MIT — see [LICENSE](LICENSE).

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function validateServer(pingResult) {
4545
throw new Error(
4646
`Port ${PORT} is owned by user "${pingResult.user}" (expected "${EXPECTED_USER}"). ` +
4747
`Fix: set VECTOR_MEMORY_PORT to a unique port in ~/.copilot/mcp-config.json — ` +
48-
`see https://github.com/BrainSlugs83/GithubCopilotCLI-VectorMemoryMCP#multi-user-setup`
48+
`see https://github.com/BrainSlugs83/GithubCopilotCLI-VectorMemoryMCP#port-owned-by-another-user`
4949
);
5050
}
5151

@@ -115,7 +115,7 @@ async function ensureServer() {
115115
throw new Error(
116116
`Vector memory server failed to start — port ${PORT} may be in use by another service. ` +
117117
`Fix: set VECTOR_MEMORY_PORT to an unused port in ~/.copilot/mcp-config.json — ` +
118-
`see https://github.com/BrainSlugs83/GithubCopilotCLI-VectorMemoryMCP#environment-variables`
118+
`see https://github.com/BrainSlugs83/GithubCopilotCLI-VectorMemoryMCP#port-occupied-by-another-service`
119119
);
120120
}
121121

0 commit comments

Comments
 (0)