Opened 14 years ago

Closed 12 years ago

#1378 closed defect (fixed)

Cannot connect to SQL Server 2008 - 2.2 Beta 1

Reported by: tybion Owned by:
Priority: low Milestone: 2.2
Component: Mapping Service Version: 2.2.0
Severity: major Keywords:
Cc: External ID:

Description

I create a SQL Server 2008 data connection in Maestro.

When I click the 'Test Connection' button I get the following error ..

The remote server returned an error: (559) MgConnectionFailedException.: Problem:\nCannot establish connection to the MapGuide Server.\n\nPossible Causes:\n-Your session has been idle for too long;\n-MapGuide Server is no longer responding;\n-Internet connection problems.\n\nSolution:\nRestart your application / session, restart the MapGuide Server service, or contact with the server administrator.

MapGuide is using FDO 3.5

When I install FDO ToolBox 0.9.3.1063 (that also uses FDO 3.5), it works fine - opens tables, identifies primary keys and geometry fields, and queries on the tables also work fine.

Even if I change the configuration of MapGuide server to use the same FDO folder as FDO ToolBox, it still reports the same error.

Attachments (3)

fdotoolbox.png (44.3 KB ) - added by tybion 14 years ago.
Screenshot of FDOToolbox
Access.log (3.5 KB ) - added by tybion 14 years ago.
Error.log (1.3 KB ) - added by tybion 14 years ago.

Download all attachments as: .zip

Change History (19)

by tybion, 14 years ago

Attachment: fdotoolbox.png added

Screenshot of FDOToolbox

comment:1 by zspitzer, 14 years ago

just to confirm, other datasources are working? ie does the sheboygan sample work?

comment:2 by tybion, 14 years ago

Yes, I can access the Sheboygan data fine in MapGuide.

comment:3 by jng, 14 years ago

What version of windows are you using and is it 32-bit or 64-bit?

comment:4 by tybion, 14 years ago

Windows Server 2008 (32-bit)

comment:5 by jng, 14 years ago

I'm not getting any luck trying to reproduce this error :(

Could you possibly switch on full detail logging (see example from this RFC)

Reproduce this error, and then attach snippets of:

  • Access.log
  • Error.log

during the period in which the error occured

comment:6 by tybion, 14 years ago

I did the following ..

net stop "MapGuide Server 2.2"
notepad C:\MapGuide\Server\bin\serverconfig.ini

LogsDetail = ResourceService:3,DrawingService:3,FeatureService:3,MappingService:3,RenderingService:3,TileService:3,KmlService:3,ServerAdminService:3,SiteService:3

del c:\MapGuide\Server\Logs\*.log
net start "MapGuide Server 2.2"
Ran Maestro, Opened SQL Server data connection, Clicked 'Test Connection'.
net stop "MapGuide Server 2.2" (to flush information to log files)

This is the data connection ..

<?xml version="1.0" encoding="utf-8"?> <FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">

<Provider>OSGeo.SQLServerSpatial</Provider> <Parameter>

<Name>Username</Name> <Value>fred</Value>

</Parameter> <Parameter>

<Name>Password</Name> <Value>password</Value>

</Parameter> <Parameter>

<Name>Service</Name> <Value>maittestsql\testsql2008</Value>

</Parameter> <Parameter>

<Name>DataStore</Name> <Value>geol_dwh_test</Value>

</Parameter>

</FeatureSource>

by tybion, 14 years ago

Attachment: Access.log added

by tybion, 14 years ago

Attachment: Error.log added

comment:7 by tybion, 14 years ago

Some more version info .. I am running both MapGuide Server 2.2 Beta 1 and Maestro 2.0.0.4650 on a server - Windows Server 2008 (32-bit) Service Pack 2

comment:8 by tomfukushima, 14 years ago

Perhaps the problem is because the SQL Server is running multiple instances. Is there a default instance (i.e., Service = maittestsql) there that you can try connecting to? And if so what happens when you try connecting to that? Also try putting two backslashes between the machine and sever name (i.e., maittestsql
testsql2008) and see if that makes any difference.

comment:9 by tybion, 14 years ago

If I change the '\' in maittestsql\testsql2008 to a '
' or '/', after about 15 seconds, I get ..

The remote server returned an error: (559) MgFdoException.: An exception occurred in FDO component. RDBMS: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).

(The original error appears in less than a second.)

By the way, FDO Toolbox connects using the same version of FDO, using the instance name - so it appears that FDO 3.5 supports using the instance name.

Unfortunately, I am not a SQL Server administrator, so I cannot set things up so I can connect to the default instance. One way of avoiding the instance name is to connect to the maittestslq and specify the port number that corresponds to the instance (not the 1433 default). In my case the testsql2008 instance corresponds to port 2646. Is there somewhere I can the port from 1433 to 2646?

comment:10 by tomfukushima, 14 years ago

Just to confirm, you cannot use this feature source after saving it right? That is, not only does the test connection not work, but you also can't do anything like create layers from the feature source.

comment:11 by tybion, 14 years ago

Correct. If I try to create a layer using this data connection (ie. 'feature resource'), I get the same error that I have reported -

'The remote server returned an error: (559) MgConnectionFailedException?.: Problem:\nCannot establish connection to the MapGuide Server ...'

comment:12 by tybion, 14 years ago

More information ..
It's taken most of the day, but I have managed to install SQL Server 2008 Express within a VirtualBox session, so that I have a SQL 2008 Server that I can monitor.

I can now confirm that MapGuide is successfully connecting to the SQL 2008 Server at the same time that it reports the error -

The remote server returned an error:(559) MgConnectionFailedException.: Problem:\nCannot establish connection to the MapGuide Server.\n\nPossible Causes:\n-Your session has been idle for too long;\n-MapGuide Server is no longer responding;\n-Internet connection problems.\n\nSolution:\nRestart your application / session, restart the MapGuide Server service, or contact with the server administrator.

I have enabled the auditing of successful logins on SQL Server 2008, and I get the event -

Login succeeded for user 'GEOL_DWH_TEST'. Connection made using SQL Server authentication. [CLIENT: 10.150.8.129]

.. where 10.150.8.129 is the address of the MapGuide server

comment:13 by tybion, 14 years ago

By the way, to connect to SQL Server 2008 EXPRESS, there is a quirk where you have to specify -

<sqlserver>,1433

(Even though 1433 is the default port.)

comment:14 by jbirch, 14 years ago

I've been trying to duplicate this one too, with no joy. I can log into a local SQL 2008R2 Express database with the latest MapGuide 2.2 x64 beta and Maestro 2.1.

<?xml version="1.0" encoding="utf-8"?>
<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
  <Provider>OSGeo.SQLServerSpatial</Provider>
  <Parameter>
    <Name>Username</Name>
    <Value>mapguide</Value>
  </Parameter>
  <Parameter>
    <Name>Password</Name>
    <Value>mapguide</Value>
  </Parameter>
  <Parameter>
    <Name>Service</Name>
    <Value>(local)\SQLExpress</Value>
  </Parameter>
  <Parameter>
    <Name>DataStore</Name>
    <Value>Barcelona</Value>
  </Parameter>
</FeatureSource>

comment:15 by tybion, 14 years ago

We have purchased MapGuide Enterprise now. Once I have sorted out a licensing issue, I'll try that, and post anything relevant here.

comment:16 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Closing due to ticket inactivity

Note: See TracTickets for help on using tickets.