When you install Lansweeper, a service called Lansweeper Server is added to Windows Services on the machine hosting your installation. This service is mostly responsible for scanning your network and sending data back to your Lansweeper database. It also pushes configured deployments to Windows computers and processes emails. The Lansweeper Server service is referred to as the scanning service and the machine hosting the service as a scanning server. A Lansweeper installation has at least one scanning server; some Lansweeper licenses allow you to have multiple.
By default, the scanning service is configured to automatically start, as the service needs to be running to be able to scan your network. However, you may at some point notice that the service is marked as "scanserver unavailable" or that a secondary scanning server you're trying to connect to your installation doesn't show up in the web console. If a scanning server is marked as down or unavailable or if a secondary scanning server doesn't have its own configuration tab in the web console, this means the server isn't connecting to your Lansweeper database. Even if a secondary scanning service installed successfully, it could still fail to connect to the database, as our installer adds a random username and password to the server's configuration file.
To resolve this issue and have your scanning server successfully connect to the database, do the following:
- If you are trying to connect a secondary scanning server, check the terms of your license agreement to ensure your Lansweeper license allows for multiple scanning servers and submit your license in the web console by following the instructions in this knowledge base article. Not all licenses allow for multiple scanning servers. If you would like to add scanning servers to your current license, please contact the Lansweeper sales team at email@example.com
- If you are trying to connect a secondary scanning server, make sure the secondary server doesn't have the same name as another one of your scanning servers. Having multiple scanning servers with the same name is not supported.
- If your Lansweeper database is hosted in SQL LocalDB or SQL Server and you never configured your own custom database password before, do so now by following the instructions in this knowledge base article.
- Stop the Lansweeper Server service in Windows Services on the problem scanning server or the server that is marked as "scanserver unavailable".
- Run the following tool found on the problem scanning server:Program Files (x86)\Lansweeper\Tools\ConfigEditor.exe
- Make sure the ConnectionString listed in the Service tab of the aforementioned tool matches the one in the Website tab of the same tool on the server hosting the web console. If your database is hosted in the SQL Compact database server, the connection string will just be a reference to an .sdf file and should already be correct. If your database is hosted in SQL LocalDB or SQL Server though, make sure the Data Source (SQL instance name), Initial Catalog (Lansweeper database name), username and password in the connection string are correct. On remote servers, you will of course have to replace any localhost references in the Data Source with your database server's actual name or IP address. If you are able to see data in the web console, you know that your console is successfully connecting to the database and that its connection string is correct. The scanning server should therefore be able to connect to the database as well, *if* it uses the same database connection details.
- Restart the Lansweeper Server service in Windows Services on the problem scanning server.
- If the "scanserver unavailable" issue persists, look for recent entries in the log file below, found on the problem scanning server. There may be an error message providing more information on the database connection failure. If so, there are articles in this knowledge base on how to resolve database connection errors like "login failed" and "a network-related or instance-specific error occurred".Program Files (x86)\Lansweeper\Service\Errorlog.txt