@cronicorn/mcp-server 1.19.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -436
- package/dist/docs/api-reference.md +558 -0
- package/dist/docs/core-concepts.md +9 -1
- package/dist/docs/introduction.md +15 -5
- package/dist/docs/mcp-server.md +49 -69
- package/dist/docs/quick-start.md +11 -2
- package/dist/docs/self-hosting.md +10 -1
- package/dist/docs/technical/configuration-and-constraints.md +11 -2
- package/dist/docs/technical/coordinating-multiple-endpoints.md +11 -2
- package/dist/docs/technical/how-ai-adaptation-works.md +122 -385
- package/dist/docs/technical/how-scheduling-works.md +76 -2
- package/dist/docs/technical/reference.md +11 -2
- package/dist/docs/technical/system-architecture.md +57 -189
- package/dist/docs/troubleshooting.md +392 -0
- package/dist/docs/use-cases.md +10 -1
- package/package.json +1 -1
- package/dist/docs/competitive-analysis.md +0 -324
- package/dist/docs/developers/README.md +0 -29
- package/dist/docs/developers/authentication.md +0 -121
- package/dist/docs/developers/environment-configuration.md +0 -103
- package/dist/docs/developers/quality-checks.md +0 -68
- package/dist/docs/developers/quick-start.md +0 -87
- package/dist/docs/developers/workspace-structure.md +0 -174
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: troubleshooting
|
|
3
|
+
title: Troubleshooting Guide
|
|
4
|
+
description: Diagnose and fix common issues with endpoints, AI adaptation, and authentication
|
|
5
|
+
tags:
|
|
6
|
+
- user
|
|
7
|
+
- troubleshooting
|
|
8
|
+
- support
|
|
9
|
+
sidebar_position: 8
|
|
10
|
+
mcp:
|
|
11
|
+
uri: file:///docs/troubleshooting.md
|
|
12
|
+
mimeType: text/markdown
|
|
13
|
+
priority: 0.85
|
|
14
|
+
lastModified: 2026-02-03T00:00:00Z
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Troubleshooting Guide
|
|
18
|
+
|
|
19
|
+
**TL;DR:** Most issues fall into three categories: endpoint not running (check pause state, `nextRunAt`, locks), AI not adapting (check hint expiry, response bodies, quota), or authentication problems (check API key, OAuth flow).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Endpoint Issues
|
|
24
|
+
|
|
25
|
+
### Endpoint Not Running
|
|
26
|
+
|
|
27
|
+
**Symptoms:** No executions appear in run history
|
|
28
|
+
|
|
29
|
+
**Check pause state:**
|
|
30
|
+
1. Open endpoint details
|
|
31
|
+
2. Look for "Paused until" field
|
|
32
|
+
3. If paused, click **Resume** or wait until the pause time passes
|
|
33
|
+
|
|
34
|
+
**Check `nextRunAt`:**
|
|
35
|
+
1. View endpoint details
|
|
36
|
+
2. Check when next run is scheduled
|
|
37
|
+
3. If far in the future, verify baseline schedule or check for long `maxIntervalMs`
|
|
38
|
+
|
|
39
|
+
**Check for stuck lock (`_lockedUntil`):**
|
|
40
|
+
|
|
41
|
+
If a Scheduler crashed mid-execution, the endpoint may be locked. Locks expire after 30 seconds, but in rare cases:
|
|
42
|
+
1. Wait 30-60 seconds
|
|
43
|
+
2. If still stuck, check if the scheduler worker is running
|
|
44
|
+
3. The endpoint should auto-recover when the lock expires
|
|
45
|
+
|
|
46
|
+
**Check job status:**
|
|
47
|
+
|
|
48
|
+
If the parent job is paused or archived, endpoints won't run.
|
|
49
|
+
|
|
50
|
+
### Endpoint Running Too Frequently
|
|
51
|
+
|
|
52
|
+
**Symptoms:** Runs more often than expected, potentially hitting rate limits
|
|
53
|
+
|
|
54
|
+
**Check active AI interval hint:**
|
|
55
|
+
1. View endpoint details
|
|
56
|
+
2. Look for "AI Hint" section
|
|
57
|
+
3. If present, the AI has temporarily changed the interval
|
|
58
|
+
4. Wait for TTL to expire, or use **Clear Hints** to revert immediately
|
|
59
|
+
|
|
60
|
+
**Check `minIntervalMs`:**
|
|
61
|
+
|
|
62
|
+
If set too low, AI can tighten the schedule aggressively.
|
|
63
|
+
|
|
64
|
+
**Check for one-shot hint loop:**
|
|
65
|
+
|
|
66
|
+
If `propose_next_time` is called repeatedly, the endpoint runs frequently. Check AI analysis sessions for reasoning.
|
|
67
|
+
|
|
68
|
+
### Endpoint Running Too Slowly
|
|
69
|
+
|
|
70
|
+
**Symptoms:** Long gaps between executions
|
|
71
|
+
|
|
72
|
+
**Check `maxIntervalMs`:**
|
|
73
|
+
|
|
74
|
+
This constraint caps how far apart runs can be. If not set, AI can relax the schedule significantly.
|
|
75
|
+
|
|
76
|
+
**Check exponential backoff:**
|
|
77
|
+
|
|
78
|
+
After failures, the interval increases exponentially (up to 32x baseline):
|
|
79
|
+
|
|
80
|
+
| Failures | Multiplier |
|
|
81
|
+
|----------|------------|
|
|
82
|
+
| 0 | 1x |
|
|
83
|
+
| 1 | 2x |
|
|
84
|
+
| 2 | 4x |
|
|
85
|
+
| 3 | 8x |
|
|
86
|
+
| 4 | 16x |
|
|
87
|
+
| 5+ | 32x |
|
|
88
|
+
|
|
89
|
+
To reset: use **Reset Failures** in the UI or API.
|
|
90
|
+
|
|
91
|
+
**Check baseline configuration:**
|
|
92
|
+
|
|
93
|
+
Verify the baseline cron or interval is what you intended.
|
|
94
|
+
|
|
95
|
+
### Endpoint Timing Out
|
|
96
|
+
|
|
97
|
+
**Symptoms:** Runs fail with timeout errors
|
|
98
|
+
|
|
99
|
+
**Increase timeout:**
|
|
100
|
+
1. Edit endpoint
|
|
101
|
+
2. Increase `timeoutMs` (default: 30 seconds, max: 30 minutes)
|
|
102
|
+
|
|
103
|
+
**Check if your API is slow:**
|
|
104
|
+
- Look at run durations in history
|
|
105
|
+
- If consistently near timeout, your API may need optimization
|
|
106
|
+
|
|
107
|
+
### Endpoint Returning Errors
|
|
108
|
+
|
|
109
|
+
**Symptoms:** Runs complete but show failure status
|
|
110
|
+
|
|
111
|
+
**Check run details:**
|
|
112
|
+
1. Click on a failed run
|
|
113
|
+
2. View error message and response body
|
|
114
|
+
3. Check HTTP status code
|
|
115
|
+
|
|
116
|
+
**Common causes:**
|
|
117
|
+
- 401/403: Authentication issue with your endpoint
|
|
118
|
+
- 404: Endpoint URL changed
|
|
119
|
+
- 500: Your API is returning errors
|
|
120
|
+
- Timeout: Request took too long
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## AI Adaptation Issues
|
|
125
|
+
|
|
126
|
+
### AI Not Adapting
|
|
127
|
+
|
|
128
|
+
**Symptoms:** Schedule never changes despite varying conditions
|
|
129
|
+
|
|
130
|
+
**Check if AI hints are active:**
|
|
131
|
+
1. View endpoint details
|
|
132
|
+
2. Look for "AI Hint" section
|
|
133
|
+
3. If empty, AI hasn't proposed changes
|
|
134
|
+
|
|
135
|
+
**Check hint expiry:**
|
|
136
|
+
|
|
137
|
+
Hints have TTLs (default: 60 minutes). If expired:
|
|
138
|
+
- AI hasn't re-analyzed yet
|
|
139
|
+
- Or AI decided no changes needed
|
|
140
|
+
|
|
141
|
+
**Verify response bodies include metrics:**
|
|
142
|
+
|
|
143
|
+
AI needs data to analyze. Structure responses with:
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"queue_depth": 45,
|
|
147
|
+
"error_rate_pct": 1.2,
|
|
148
|
+
"healthy": true
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If responses are empty or lack metrics, AI can't detect patterns.
|
|
153
|
+
|
|
154
|
+
**Check analysis sessions:**
|
|
155
|
+
|
|
156
|
+
View recent AI analysis for the endpoint:
|
|
157
|
+
- Look for reasoning explaining decisions
|
|
158
|
+
- Check token usage (quota issues)
|
|
159
|
+
- Verify `next_analysis_at` is reasonable
|
|
160
|
+
|
|
161
|
+
**Check quota limits:**
|
|
162
|
+
|
|
163
|
+
If quota is exceeded, AI analysis is skipped. Check your plan limits.
|
|
164
|
+
|
|
165
|
+
### AI Making Bad Decisions
|
|
166
|
+
|
|
167
|
+
**Symptoms:** AI tightens when it should relax, or vice versa
|
|
168
|
+
|
|
169
|
+
**Use constraints to limit AI range:**
|
|
170
|
+
- Set `minIntervalMs` to prevent too-frequent runs
|
|
171
|
+
- Set `maxIntervalMs` to prevent too-infrequent runs
|
|
172
|
+
- Constraints are hard limits AI cannot override
|
|
173
|
+
|
|
174
|
+
**Clear hints to revert:**
|
|
175
|
+
|
|
176
|
+
Use **Clear Hints** to immediately return to baseline. Then:
|
|
177
|
+
1. Review AI analysis sessions for reasoning
|
|
178
|
+
2. Consider adjusting response body data
|
|
179
|
+
3. Add better thresholds to guide AI
|
|
180
|
+
|
|
181
|
+
**Review AI reasoning:**
|
|
182
|
+
|
|
183
|
+
Each analysis session logs the AI's reasoning. Look for:
|
|
184
|
+
- What data it saw
|
|
185
|
+
- What trends it detected
|
|
186
|
+
- Why it made its decision
|
|
187
|
+
|
|
188
|
+
### AI Analysis Not Running
|
|
189
|
+
|
|
190
|
+
**Symptoms:** No recent analysis sessions
|
|
191
|
+
|
|
192
|
+
**Check if endpoint has recent runs:**
|
|
193
|
+
|
|
194
|
+
AI only analyzes endpoints that ran recently.
|
|
195
|
+
|
|
196
|
+
**Check AI Planner worker:**
|
|
197
|
+
|
|
198
|
+
The AI Planner runs as a separate service. Verify it's running.
|
|
199
|
+
|
|
200
|
+
**Check AI re-analysis schedule:**
|
|
201
|
+
|
|
202
|
+
AI controls when it next analyzes. A stable endpoint might not be re-analyzed for hours.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Authentication Issues
|
|
207
|
+
|
|
208
|
+
### API Key Not Working
|
|
209
|
+
|
|
210
|
+
**Symptoms:** 401 Unauthorized responses
|
|
211
|
+
|
|
212
|
+
**Check header format:**
|
|
213
|
+
```bash
|
|
214
|
+
# Correct
|
|
215
|
+
curl -H "x-api-key: cron_abc123..."
|
|
216
|
+
|
|
217
|
+
# Wrong (case-sensitive)
|
|
218
|
+
curl -H "X-API-Key: cron_abc123..."
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Check key is active:**
|
|
222
|
+
1. Go to Settings → API Keys
|
|
223
|
+
2. Verify the key hasn't been revoked
|
|
224
|
+
3. Check key permissions
|
|
225
|
+
|
|
226
|
+
**Check key hasn't expired:**
|
|
227
|
+
|
|
228
|
+
API keys may have expiration dates set at creation.
|
|
229
|
+
|
|
230
|
+
### OAuth Flow Failing
|
|
231
|
+
|
|
232
|
+
**Symptoms:** Can't complete device authorization
|
|
233
|
+
|
|
234
|
+
**Token polling returns "pending":**
|
|
235
|
+
|
|
236
|
+
This is normal—keep polling until the user completes authorization in the browser.
|
|
237
|
+
|
|
238
|
+
**Authorization denied:**
|
|
239
|
+
|
|
240
|
+
The user clicked "Deny" instead of "Approve". Restart the flow.
|
|
241
|
+
|
|
242
|
+
**Token expired:**
|
|
243
|
+
|
|
244
|
+
Device codes expire after 30 minutes. Restart the flow.
|
|
245
|
+
|
|
246
|
+
### Session Issues
|
|
247
|
+
|
|
248
|
+
**Symptoms:** Logged out unexpectedly, session errors
|
|
249
|
+
|
|
250
|
+
**Clear cookies and retry:**
|
|
251
|
+
|
|
252
|
+
1. Log out completely
|
|
253
|
+
2. Clear browser cookies for the Cronicorn domain
|
|
254
|
+
3. Log in again
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## MCP Server Issues
|
|
259
|
+
|
|
260
|
+
### Can't Connect
|
|
261
|
+
|
|
262
|
+
**Symptoms:** MCP server doesn't respond or errors on startup
|
|
263
|
+
|
|
264
|
+
**Check installation:**
|
|
265
|
+
```bash
|
|
266
|
+
npx -y @cronicorn/mcp-server --version
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Check configuration path:**
|
|
270
|
+
|
|
271
|
+
Verify MCP config is in the correct location for your assistant.
|
|
272
|
+
|
|
273
|
+
### OAuth Not Working
|
|
274
|
+
|
|
275
|
+
**Symptoms:** Device flow fails or no browser opens
|
|
276
|
+
|
|
277
|
+
**Manual verification:**
|
|
278
|
+
|
|
279
|
+
If the browser doesn't open automatically:
|
|
280
|
+
1. Copy the URL from the terminal output
|
|
281
|
+
2. Open it manually in your browser
|
|
282
|
+
3. Complete authorization
|
|
283
|
+
|
|
284
|
+
**Check network:**
|
|
285
|
+
|
|
286
|
+
The MCP server needs internet access to reach the Cronicorn API.
|
|
287
|
+
|
|
288
|
+
### Credentials Not Persisting
|
|
289
|
+
|
|
290
|
+
**Symptoms:** Must re-authorize every time
|
|
291
|
+
|
|
292
|
+
**Check file permissions:**
|
|
293
|
+
|
|
294
|
+
Credentials are stored locally. Verify the MCP server can write to its config directory.
|
|
295
|
+
|
|
296
|
+
**Reset credentials:**
|
|
297
|
+
```bash
|
|
298
|
+
npx -y @cronicorn/mcp-server logout
|
|
299
|
+
npx -y @cronicorn/mcp-server login
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Self-Hosting Issues
|
|
305
|
+
|
|
306
|
+
### Database Connection Errors
|
|
307
|
+
|
|
308
|
+
**Check PostgreSQL is running:**
|
|
309
|
+
```bash
|
|
310
|
+
docker ps | grep postgres
|
|
311
|
+
# Or
|
|
312
|
+
pnpm db
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Check connection string:**
|
|
316
|
+
|
|
317
|
+
Verify `DATABASE_URL` environment variable is correct.
|
|
318
|
+
|
|
319
|
+
**Check migrations:**
|
|
320
|
+
```bash
|
|
321
|
+
pnpm db:migrate
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Workers Not Starting
|
|
325
|
+
|
|
326
|
+
**Check environment variables:**
|
|
327
|
+
|
|
328
|
+
Both Scheduler and AI Planner need proper configuration.
|
|
329
|
+
|
|
330
|
+
**Check logs:**
|
|
331
|
+
```bash
|
|
332
|
+
pnpm dev:scheduler
|
|
333
|
+
pnpm dev:ai-planner
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Look for startup errors.
|
|
337
|
+
|
|
338
|
+
### Docker Issues
|
|
339
|
+
|
|
340
|
+
**Container not starting:**
|
|
341
|
+
```bash
|
|
342
|
+
docker compose logs
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Port conflicts:**
|
|
346
|
+
|
|
347
|
+
Check if ports (3333, 5173, 6666) are already in use.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Getting More Help
|
|
352
|
+
|
|
353
|
+
### Useful Diagnostics
|
|
354
|
+
|
|
355
|
+
When reporting issues, include:
|
|
356
|
+
- Endpoint ID
|
|
357
|
+
- Recent run IDs
|
|
358
|
+
- AI analysis session IDs
|
|
359
|
+
- Error messages from logs
|
|
360
|
+
|
|
361
|
+
### Checking System State
|
|
362
|
+
|
|
363
|
+
**Via UI:**
|
|
364
|
+
- Dashboard shows overall health
|
|
365
|
+
- Endpoint details show current state
|
|
366
|
+
- Run history shows execution patterns
|
|
367
|
+
|
|
368
|
+
**Via API:**
|
|
369
|
+
```bash
|
|
370
|
+
# Get endpoint health
|
|
371
|
+
curl -H "x-api-key: KEY" \
|
|
372
|
+
https://api.cronicorn.com/api/endpoints/ID/health
|
|
373
|
+
|
|
374
|
+
# Get recent runs
|
|
375
|
+
curl -H "x-api-key: KEY" \
|
|
376
|
+
https://api.cronicorn.com/api/endpoints/ID/runs?limit=10
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**Via MCP:**
|
|
380
|
+
```
|
|
381
|
+
"Show me the health of my main-api endpoint"
|
|
382
|
+
"What's the run history for payment-processor?"
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## See Also
|
|
388
|
+
|
|
389
|
+
- **[Quick Start](./quick-start.md)** - Basic setup guide
|
|
390
|
+
- **[How Scheduling Works](./technical/how-scheduling-works.md)** - Understand scheduling logic
|
|
391
|
+
- **[How AI Adaptation Works](./technical/how-ai-adaptation-works.md)** - Understand AI decisions
|
|
392
|
+
- **[Configuration and Constraints](./technical/configuration-and-constraints.md)** - Setting up constraints
|
package/dist/docs/use-cases.md
CHANGED
|
@@ -9,7 +9,8 @@ sidebar_position: 3
|
|
|
9
9
|
mcp:
|
|
10
10
|
uri: file:///docs/use-cases.md
|
|
11
11
|
mimeType: text/markdown
|
|
12
|
-
priority: 0.
|
|
12
|
+
priority: 0.75
|
|
13
|
+
lastModified: 2026-02-03T00:00:00Z
|
|
13
14
|
---
|
|
14
15
|
|
|
15
16
|
# Use Cases & Examples
|
|
@@ -206,3 +207,11 @@ Monthly billing: Cron "0 0 1 * *" (1st of month)
|
|
|
206
207
|
- Simple daily backup at 2am (basic cron is fine)
|
|
207
208
|
- Completely static schedules that never change
|
|
208
209
|
- Sub-second precision required (use a real-time system)
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## See Also
|
|
214
|
+
|
|
215
|
+
- **[Quick Start](./quick-start.md)** - Create your first job
|
|
216
|
+
- **[Core Concepts](./core-concepts.md)** - Understanding scheduling fundamentals
|
|
217
|
+
- **[Coordinating Multiple Endpoints](./technical/coordinating-multiple-endpoints.md)** - Advanced workflow patterns
|
package/package.json
CHANGED