Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to connect mapguide maestro to postgres 16? #151

Open
lqmnhakeem217 opened this issue Jun 28, 2024 · 6 comments
Open

how to connect mapguide maestro to postgres 16? #151

lqmnhakeem217 opened this issue Jun 28, 2024 · 6 comments

Comments

@lqmnhakeem217
Copy link

i been trying to connect my database server which are using postgres 16 to mapguide maestro which i have installed the latest version, but there seem to be an issue with fdo not matching latest version. is there a way to make a custom connection extension that can cater fdo connecting to pg16

@lqmnhakeem217
Copy link
Author

when i try to logging it require md5 auth but my db use scram-sha-256 auth

@lqmnhakeem217
Copy link
Author

FDO Connection Status:
The remote server returned an error: (559) MgFdoException.:
An exception occurred in FDO component.
Error occurred in Feature Source (Session:c78f2942-38e1-11ef-8000-a0294205948e_en_MTI3LjAuMC4x0AFC0AFB0AFA//fafbc1bf-6c0c-4fdd-8e23-ee9884b0687a.FeatureSource): An exception occurred in FDO component.
RDBMS: authentication method 10 not supported

  • MgFdoConnectionManager.Open() line 333 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\common\manager\FdoConnectionManager.cpp

  • MgFdoConnectionManager.CacheFdoConnection() line 1097 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\common\manager\FdoConnectionManager.cpp

  • MgFdoConnectionManager.Open() line 1089 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\common\manager\FdoConnectionManager.cpp
    (Cause: , Root Cause: )

  • MgFeatureServiceHandler.ProcessOperation() line 83 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\FeatureServiceHandler.cpp

  • MgOpTestFeatureSourceConnection.Execute() line 100 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\OpTestFeatureSourceConnection.cpp

  • MgServerFeatureService.TestConnection() line 245 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\ServerFeatureService.cpp

  • MgFdoConnectionManager.Open() line 366 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\common\manager\FdoConnectionManager.cpp

    The remote server returned an error: (559) MgFdoException.
    This error generate when i try to add feature source, already tried different services, logins or passwords still not working. Even tried looking into it on the internet but no luck on finding solution to this

@jumpinjackie
Copy link
Owner

It could be that the libpq.dll included with the MG/FDO install does not support this authentication type.

If you download a zip package of the latest postgresql 16 release and copy libpq.dll and dependent dlls to the FDO directory (overwriting existing files). Does this then work?

For the record, this is the full set of dependent dlls you need to copy alongside libpq.dll from the latest 16.3 binaries according to the Dependencies tool

2024_07_03_20_37_05_Dependencies_x64_

@lqmnhakeem217
Copy link
Author

Oh, I see. I thought I had already resolved the issue by following this guide: Error: Unable to load the FDO Provider library 'PostgreSQLProvider.dll' in Map 3D or Civil 3D 2020.

However, after your suggestion, I noticed some progress. But what does 'FDO Connection Status: False' mean? Does it indicate that my database username and password are incorrect? I am using superuser credentials, so it should work, right?

@jumpinjackie
Copy link
Owner

Not quite sure. MG connection status can obscure the underlying connection failure details.

A better test would be to try creating a PostgresSQL connection with FDO Toolbox with the updated libpq.dll and see what happens there.

@lqmnhakeem217
Copy link
Author

lqmnhakeem217 commented Jul 4, 2024

After using FDO Toolbox, I've been able to access the database smoothly. However, I'm unsure how to set this up with MapGuide Maestro. Could you provide some guidance on integrating FDO ToolBox with MapGuide Maestro?

Also, I encountered the following errors in the log files related to the 'FDO Connection Status: False' issue from my previous query:

System.Exception: 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.

  • MgFeatureServiceHandler.ProcessOperation() line 83 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\FeatureServiceHandler.cpp
  • MgOpGetSpatialContexts.Execute() line 105 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\OpGetSpatialContexts.cpp
  • MgServerFeatureService.GetSpatialContexts() line 1296 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\ServerFeatureService.cpp
  • MgServerGetSpatialContexts.GetSpatialContexts() line 100 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\ServerGetSpatialContexts.cpp
  • MgServerGetSpatialContexts.GetSpatialContexts()() line 92 file c:\working\build_area\mapguide\4.0.0\x64\mgdev\server\src\services\feature\ServerGetSpatialContexts.cpp

---> System.Net.WebException: The remote server returned an error: (559) MgConnectionFailedException.
at System.Net.HttpWebRequest.GetResponse()
at OSGeo.MapGuide.MaestroAPI.Http.DefaultHttpRequestor.Get(String uri, IHttpGetRequestOptions options, Nullable1 requestTimeout) in /_/OSGeo.MapGuide.MaestroAPI/Http/DefaultHttpRequestor.cs:line 144 --- End of inner exception stack trace --- at OSGeo.MapGuide.MaestroAPI.Http.DefaultHttpRequestor.Get(String uri, IHttpGetRequestOptions options, Nullable1 requestTimeout) in //OSGeo.MapGuide.MaestroAPI/Http/DefaultHttpRequestor.cs:line 144
at OSGeo.MapGuide.MaestroAPI.HttpServerConnection.GetSpatialContextInfo(String resourceID, Boolean activeOnly) in /
/OSGeo.MapGuide.MaestroAPI/Http/HttpServerConnection.cs:line 1244
at Maestro.Editors.FeatureSource.CoordSys.CoordSysOverrideDialog..ctor(IEditorService ed) in C:\projects\mapguide-maestro\Maestro.Editors\FeatureSource\CoordSys\CoordSysOverrideDialog.cs:line 53
at Maestro.Editors.FeatureSource.CoordSysOverrideCtrl.btnAdd_Click(Object sender, EventArgs e) in C:\projects\mapguide-maestro\Maestro.Editors\FeatureSource\CoordSysOverrideCtrl.cs:line 61
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)

Updated:

  1. I editted MapGuide server config anything relating to connection or sessions to the max value still have the same issue
  2. Backup MapGuide/FDO files and Copy/paste FDOToolBox/FDO files to the MapGuide/FDO files to check if it works (It does not worked)
  3. Restarted MapGuide Services/IIS, Map Guide Maestro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants