→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gnohs
Engaged Sweeper III
I installed the Lansweeper service on a remote network. I connected to the preexisting SQL Database. I then clicked next and it proceeded to tell me that the connection was successful. I then finish the install and confirm that the lansweeper server service is in fact started.

I check the error log and it tells me that I Cannot connect to database:
07/14/2015 12:55:39: Cannot connect to database, check your config file, service will be stopped A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

The config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<connectionStrings>
<add name="lansweeper" connectionString="Persist Security Info=False;Data Source=WANIP\SQLINSTANCE;Initial Catalog=lansweeperdb;User ID=lansweeperuser;Password=mysecretpassword0*;Connect Timeout=60" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="debug" value="0"/>
</appSettings>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0"/>
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
</configuration>



Can someone help me figure out why this is?
I do have a firewall on my main server side. But I opened up 1433 and 1434 to the sql database for testing purposes. And during setup it said it successfully connected. Why is it not connecting now? I have the default install on the main server along with the default service install on the remote server.
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
This KB article gives a detailed explanation on how to resolve database connection issues. A full list of ports used by Lansweeper can be found here. Be sure that the database server name can be resolved from your Lansweeper server.

View solution in original post

2 REPLIES 2
Daniel_B
Lansweeper Alumni
This KB article gives a detailed explanation on how to resolve database connection issues. A full list of ports used by Lansweeper can be found here. Be sure that the database server name can be resolved from your Lansweeper server.
gnohs
Engaged Sweeper III
Ok I noticed if I disable the firewall and setup NAT for every port It works fine. I researched a little and saw something about port 9524. I did open this port up and tried it again but that did not work. Can you give me a list of ports that I need to have open for this to work?