-
-
Notifications
You must be signed in to change notification settings - Fork 41
Troubleshooting
This page covers common issues and their solutions when using the Azure Event Grid Simulator.
Problem: Clients cannot connect to the simulator due to certificate issues.
Solutions:
-
Trust the development certificate:
dotnet dev-certs https --trust
-
For self-signed certificates in code, disable certificate validation:
{ "dangerousAcceptAnyServerCertificateValidator": true } -
For cURL, use the
-kflag to skip certificate verification:curl -k -X POST "https://localhost:60101/api/events..."
Problem: The simulator fails to start with a certificate error.
Solution: Generate a development certificate:
dotnet dev-certs https --trustFor Docker deployments, export a certificate file:
dotnet dev-certs https --export-path ./azureEventGridSimulator.pfx --password YourPasswordPossible causes:
-
Subscriber is disabled - Check if the subscriber has
"disabled": true -
Topic is disabled - Check if the topic has
"disabled": true -
Filter not matching - Review filter configuration:
{ "filter": { "includedEventTypes": ["Order.Created"] } } -
Subscription validation failed - Check logs for validation errors. For local development, set
"disableValidation": true -
Endpoint unreachable - Verify the endpoint URL is correct and accessible from where the simulator is running
Problem: The simulator cannot connect to a subscriber running on localhost.
Solutions:
-
For Docker: Use
host.docker.internalinstead oflocalhost:{ "endpoint": "http://host.docker.internal:7071/api/MyFunction" } -
Verify the subscriber is running on the expected port
-
Check firewall settings that may be blocking the connection
Problem: The simulator starts but shows no topics.
Solutions:
-
Verify
appsettings.jsonexists in the working directory -
Check for JSON syntax errors in the configuration file
-
Verify topic configuration is correct:
{ "topics": [ { "name": "MyTopic", "port": 60101 } ] }
Problem: Invalid topic or subscriber name.
Solution: Use only alphanumeric characters and dashes:
- Valid:
my-topic-1,OrdersTopic,events-v2 - Invalid:
my_topic,my.topic,my topic
Problem: The simulator fails to start because the port is in use.
Solutions:
- Change the port in configuration
- Stop the process using the port:
# Find the process lsof -i :60101 # or on Windows netstat -ano | findstr :60101
Problem: Requests are rejected with a 401 error.
Solutions:
-
Verify the key matches - The
aeg-sas-keyheader must match the topic'skeyvalue exactly -
Check header name - Use
aeg-sas-key(notaeg-sas-tokenfor simple auth) -
Disable authentication for testing - Set
keytonull:{ "name": "MyTopic", "port": 60101, "key": null }
Problem: Using aeg-sas-token but getting authentication errors.
Possible causes:
- Token has expired (check the
eparameter) - Resource URL doesn't match
- Signature is incorrect
Problem: Events are received but not delivered.
Check:
- View the dashboard at
https://localhost:<port>/dashboard - Check for retry delays - failed deliveries are retried with exponential backoff
- Verify subscriber endpoint is responding
Problem: Events are going to dead-letter instead of being delivered.
Check the dead-letter files in the configured folder (default: ./dead-letters):
cat ./dead-letters/MyTopic/MySubscriber/*.jsonThe dead-letter file contains:
-
deadLetterReason- Why the event was dead-lettered -
lastHttpStatusCode- The last HTTP status code received -
lastErrorMessage- The error message from the last attempt
Common reasons:
- HTTP 400, 401, 403, 413 responses cause immediate dead-lettering
- Max retry attempts exceeded
- Event TTL expired
Problem: Cannot access the dashboard UI.
Solutions:
-
Verify dashboard is enabled:
{ "dashboardEnabled": true } -
Check the URL - Access at
https://localhost:<port>/dashboard -
Try a dedicated port:
{ "dashboardEnabled": true, "dashboardPort": 9000 }
Add Serilog configuration to appsettings.json:
{
"Serilog": {
"MinimumLevel": {
"Default": "Debug"
},
"WriteTo": [
{ "Name": "Console" }
]
}
}Verify the simulator is running:
curl -k https://localhost:60101/api/health
# Should return: OKIf you're still experiencing issues:
- Check the GitHub Issues for known problems
- Review the Architecture page to understand how the simulator works
- Open a new issue with:
- Your configuration (redact sensitive values)
- Error messages from logs
- Steps to reproduce the issue
Getting Started
Subscribers
Features
Deployment
Reference