ServiceNow Troubleshooting
Authentication Issues
Basic Auth Failures (401 Unauthorized)
Symptoms:
- Connector tests return HTTP 401 Unauthorized
- Logs show
AUTHENTICATION_FAILEDerrors
Common Causes and Solutions:
-
Invalid Credentials
# Test credentials directly curl -X GET 'https://dev12345.service-now.com/api/now/table/incident?sysparm_limit=1' \ -u 'username:password' \ -H 'Accept: application/json' -
Account Locked
- Too many failed attempts can lock the account
- Check System Security → User Administration → Users
-
Password Policy
- Some instances require periodic password changes
- Service accounts may need exemptions from password policies
OAuth2 Token Issues
Symptoms:
- Token refresh fails
INVALID_GRANTorEXPIRED_TOKENerrors
Solutions:
-
Regenerate Client Credentials
- Navigate to: System OAuth → Application Registry
- Generate new client secret
-
Check Redirect URI
- Must exactly match configured callback URL
- Protocol, domain, and path must all match
-
Token Lifetime
# Check token expiry ./im connector servicenow token-status
Connection Issues
Instance Not Reachable
Symptoms:
- Connection timeout errors
- DNS resolution failures
Debugging Steps:
-
Check Instance URL
# Verify instance is accessible curl -I https://dev12345.service-now.com -
Instance Hibernation (Developer Instances)
- ServiceNow developer instances hibernate after inactivity
- Log into the instance UI to wake it up
- Consider upgrading to a non-hibernating instance for production
-
IP Allowlist
- Some instances restrict API access by IP
- Check: System Properties → Security → IP Address Access Control
SSL/TLS Errors
Symptoms:
SSL certificate verify failederrorsunable to get local issuer certificate
Solutions:
-
Certificate Validation
# Check certificate chain openssl s_client -connect dev12345.service-now.com:443 -showcerts -
Corporate Proxy Issues
- Proxies may inject their own certificates
- Configure the platform to trust your CA bundle
Sync Issues
Incidents Not Creating in ServiceNow
Symptoms:
- Platform incidents don’t appear in ServiceNow
- No outbound sync in logs
Debugging:
-
Check Table API Access
# Verify user can create incidents curl -X POST 'https://dev12345.service-now.com/api/now/table/incident' \ -u 'username:password' \ -H 'Content-Type: application/json' \ -d '{"short_description": "Test incident"}' -
Check User Roles
- User needs
itilorincident_managerrole - Navigate to: User Administration → Users → [user] → Roles
- User needs
-
Business Rules
- Custom business rules may block incident creation
- Check: System Definition → Business Rules
Field Mapping Errors
Symptoms:
- Sync fails with “Unknown column” errors
- Custom fields not populated
Solutions:
-
Find Field Names
# List incident table columns curl -X GET 'https://dev12345.service-now.com/api/now/table/sys_dictionary?sysparm_query=name=incident' \ -u 'username:password' \ -H 'Accept: application/json' -
Custom Field Names
- ServiceNow custom fields use
u_prefix (e.g.,u_custom_field) - Check table structure in: System Definition → Tables → incident
- ServiceNow custom fields use
Bidirectional Sync Conflicts
Symptoms:
- Updates ping-pong between systems
- Unexpected field overwrites
Solutions:
-
Configure Field Ownership
# In connector config field_ownership: severity: platform # Platform is authoritative state: servicenow # ServiceNow is authoritative -
Use Change Detection
- Enable timestamp-based conflict detection
- Most recent update wins with audit trail
-
Check Update Timestamps
./im incident show INC-123 --show-sync-status
API Rate Limiting
Hitting Concurrent Request Limits
Symptoms:
- HTTP 429 Too Many Requests
Exceeded maximum concurrent requestserrors
Solutions:
-
Check Rate Limit Settings
- ServiceNow limits concurrent sessions per user
- Check: System Properties → Outbound HTTP requests
-
Implement Request Queuing
./im connector servicenow configure --max-concurrent 5 -
Use Service Account
- Dedicated service accounts have separate limits
- Avoid sharing credentials with interactive users
API Quota Exhausted
Symptoms:
- Requests fail with quota errors
- Sync stops completely
Solutions:
-
Check API Usage
- Navigate to: System Diagnostics → Stats → REST API Usage
-
Optimize Sync Frequency
./im connector servicenow configure --sync-interval 120s
Metrics and Observability
ServiceNow Integration Metrics
| Metric | Description |
|---|---|
servicenow_incidents_created_total |
Incidents created in ServiceNow |
servicenow_incidents_updated_total |
Incident updates synced |
servicenow_api_requests_total |
API requests by endpoint |
servicenow_api_latency_seconds |
API response time histogram |
servicenow_sync_conflicts_total |
Bidirectional sync conflicts |
# Query metrics
curl -s http://localhost:9090/metrics | grep servicenow_Enable Debug Logging
export LOG_LEVEL=debug
export SERVICENOW_DEBUG=true
./im serveTracing API Calls
Look for trace IDs in logs to track request flow:
trace_id=abc123 span_id=def456 servicenow.incident_number=INC0012345
Common Error Codes
| Error | Meaning | Solution |
|---|---|---|
INVALID_TABLE |
Table name not found | Verify table exists and is accessible |
INSUFFICIENT_RIGHTS |
Permission denied | Check user roles |
DUPLICATE_ENTRY |
Record already exists | Check correlation ID settings |
VALIDATION_ERROR |
Required field missing | Review field mappings |
Getting Help
If issues persist:
- Enable debug logging and collect relevant log sections
- Check the GitHub Issues for similar problems
- Open a new issue with:
- Error messages and ServiceNow error codes
- Configuration (redact credentials!)
- Instance version and type (Developer, Enterprise, etc.)