How can a mid server in local network connect Hermes Kafka?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 08:11 AM - edited 01-23-2025 08:31 AM
We are trying to replicate data from ServiceNow to our local Kafka servers. We are using Stream Connect message replication through mid server.
Does mid server connects Hermes Kafka through standard Kafka protocol (direct connection) or other mechanism like Kafka Rest API?
Our mid server is behind a firewall in a local network. Since proxy is not supported by standard Kafka, how can we connect Hermes Kafka from our local network?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 12:22 PM
Depending how you are connecting to Kafka, tie it to a MID Server
If you can connect directly to the Kafka database below is an example Data Source.
Notice the "Type" and "Use MID Server" fields
Or if setting up a REST Message record in the Platform Web Service module the MID server can be set via script
Platform Web Service example:
Or if using a REST Step in Flow Designer make sure to check the "Use MID" field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 12:34 PM
Thanks for the reply. I think it's different. We are using the OOB Stream Connect Message Replication of Servicenow. I believe the connection between Mid Server and Stream Connect Hermes Kafka is implemented by a MIDExtension - MessageReplicationExtension implemented by ServiceNow, which is transparent to end users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
🧩 KB 2349888 Summary – “FAILED: Source not found”
Applies to:
ServiceNow Stream Connect / Hermes Kafka Message Replication
Symptom:
Replication record (sys_kafka_topic_replication) shows
Status: FAILED Error message: Source not found
MID logs include:
<uxa-sync-service> <receive_message>Unable to receive message ... Reason: HermesIllegalStateException</receive_message> <send_message>Unable to create topic ... Reason: HermesIllegalStateException</send_message> </uxa-sync-service>
⚙️ Root Cause
The MID Server cannot reach the Hermes gateway (ServiceNow’s internal Kafka broker endpoint).
This is a network/TLS connectivity issue, not a configuration error in the topic record itself.
Verify Hermes Port Access
Run from the MID Server shell:openssl s_client -connect <your_instance>.service-now.com:4000 -servername <your_instance>.service-now.com
If you see a valid TLS certificate → ✅ connectivity ok
If you see connect: Connection timed out or refused → ❌ firewall/proxy blocking port 4000
Firewall Requirements
The MID must have outbound access through the firewall to:Host: <instance>.service-now.com
Ports: 4000–4020 (exact range per documentation)
Protocol: TCP / TLS (used by Hermes)
Network Team Action
Ask your network administrator to open the Hermes port range (4000–4020) for outbound connections from your MID subnet or Kubernetes namespace.Re-run replication
Once the ports are open and the TLS test succeeds, re-trigger the replication job or restart the MID to re-initialize the Hermes connection.
Check Command / Step Expected Result
| TLS connectivity | openssl s_client -connect instance.service-now.com:4000 -servername instance.service-now.com | Successful handshake |
| Firewall ports | 4000–4020 open (TCP) | Reachable |
| After fix | Re-run topic replication | Status → SUCCESS |
So in your case, the “Source not found” failure is not because Hermes lacks the topic — it’s because your MID Server can’t reach Hermes on port 4000.
→ Once you confirm connectivity with the openssl command (or open that port range), your replication jobs should succeed.
