How to fix JDBC Bridge Error - No connection could be made because the target machine actively refused it 127.0.0.1:50433

Problem

When using the ZappySys JDBC-ODBC Bridge, you may occasionally encounter the following error:

No connection could be made because the target machine actively refused it 127.0.0.1:50433

This error indicates that the JDBC Bridge is unable to bind or connect to the required local port.

Cause

This issue typically occurs for one of the following reasons:

  1. The default port 50433 (used by the JDBC Bridge) is already in use by another application, causing a port conflict.

  2. The default port 50433 falls within a reserved port range on Windows.

How to diagnose the issue

Check if another application uses the port

  1. Open Resource Monitor (search in the Start menu) or a third-party tool such as TcpView.
  2. Go to the Network tab.
  3. In the TCP Connections section, sort by the Local Port column.
  4. Look for port 50433 and note which process is holding it.

Check if the port is in a reserved range

  1. Open the Command Prompt as an administrator.
  2. Run the following command
    netsh int ip show excludedportrange protocol=tcp
    
  3. If you see a range like below, that means 50433 is part of that reserved range.
    50400   50600
    

Solution

Below are multiple approaches to resolve this issue. You may only need to apply one of them.

Change the default port (recommended)

If you are using ZappySys ODBC PowerPack v2.0.2 or higher, you can change the default JDBC Bridge port.

  1. Go to the ZappySys ODBC Installation directory (Usually below this location).

    C:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack
    
  2. Find the file name JdbcBridge.properties.

  3. If the file does not exist, create it using the command below
    (replace 12345 with a port number that is not used by any other application):

    echo app.port=12345 > "C:\Program Files (x86)\ZappySys\ZappySys ODBC PowerPack\JdbcBridge.properties"
    
  4. If the file is already found, open it in a text editor and update the following line if found, else add a new line (Replace 50433 with any random port not used by any application).

    app.port=50433
    
  5. Save file changes.

  6. Test the JDBC Bridge again to verify that the error is resolved.

Restart the Windows NAT Driver service

In some cases, the Windows NAT Driver service may dynamically reserve ports.

  1. Open the Command Prompt as an administrator.

  2. Run the following command

    net stop winnat && net start winnat
    
  3. You should see output similar to the following:

    The Windows NAT Driver service was stopped successfully.
    The Windows NAT Driver service was started successfully.
    
  4. Test the JDBC Bridge again.

Restart java.exe to apply new settings

If you modified JdbcBridge.properties, you must restart the Java process so the new port settings take effect.

  1. Open Task Manager.

  2. Go to the Details tab.

  3. Sort by the Name column.

  4. Locate java.exe.

  5. Right-click and select End process tree.

Note: If multiple java.exe processes are running, add the Command Line column in Task Manager to identify the instance launched by ZappySys. Any command referencing JdbcBridge.jar belongs to ZappySys.

Verify the port status using netstat

After changing to the new port, you can confirm whether the old port is still in use with the following command.

  1. Open the Command Prompt.

  2. Run the following command (replace the port number as needed):

    netstat -ano | findstr :50433
    
  3. If no results are returned, the port is not in use. If entries appear, the port is still being used by another process.

Identify the process holding the port

If the port is still in use, follow these steps to identify the process:

  1. Run the command below and note the PID (Process ID) shown in the last column:

    netstat -ano | findstr :5000
    
  2. Open Task Manager.

  3. Go to the Details tab.

  4. Sort by the PID column.

  5. Locate the matching PID to identify the process using the port.

  6. To release the port, close the application gracefully if possible. Only terminate the process manually if no other option is available.

Additional resources

Still need help?

If the issue persists, please contact our support team: