SQL Database Troubleshooting: Difference between revisions

From RangerMSP Wiki - PSA software for MSPs and IT services providers
Jump to navigation Jump to search
No edit summary
 
(38 intermediate revisions by 4 users not shown)
Line 3: Line 3:
<br>
<br>
==Problem Description==
==Problem Description==
When setting up the Commit SQL Database (CSD), the client PCs running the CommitCRM client application cannot connect to the Commit SQL Database, and an error is displayed saying:
When setting up the SQL Database for RangerMSP, the client PCs running the RangerMSP client application cannot connect to the RangerMSP SQL Database, and an error is displayed saying:


  Procedure halted due to data server error.<br>Verify server is operating and this computer has access to the server folder.<br>(C:\Commit\DB)
  Procedure halted due to data server error.<br>Verify server is operating and this computer has access to the server folder.<br>(C:\RangerMSP\DB)


<br>
<br>
Line 13: Line 13:


==Explanation==
==Explanation==
This problem occurs when the client PCs try to connect to the Commit SQL Database, which is installed on your server, and it doesn’t “answer” to their connection requests.
This problem occurs when the client PCs try to connect to the SQL Database for RangerMSP, which is installed on your server, and it doesn’t “answer” to their connection requests.
By default, CommitCRM clients send a UDP broadcast message on the network, checking where the Commit SQL Database server is found; if found the server answers with the relevant information for the client to connect to it (IP, Port, etc.). This handshake process may require allowing UDP broadcasts inside you LAN. Usually this does not require any special setup; however, with some advanced network security settings it may be required.
By default, RangerMSP clients send a UDP broadcast message on the network, checking where the SQL Database for RangerMSP server is found; if found the server answers with the relevant information for the client to connect to it (IP, Port, etc.). This handshake process may require allowing UDP broadcasts inside you LAN. Usually this does not require any special setup; however, with some advanced network security settings it may be required.
It is also required that the Commit SQL Database, which runs on your server as a Windows service called Advantage Database Server, will be up and running and be allowed to communicate with your LAN.
It is also required that the SQL Database for RangerMSP, which runs on your server as a Windows service called Advantage Database Server, will be up and running and be allowed to communicate with your LAN.


<br>
<br>


==Troubleshooting Steps==
==Troubleshooting Steps==
In order to assure the Commit SQL Database can communicate with the CommitCRM clients, we ask that you cover the following steps.  
In order to assure the SQL can communicate with the RangerMSP clients, we ask that you cover the following steps.  


'''Please remember to test the Commit SQL Database communications again after applying each step, and if the issue persists, then the next step should be applied.'''
*'''Please remember to test the SQL communications again after applying each step, and if the issue persists, then the next step should be applied.'''




===Advantage Server===
===Advantage Server===
*Verfiy the Advantage Database Server service is started on your server. For installation instructions click [[Commit_SQL_Database_Installation_Guide|here]] or [[Commit_SQL_Database_for_Trial_Users|here]] if your are using a trial copy of CSD.
*Verify the Advantage Database Server service is started on your server. For installation instructions click [[SQL_Database_Installation_Guide|here]] or [[SQL_Database_for_Trial_Users|here]] if your are using a trial copy of SQL.
 
*'''Please restart all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.'''




===DEP – Data Execution Prevention===
===DEP – Data Execution Prevention===
*Please ensure that if using DEP on the server, where Commit SQL Database (aka, Advantage Database Server) is installed, it should be configured to allow data execution for '''ADS.exe''', by default located in the following folder '''C:\Program Files\Extended Systems\Advantage 9007\Server'''. This file is the Commit SQL Database / Advantage Database Server Windows service executable file and therefore should be allowed, or else DEP may isolate the CSD software from communicating with the CommitCRM client applications.
*Please ensure that if using DEP on the server, where SQL (aka, Advantage Database Server) is installed, it should be configured to allow data execution for '''ADS.exe''', by default located in the following folder '''C:\Program Files\Extended Systems\Advantage 9007\Server'''. This file is the SQL Database for RangerMSP / Advantage Database Server Windows service executable file and therefore should be allowed, or else DEP may isolate the SQL software from communicating with the RangerMSP client applications.
 
*'''Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.'''
 
<br>
<br>


===Firewall - Windows or any other installed Firewall===
===Firewall - Windows or any other installed Firewall===
*Make sure that your software firewall allows the Advantage port through the firewall (Advantage prot information can be adjusted from '''Start Menu > Programs > Advantage Database Server 9.0 > Advantage Configuration Utility > Configuration Utility tab > Communications tab'''). Also, make sure that no special UDP restrictions are activated on the CommitCRM server.
*Make sure that your software firewall allows the Advantage port through the firewall (Advantage prot information can be adjusted from '''Start Menu > Programs > Advantage Database Server 9.0 > Advantage Configuration Utility > Configuration Utility tab > Communications tab'''). Also, make sure that no special UDP restrictions are activated on the RangerMSP server.
*The default settings configured in the Windows firewall are sufficient for use with the Commit SQL Database, unless the firewall has been reconfigured.  
*If advanced firewall restrictions are configured, please verify that an exception has been placed in the firewall, so that the software may communicate with the network, as well as allowing UDP traffic through the firewall.
*If advanced firewall restrictions are configured, please verify that an exception has been placed in the firewall, so that the software may communicate with the network, as well as allowing UDP traffic through the firewall.
*Add an Inbound Firewall rule on the Windows Server that allows any communication to the '''ads.exe''' program on your server.
*'''Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.'''


<br>
<br>


===ADS.ini – Server Locator===
===ADS.ini – Server Locator===
*The CommitCRM client's way of finding the Commit SQL Database Server fails. In order for the client to detect where the server is running it broadcasts a UDP message and asks for the server to answer. When the server answers the client knows the server IP and can communicate with it.
*The RangerMSP client's way of finding the SQL Database Server fails. In order for the client to detect where the server is running it broadcasts a UDP message and asks for the server to answer. When the server answers the client knows the server IP and can communicate with it.
*On your server, you can run the Advantage Configuration Utility ('''Start Menu > Programs > Advantage Database Server 9.0 > Advantage Configuration Utility > Configuration Utility tab > Communications tab'''). Using it you can find the Port number which is used for communicating with the clients. When adjusting the CSD ports, you can use any port you like, as long as the port is not being used by any other software.
*On your server, you can run the Advantage Configuration Utility ('''Start Menu > Programs > Advantage Database Server 11.10 > Advantage Configuration Utility > Configuration Utility tab > Communications tab'''). Using it you can find the Port number which is used for communicating with the clients. When adjusting the SQL ports, you can use any port you like, as long as the port is not being used by any other software.


<br>
<br>
Line 48: Line 55:
<br>
<br>
<br>
<br>
As explained in the previous steps, you should make sure that the Windows firewall on each client on your LAN allows communication with the server for this port. Verifying this will allow communication between the CommitCRM client and Commit SQL Database on the server.
As explained in the previous steps, you should make sure that the Windows firewall on each client on your LAN allows communication with the server for this port. Verifying this will allow communication between the RangerMSP client and SQL on the server.
<br>
<br>
<br>
<br>
Line 54: Line 61:
<br>
<br>
<br>
<br>
Therefore, in case you enabled the port on each client (using the firewall settings window) and CommitCRM client still doesn't load, you should continue with the following ('''do not continue with this before testing whether allowing the port has solved the issue'''):
Therefore, in case you enabled the port on each client (using the firewall settings window) and RangerMSP client still doesn't load, you should continue with the following ('''do not continue with this before testing whether allowing the port has solved the issue'''):




Under the '''<server>\Commit\LastVer''' & '''<server>\Commit\LastVer\WebInterface''' & '''<server>\Commit\LastVer\Server (Probably needs to be created)''' folder create a text file called '''ADS.INI'''
Under the '''<server>\RangerMSP\LastVer''' <!-- '''<server>\RangerMSP\LastVer\WebInterface''' & '''<server>\RangerMSP\LastVer\Server (Probably needs to be created)'''--> folder, create a text file called '''ADS.INI'''
Open this file in Notepad and add the following settings:
Open this file in Notepad and add the following settings:




  '''[MYSERVER] <br>LAN_IP=192.168.0.1<br>LAN_PORT=2001 '''<br>
  '''[MYSERVER] <br>LAN_IP=192.168.0.1<br>LAN_PORT=2001 '''<br>
<br>
''IMPORTANT NOTES'':
'''''IMPORTANT NOTES''''':
*Replace '''MYSERVER''' with the name of '''YOUR server'''
*Replace '''MYSERVER''' with the name of '''YOUR server'''
*Replace the '''192.168.0.1''' IP address with the '''LOCAL IP address of your server'''.
*Replace the '''192.168.0.1''' IP address with the '''LOCAL IP address of your server'''.
*Replace the port number '''2001 '''to the one used for Commit SQL Database in your setup ('''this can be viewed by running Advantage Configuration Utility on your server, look for the port in use for your LAN''').
*Replace the port number '''2001 '''to the one used for SQL in your setup ('''this can be viewed by running Advantage Configuration Utility on your server, look for the port in use for your LAN''').




After adding the relevant settings, save the file and then try to run CommitCRM client.
After adding the relevant settings, save the file and then try to run RangerMSP client.
This file tells the CommitCRM client what the server IP is and what port to use and therefore no discovery process is required, avoiding the broadcast stage.
This file tells the RangerMSP client what the server IP is and what port to use and therefore no discovery process is required, avoiding the broadcast stage.




Please remember that in case you ever change the IP of your server on your LAN, you should make sure to update this file again to reflect the change. This is why we usually recommend on allowing the broadcast rather than using this hard-coded method of communication; however, in some configurations it doesn’t work and using an ADS.ini file is mandatory.
Please remember that in case you ever change the IP of your server on your LAN, you should make sure to update this file again to reflect the change. This is why we usually recommend on allowing the broadcast rather than using this hard-coded method of communication; however, in some configurations it doesn’t work and using an ADS.ini file is mandatory.
*'''Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.'''
<br>
<br>
<br>
<br>


===ADS.ini – Server Locator (Supplemental)===
===ADS.ini – Server Locator (Supplemental)===
*If the Ads.ini file does not correct the issue, then we suggest that '''changing the Server hostname reference''' in ADS.ini to the '''server IP address [192.168.x.x]''' will correct this behavior. (Remember to restart Advantage Service each time ADS.ini is adjusted)
*If the Ads.ini file does not correct the issue, then we suggest adding additional section with the '''Server hostname reference''' in ADS.ini (Remember to restart Advantage Service each time ADS.ini is adjusted)
For example: ,br.
For example:  
  '''[192.168.0.1] <br>LAN_IP=192.168.0.1<br>LAN_PORT=2001 '''<br>
  '''[192.168.0.1] <br>LAN_IP=192.168.0.1<br>LAN_PORT=2001 '''<br><br>
'''[Your-Server-Name] <br>LAN_IP=192.168.0.1<br>LAN_PORT=2001 '''
''IMPORTANT NOTE:''
*Please replace the ServerName (between the brackets) with '''the servers IP address''', as displayed in the example above.
 
*'''Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.'''
 
<br>
====Important Note For Users that Use our ODBC API====
I some cases your system may still present an error message regarding failure of the Discovery process (Advantage Error 6320) when trying to access to the RangerMSP database using an ODBC connection, even after the ADS.ini file has resolved the issues with RangerMSP clients being able to discover the Advantage server. The following solution should resolve this issue as long as the following conditions are met:
 
* You use the SQL (aka, Advantage Database Server on your server) and ODBC.
 
* The ADS.ini file succeeded in logging in the RangerMSP Software Applications (Clients).
 
* When using applications you developed with ODBC you receive a message regarding Database Discovery Failure (Error code 6420) or "No connected server was found for the given drive letter" (Error 5033).
 
If all of the above prerequisites exist, you should
 
1. copy the ADS.ini file you prepared from the RangerMSP server folder into the following folder on each the affected workstation:
 
* '''%Windir%\system32'''
 
This folder usually translates to: '''C:\Windows\system32'''
 
'''Note:''' To open these folders on your PC you can paste the paths listed above into a Windows Run dialog box, or into any Windows Explorer path.
 
2. Change the database path configured for ODBC connection to include the server IP address and port used by Advantage Database Server, for example:
\\192.168.0.1:6262\RangerMSP\Db
 
 
<br>
 
==Recurring issues after Rebooting the RangerMSP Server Machine==
The RangerMSP database chooses its database mode upon the first concurrent connection to the system. If a client application, or RangerMSP Addon Service (Such as '''CRM Web Interface''', '''CRM Server''' or '''CRM RMM Server''') service is already loaded and connected to the server before the Advantage Database Server service finishes loading, then all subsequent connections will be rejected since the prior connection to the database would not allow the Advantage Database Server service full control over the database.
 
Typical characteristics of this type of problem are repeated manual attention needed to properly connect Advantage Database Server to RangerMSP after rebooting, and restarting the Advantage Database Server service.
To verify this is the issue, please follow these steps:
#Stop any '''RangerMSP Services''' installed in the RangerMSP server.
#Verify no other computers are running RangerMSP.
#Restart the '''Advantage Database Server''' Service.
#Once the '''Advantage Database Server''' service has started, Try Logging in with one client on the '''server machine'''.
#Check the RangerMSP window title to see if '''SQL''' is printed next to your username.
#If successful, Start '''RangerMSP Services'''.
 
If this process was successful, this is because the '''RangerMSP Services loaded before Advantage Database Server did''', locking Advantage Database Server out of the RangerMSP database. To permanently resolve this behavior, use the Services Management window, to define all RangerMSP services to start automatically with a ''Delayed Start'' ('''Startup type > Automatic (Delayed Start)''') each time the server is restarted.
 
<br>
===Adding Service Dependency Rules===
Now that RangerMSP depends on the Advantage Database Server Database service, the RangerMSP Services (CRM Web Interface, CRM Server and CRM RMM Server) also need the Advantage Database Server server to to be up before they try to load.
To set these services to be dependent on the Advantage Database Server Service, follow these steps:
# Backup your current registry settings.
# Run '''regedit''' to open your registry.
# Navigate to '''HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services''' and locate the '''CRM Web Interface''', '''CRM Server''' or '''CRM RMM Server''' services that you need to set a dependency for.
# Open the '''DependOnService''' key on the right side. If the selected service does not have a '''DependOnService''' key, then create one by right-clicking and selecting '''New > Multi-String Value'''.
# In the '''value''' field, enter '''Advantage'''.
# Click OK, close your registry and restart your machine.


<br>
<br>


==See Also==
==See Also==
*[[Commit_SQL_Database_Installation_Guide|Commit SQL Database Installation Guide]]
*[[SQL_Database_Installation_Guide|SQL Database Installation Guide]]
*[[Commit_SQL_Database_for_Trial_Users|Commit SQL Database for Trial Users]]
*[[SQL_Database_for_Trial_Users|SQL Database for Trial Users]]
[[Category:Troubleshooting]]
[[Category:Troubleshooting]]

Latest revision as of 07:49, 13 January 2022


Problem Description

When setting up the SQL Database for RangerMSP, the client PCs running the RangerMSP client application cannot connect to the RangerMSP SQL Database, and an error is displayed saying:

Procedure halted due to data server error.
Verify server is operating and this computer has access to the server folder.
(C:\RangerMSP\DB)



Explanation

This problem occurs when the client PCs try to connect to the SQL Database for RangerMSP, which is installed on your server, and it doesn’t “answer” to their connection requests. By default, RangerMSP clients send a UDP broadcast message on the network, checking where the SQL Database for RangerMSP server is found; if found the server answers with the relevant information for the client to connect to it (IP, Port, etc.). This handshake process may require allowing UDP broadcasts inside you LAN. Usually this does not require any special setup; however, with some advanced network security settings it may be required. It is also required that the SQL Database for RangerMSP, which runs on your server as a Windows service called Advantage Database Server, will be up and running and be allowed to communicate with your LAN.


Troubleshooting Steps

In order to assure the SQL can communicate with the RangerMSP clients, we ask that you cover the following steps.

  • Please remember to test the SQL communications again after applying each step, and if the issue persists, then the next step should be applied.


Advantage Server

  • Verify the Advantage Database Server service is started on your server. For installation instructions click here or here if your are using a trial copy of SQL.
  • Please restart all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.


DEP – Data Execution Prevention

  • Please ensure that if using DEP on the server, where SQL (aka, Advantage Database Server) is installed, it should be configured to allow data execution for ADS.exe, by default located in the following folder C:\Program Files\Extended Systems\Advantage 9007\Server. This file is the SQL Database for RangerMSP / Advantage Database Server Windows service executable file and therefore should be allowed, or else DEP may isolate the SQL software from communicating with the RangerMSP client applications.
  • Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.


Firewall - Windows or any other installed Firewall

  • Make sure that your software firewall allows the Advantage port through the firewall (Advantage prot information can be adjusted from Start Menu > Programs > Advantage Database Server 9.0 > Advantage Configuration Utility > Configuration Utility tab > Communications tab). Also, make sure that no special UDP restrictions are activated on the RangerMSP server.
  • If advanced firewall restrictions are configured, please verify that an exception has been placed in the firewall, so that the software may communicate with the network, as well as allowing UDP traffic through the firewall.
  • Add an Inbound Firewall rule on the Windows Server that allows any communication to the ads.exe program on your server.
  • Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.


ADS.ini – Server Locator

  • The RangerMSP client's way of finding the SQL Database Server fails. In order for the client to detect where the server is running it broadcasts a UDP message and asks for the server to answer. When the server answers the client knows the server IP and can communicate with it.
  • On your server, you can run the Advantage Configuration Utility (Start Menu > Programs > Advantage Database Server 11.10 > Advantage Configuration Utility > Configuration Utility tab > Communications tab). Using it you can find the Port number which is used for communicating with the clients. When adjusting the SQL ports, you can use any port you like, as long as the port is not being used by any other software.




As explained in the previous steps, you should make sure that the Windows firewall on each client on your LAN allows communication with the server for this port. Verifying this will allow communication between the RangerMSP client and SQL on the server.

However, in some cases this is not enough. As explained above, a discovery process takes place when the client loads, trying to find the server... It is possible that your Windows firewall blocks this discovery process even if the port is allowed.

Therefore, in case you enabled the port on each client (using the firewall settings window) and RangerMSP client still doesn't load, you should continue with the following (do not continue with this before testing whether allowing the port has solved the issue):


Under the <server>\RangerMSP\LastVer folder, create a text file called ADS.INI Open this file in Notepad and add the following settings:


[MYSERVER] 
LAN_IP=192.168.0.1
LAN_PORT=2001

IMPORTANT NOTES:

  • Replace MYSERVER with the name of YOUR server
  • Replace the 192.168.0.1 IP address with the LOCAL IP address of your server.
  • Replace the port number 2001 to the one used for SQL in your setup (this can be viewed by running Advantage Configuration Utility on your server, look for the port in use for your LAN).


After adding the relevant settings, save the file and then try to run RangerMSP client. This file tells the RangerMSP client what the server IP is and what port to use and therefore no discovery process is required, avoiding the broadcast stage.


Please remember that in case you ever change the IP of your server on your LAN, you should make sure to update this file again to reflect the change. This is why we usually recommend on allowing the broadcast rather than using this hard-coded method of communication; however, in some configurations it doesn’t work and using an ADS.ini file is mandatory.

  • Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.



ADS.ini – Server Locator (Supplemental)

  • If the Ads.ini file does not correct the issue, then we suggest adding additional section with the Server hostname reference in ADS.ini (Remember to restart Advantage Service each time ADS.ini is adjusted)

For example:

[192.168.0.1] 
LAN_IP=192.168.0.1
LAN_PORT=2001


[Your-Server-Name]
LAN_IP=192.168.0.1
LAN_PORT=2001

IMPORTANT NOTE:

  • Please replace the ServerName (between the brackets) with the servers IP address, as displayed in the example above.
  • Please restart the Advantage service & all RangerMSP services, and retest communications by loading a RangerMSP Client application from another computer.


Important Note For Users that Use our ODBC API

I some cases your system may still present an error message regarding failure of the Discovery process (Advantage Error 6320) when trying to access to the RangerMSP database using an ODBC connection, even after the ADS.ini file has resolved the issues with RangerMSP clients being able to discover the Advantage server. The following solution should resolve this issue as long as the following conditions are met:

  • You use the SQL (aka, Advantage Database Server on your server) and ODBC.
  • The ADS.ini file succeeded in logging in the RangerMSP Software Applications (Clients).
  • When using applications you developed with ODBC you receive a message regarding Database Discovery Failure (Error code 6420) or "No connected server was found for the given drive letter" (Error 5033).

If all of the above prerequisites exist, you should

1. copy the ADS.ini file you prepared from the RangerMSP server folder into the following folder on each the affected workstation:

  • %Windir%\system32

This folder usually translates to: C:\Windows\system32

Note: To open these folders on your PC you can paste the paths listed above into a Windows Run dialog box, or into any Windows Explorer path.

2. Change the database path configured for ODBC connection to include the server IP address and port used by Advantage Database Server, for example:

\\192.168.0.1:6262\RangerMSP\Db



Recurring issues after Rebooting the RangerMSP Server Machine

The RangerMSP database chooses its database mode upon the first concurrent connection to the system. If a client application, or RangerMSP Addon Service (Such as CRM Web Interface, CRM Server or CRM RMM Server) service is already loaded and connected to the server before the Advantage Database Server service finishes loading, then all subsequent connections will be rejected since the prior connection to the database would not allow the Advantage Database Server service full control over the database.

Typical characteristics of this type of problem are repeated manual attention needed to properly connect Advantage Database Server to RangerMSP after rebooting, and restarting the Advantage Database Server service. To verify this is the issue, please follow these steps:

  1. Stop any RangerMSP Services installed in the RangerMSP server.
  2. Verify no other computers are running RangerMSP.
  3. Restart the Advantage Database Server Service.
  4. Once the Advantage Database Server service has started, Try Logging in with one client on the server machine.
  5. Check the RangerMSP window title to see if SQL is printed next to your username.
  6. If successful, Start RangerMSP Services.

If this process was successful, this is because the RangerMSP Services loaded before Advantage Database Server did, locking Advantage Database Server out of the RangerMSP database. To permanently resolve this behavior, use the Services Management window, to define all RangerMSP services to start automatically with a Delayed Start (Startup type > Automatic (Delayed Start)) each time the server is restarted.


Adding Service Dependency Rules

Now that RangerMSP depends on the Advantage Database Server Database service, the RangerMSP Services (CRM Web Interface, CRM Server and CRM RMM Server) also need the Advantage Database Server server to to be up before they try to load. To set these services to be dependent on the Advantage Database Server Service, follow these steps:

  1. Backup your current registry settings.
  2. Run regedit to open your registry.
  3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and locate the CRM Web Interface, CRM Server or CRM RMM Server services that you need to set a dependency for.
  4. Open the DependOnService key on the right side. If the selected service does not have a DependOnService key, then create one by right-clicking and selecting New > Multi-String Value.
  5. In the value field, enter Advantage.
  6. Click OK, close your registry and restart your machine.


See Also