Troubleshooting
Common problems connecting Mirth to Synura and how to fix them.
Connection refused on localhost:6661
Section titled “Connection refused on localhost:6661”Symptom: Mirth Server Log shows java.net.ConnectException: Connection refused: connect every poll cycle.
Cause: stunnel is not running, or is not configured to listen on port 6661.
Fix:
-
Check if stunnel is running:
Terminal window # WindowsGet-Service stunnelTerminal window # Linuxsystemctl status stunnel4 -
If stunnel is stopped, start it:
Terminal window # WindowsStart-Service stunnelTerminal window # Linuxsudo systemctl start stunnel4 -
On Windows Server 2016, the stunnel service may not auto-start after installation. Set it to start automatically:
Terminal window Set-Service stunnel -StartupType Automatic -
Verify the listener:
Terminal window # Windowsnetstat -an | findstr 6661You should see
LISTENINGon127.0.0.1:6661.
TLS handshake failed
Section titled “TLS handshake failed”Symptom: stunnel connects but the TLS handshake fails. In stunnel logs: SSL_connect: error or tlsv1 alert internal error.
Cause: One of:
- The stunnel configuration points to the wrong hostname
- SNI is not being sent correctly
- A network appliance is intercepting TLS traffic
Fix:
-
Enable stunnel debug logging. Add these lines to the top of your stunnel configuration file:
output = C:\stunnel.logdebug = 7Restart stunnel. Wait for a poll cycle. Check
C:\stunnel.logfor detail. -
Verify the configuration file has the correct subdomain:
[synura]client = yesaccept = 127.0.0.1:6661connect = {subdomain}.synura.io:443 -
Test the TLS connection independently:
Terminal window openssl s_client -connect {subdomain}.synura.io:443 -servername {subdomain}.synura.ioYou should see
CN=*.synura.ioin the certificate. If you see a different certificate (e.g. your corporate proxy), your network is intercepting TLS — speak to your IT team.
Connection timeout
Section titled “Connection timeout”Symptom: Connection hangs and eventually times out. Network test also times out.
Cause: A firewall or network policy is blocking outbound TCP 443 to synura.io.
Fix:
-
Test connectivity from the Mirth server:
Terminal window Test-NetConnection {subdomain}.synura.io -Port 443 -
If
TcpTestSucceededisFalse, outbound port 443 is blocked. Ask your network team to allow outbound TCP 443 from the Mirth server tosynura.io. -
Note that Synura Connect uses MLLP over TLS, which is not HTTP. It cannot pass through a standard HTTP proxy. If your organisation routes all traffic through an HTTP proxy, the Synura Connect connection must bypass it or use a TCP-level proxy (SOCKS or transparent TCP).
Channel polling but no messages appearing
Section titled “Channel polling but no messages appearing”Symptom: The channel is Started and polling (you can see it in the Connection Log moving between Reading and Idle), but the Received count stays at 0.
Cause: One of:
- The mailbox is empty — no messages have been queued for your endpoint
- The sending facility code in the channel does not match the endpoint configuration in Synura
- The channel script has a silent parsing error
Fix:
-
Check the Mirth Server Log for any entries starting with
Synura poll:. If you seeSynura poll: received MAILBOX^..., messages are being received but may be filtered or errored downstream. -
If the Server Log is completely silent (no
Synura pollentries at all), the script may be failing silently. Add temporary debug logging — change the first line aftersocket.close()to:var response = '' + buffer.toString('UTF-8');logger.info('DEBUG: response length=' + response.length);Redeploy and check the Server Log.
-
Verify your sending facility code matches what is registered in the Synura dashboard. The code in the channel’s
CONFIG.sendingFacilitymust exactly match the endpoint’s sending facility in Synura. -
Ask Synura support to queue a test message to your endpoint, or use the Synura dashboard to confirm messages are waiting.
Mirth Administrator does not launch
Section titled “Mirth Administrator does not launch”Symptom: Double-clicking the Mirth Connect Administrator shortcut or mcmanager.exe does nothing.
Cause: The Mirth Administrator requires Java Web Start (javaws), which is only included in Oracle JDK 8. OpenJDK and Corretto do not include it.
Fix:
-
Install Oracle JDK 8 if you haven’t already.
-
On Windows Server 2016, the Mirth Administrator may not install automatically during Mirth setup. Check if the launcher exists:
Terminal window ls "C:\Program Files\Mirth Connect\public_html\installers\*administrator*"If the file
mirth-administrator-launcher-1.1.0-windows-x64.exeis present, run it to install the Administrator. -
For Mirth 4.x, the Administrator is a standalone application and does not require Java Web Start.
NullPointerException in Server Log
Section titled “NullPointerException in Server Log”Symptom: Server Log shows java.lang.NullPointerException: null after the channel processes messages.
Cause: The channel script is passing null to $gc() (Mirth’s global channel map). Mirth 3.8.1 does not accept null values.
Fix:
Check the channel JavaScript for any lines like:
$gc('synura_cursor', null);Replace with:
$gc('synura_cursor', '');This applies to all $gc calls — always use empty string, never null.
Messages received but count seems wrong
Section titled “Messages received but count seems wrong”Symptom: You queued 3 messages but only see 1 or 2 in the Received count.
Cause: The channel requests one message per poll cycle. Multiple messages are drained across consecutive polls using continuation tokens (DSC segments). If the poll interval is 5 minutes, 3 messages take 15 minutes to fully drain.
This is normal behaviour. The channel will continue polling until all messages are delivered.
To drain faster, reduce the poll interval in the channel’s Source settings (e.g. to 15000ms / 15 seconds). At 5-second polling, the channel can drain 720+ messages per hour.
Support
Section titled “Support”If your issue is not listed here, contact support@synura.io with:
- Your Synura subdomain
- Mirth version number
- The last 50 lines of the Mirth Server Log
- stunnel log output (if available — see TLS handshake section for how to enable logging)