=====4.2. Connection could not be established to the Service Broker===== **Issue** \\ When starting the Produmex Scan application, the following error message is displayed: \\ ''No connection could be made because the target machine actively refused it. '' {{ :implementation:scan:support:service_broker:scan_connection_error.png |}} When starting the Produmex PDC application, the following error message is displayed: \\ ''Connection could not be established to the Service Broker. Either it is not running or the application is not configured. Please run the configuration tool and/or check if the Service Broker has been started.'' {{ :implementation:scan:support:service_broker:pdc_connection_error.png |}} **Solution** \\ This document describes how to identify typical causes for this issue. It is possible it possible that your issue may be resolved by checking the listed steps. ====4.2.1. Produmex Service Broker is not running==== Check whether Produmex Service Broker is running or not. The connection cannot be established if the Service Broker is not running. {{ :implementation:scan:support:service_broker:sb_running.png |}} ====4.2.2. Produmex server component is not installed==== Check whether the Produmex server component is installed for the Service Broker. The installed server modules are listed on the Produmex Service Broker tab of the //ProdumexServiceBroker service configuration// window. {{ :implementation:scan:install:sb:installed_modules_scan.png |}} If not, the following error message is displayed: {{ :implementation:scan:support:service_broker:remote_server_error.png |}} ====4.2.3. Check the Service Broker log file==== If there are no error messages when starting up the Produmex Service Broker, check the log file of the Service Broker for more information. Please see: [[implementation:scan:supportguide:servicebroker#service_broker_cannot_be_started|4.1. Service Broker cannot be started]] ====4.2.4. Incorrect IP address or port number==== Run Configure Produmex Scan and check whether the correct IP address/server name and port number was added as the Server URL. {{ :implementation:scan:support:service_broker:scan_ip.png |}} ====4.2.5. Firewall block==== Check the firewall settings on the server. Make sure that both TCP and UDP connections are allowed to the port number of the Service Broker for the following services: * BxServiceBroker.Service.exe * BxServiceBroker.Console.exe {{ :implementation:scan:support:service_broker:firewall.png |}} ====4.2.6. No valid certificate==== When using https, make sure that you have a valid certificate that is bound to the port. For more information about configuring https and creating a self-signed certificate for Produmex Service Broker please see: [[implementation:scan:https|Configure HTTPS for Produmex Service Broker]] ====4.2.7. Network issues==== In order to identify network issues, simulate the calls Produmex application makes. The testing protocol suggested below goes in increasing order of complexity, and identifying the specific step where tests fail can be a very valuable piece of information in order to find out the root cause of the connectivity issue. ===4.2.7.1. Test access on the server=== First simulate the calls on the server hosting Produmex Service Broker. ==Produmex Service Broker Admin Page== Enter the following to the browser in order to access the Produmex Service Broker Admin Page: ''%%http://localhost:/%%'' \\ Where the PORT is the port number. {{ :implementation:scan:support:service_broker:admin_page.png |}} Then try to connect to the Produmex Service Broker Admin Page with the following: ''%%http://:/%%'' \\ Where the IP is the IP address of the hosting server and PORT is the port number. //If the hosting server has multiple IP addresses, it is recommended to try the connection with all IP addresses.// ==Database access== To simulate the database query, add the following to the browser: * Produmex Scan: ''%%http://localhost:/api/bxmobilelmsdatabases/%%'' * Produmex PDC & Produmex Operator: ''%%http://localhost:/api/broker_databases/%%'' Where the PORT is the port number. Then replace localhost with the IP address and check whether the connection can be established or not. Enter the following to the browser: - Produmex Scan: ''%%http://:/api/bxmobilelmsdatabases/%%'' - Produmex PDC & Produmex Operator: ''%%http://:/api/broker_databases/%%'' Where the IP is the IP address and the PORT is the port number. //If the hosting server has multiple IP addresses, it is recommended to try the connection with all IP addresses.// {{ :implementation:scan:support:service_broker:databases.png |}} If the connection cannot be established, it could mean that the Produmex Service Broker does not run or the server module is not installed. If the connection can be established with localhost but not with the IP address of the server, it can mean: * The IP address is not correct. * The IP address is not accessible. ===4.2.7.2. Test access on another computer=== If you were able to connect to the Produmex Service Broker Admin Page and the databases with both the localhost and the IP address of the server on the server, test the connection from another computer that is on the same network as the device(s) where the Produmex application runs. ==Produmex Service Broker Admin Page== To test the connection to the admin page, enter the following to a browser: ''%%http://:/%%'' \\ Where the IP is the IP address of the server where the Produmex Service Broker runs and PORT is the port number. //If the hosting server has multiple IP addresses, it is recommended to try the connection with all IP addresses.// ==Database access== To simulate the database query, add the following: * Produmex Scan: ''%%http://:/api/bxmobilelmsdatabases/%%'' * Produmex PDC & Produmex Operator: ''%%http://:/api/broker_databases/%%'' Where the IP is the IP address and the PORT is the port number. //If the hosting server has multiple IP addresses, it is recommended to try the connection with all IP addresses.// If the connection can be established on the server, but not on a different computer, then the issue is most likely that your network configuration, for example a firewall, is blocking the connection. We recommend that you contact your network administrator. ===4.2.7.3. Test access on the device=== If you were able to connect to the Admin Page on the server and on another computer, try to connect from the device. ==Produmex Service Broker Admin Page== To test the connection to the admin page, follow the steps described here: [[|7.2.1. Produmex Service Broker Admin Page]] ==Database access== To simulate the database query, follow the steps described here: [[|7.2.2. Database access]] If the connection can be established on the server and on a different computer, but not on the device, check the network settings on the device. ===4.2.7.4. Simulate other calls=== To learn more about the required network configuration, you can simulate the other calls as well on the server, a different computer or on the device. Calls, subsequent to the database query, require header authorization. These calls can be simulated with a help of a REST client. Follow these steps to set the Authorization header data: - Enter or select ‘Authorization’ as the Header name. - Specify the following value: ''%%@\:%%'' \\ For example: * With login information: ''%%0@TEST_SCAN\1:1234%%'' * Without login information: ''%%0@TEST_SCAN\:%%'' - Encode the value into base64 with any Base64 encoder. \\ For example: * With login information: ''%%MEBURVNUX1NDQU5cMToxMjM0%%'' * Without login information: ''%%MEBURVNUX1NDQU5cOg==%%'' - Set the Header value to ''%%Basic %%'' \\ For example: * With login information: ''%%Basic MEBURVNUX1NDQU5cMToxMjM0%%'' * Without login information: ''%%Basic MEBURVNUX1NDQU5cOg==%%'' {{ :implementation:scan:support:service_broker:rest_client.png |}} Produmex Service Broker logs the successful calls to the access log, which is located in C:\ProgramData\BX\BX Service Broker\Logs\. You can select any calls from the access log to simulate. ==Example calls for Produmex Scan== //Calls when the application starts// \\ To check the startup configurations add ''%%http://:/api/bxmobilelmscommon/%%'' as the ‘Request URL’. To check further configurations, add ''%%http://:/api/bxmobilelmscommon/?dummy=1%%'' as the ‘Request URL’. To check Produmex Scan customizations, add ''%%http://:/api/bxmobilelmscustomization/?sinceDate=0001-01-01&expandFileData=True%%'' as the ‘Request URL’. //Calls when the employee ID is added// \\ To load the employee details, add ''%%http://:/api/bxmobilelmsemployee/?pinCode=1%%'' as the ‘Request URL’. Replace the //pinCode// value with the Pin Code or the employee ID of the employee you would like to check. To get the printers set for a given employee, add ''%%http://:/api/bxmobilelmsprinting/?employeeID=1%%'' as the ‘Request URL’. Replace the //employeeID// with the employee ID of the given employee. //Call when the Login button is pressed// \\ To test the login date, add ''%%http://:/api/bxmobilelmsemployee/?employeeID=1&password=1234%%'' as the ‘Request URL’. Replace the //emplyoeeID// with the employee ID of the given employee and the password with the password. //Call when the Logout button is pressed// \\ To simulate the logout, add ''%%http://:/api/bxmobilelmscommon/?dummyUser=dummy%%'' as the ‘Request URL’. ==Example calls for Produmex PDC== //Calls when the application starts// \\ To check the startup configurations add ''%%http://:/api/bxppsmobilepdccommon/%%'' as the ‘Request URL’. To check further configurations, add ''%%http://:/api/bxppsmobilepdccommon/?dummy=1%%'' as the ‘Request URL’. To see the extended terminal configurations, add ''%%http://:/api/bxppsmobilepdccommon/?employeeID=0&terminalID=1%%'' as the ‘Request URL’. To see the customizations, add ''%%http://:/api/bxppsmobilepdccustomization/?sinceDate=0001-01-01&expandFileData=True%%'' as the ‘Request URL’. ==Example calls for Produmex Operator== //Calls when the application starts// \\ To get admin info, add ''%%http://:/api/bxmwcommon%%'' as the ‘Request URL’. To check the configurations, add ''%%http://:/api/bxmwcommon/?configuration=configuration%%'' as the ‘Request URL’. To see the customizations, add ''%%http://:/api/bxmwcustomization?sinceDate=0001-01-01&expandFileData=True%%'' as the ‘Request URL’.