Страница 1 из 1

Ошибка подключения к базе данных

Добавлено: 11 дек 2024, 17:37
Mitrich
День добрый, уважаемые разработчики!

Заметили неприятную ошибку, связанную с длиной пароля, используемого для подключения к базе данных.
При большой длине пароля (например у нас 32 символа) в AstraLinux возникает ошибка подключения к базе данных MS SQL Server.
Ошибка в ГИС Axioma в версии для Windows при той же длине пароля не возникает .

sql_table = provider_manager.open(source)
File "/opt/axioma-gis6/python/lib/python3.8/site-packages/axipy/da/providers/provider_manager.py", line 324, in open
return source.open()
File "/opt/axioma-gis6/python/lib/python3.8/site-packages/axipy/da/providers/source.py", line 80, in open
return _opener.open(self)
File "/opt/axioma-gis6/python/lib/python3.8/site-packages/axipy/da/providers/opener.py", line 106, in open
result = self._service().open(definition)
RuntimeError: Ошибка SQL: QTDS: Невозможно открыть соединение

[Trace ] 17:21:01.105 <void axioma::Core::initialize()>
[Info ] 17:21:01.106 <void axioma::Core::installTranslators()> "Load localization for language: Russian"
[Info ] 17:21:01.107 <void axioma::Core::installTranslators()> "Localization loaded: qt"
[Info ] 17:21:01.107 <void axioma::Core::installTranslators()> "Localization loaded: qt_help"
[Warning] 17:21:01.107 <void axioma::Core::installTranslators()> "Could not load localization: axioma"
[Info ] 17:21:01.107 <void axioma::Core::initialize()> Инициализация ядра
[Info ] 17:21:01.107 <void axioma::Core::printSystemInfo()> Текущие дата и время: 11.12.2024 17:21:01
[Info ] 17:21:01.107 <void axioma::Core::printSystemInfo()> Архитектура: x86_64
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> buildAbi: x86_64-little_endian-lp64
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> kernelType: linux
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> kernelVersion: 5.15.0-70-generic
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> Current OS: "Astra Linux" version="1.7_x86-64"
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> Build OS: CentOS Linux 7
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> Версия: 6.1 (64 бит)
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> Дата и время сборки: Nov 12 2024 10:39:59
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> "4707bb2bd78960fe7f02735397a20c1751f30231"
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> Qt version: 5.15.10
[Info ] 17:21:01.108 <void axioma::Core::printSystemInfo()> "Бесплатная лицензия"
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> HWID: pMnCq7EsJbCTbduWahRXMA==
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> AXIOMA_HOME: /opt/axioma-gis6/sbin
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> AXIOMA_DATA: /opt/axioma-gis6/share/axioma
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> Application file path: /opt/axioma-gis6/bin/Axioma.GIS
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> Settings file: /home/user/.local/share/ESTI/Axioma.GIS/v6/settings.ini
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> Resource catalog: /opt/axioma-gis6/share/axioma
[Info ] 17:21:01.188 <void axioma::Core::printSystemInfo()> User resource catalog: /home/user/.local/share/ESTI/Axioma.GIS/v6
[Debug ] 17:21:01.188 <void axioma::Core::printSystemInfo()> Catalog with font: /home/user/.local/share/ESTI/Axioma.GIS/v6/Fonts
...
[Trace ] 17:21:07.017 <axioma::cs::LinearUnit axioma::cs::CoordSystem::unit(const axioma::cs::ProjectionParamsManager&) const> "Unit detected Meter, conv=1, cs=Earth Projection 29, 115, \"m\", 10, 52, 180 Affine Units \"m\", 1, 0, 4321000, 0, 1, 3210000"
[Info ] 17:21:18.012 <axioma::dp::DatabaseProviderBase::openDatabase(const std::shared_ptr<axioma::dp::DatabaseDefinition>&, const QString&, const QStringList&)::<lambda()>> "Подсоединяемся к серверу БД: connName=QTDS:user@server:1432/test;dbName=test;user=user;host=server"
[Warning] 17:21:18.012 <> QTDSDriver error (20042): [Name too long for LOGINREC field] [Выполнено]
[Warning] 17:21:18.016 <> QTDSDriver error (18456): [General SQL Server error: Check messages from the SQL Server] []
[Warning] 17:21:18.016 <> QTDSDriver error (20002): [Adaptive Server connection failed] [Выполнено]
[Warning] 17:21:18.016 <> QSqlDatabasePrivate::removeDatabase: connection 'QTDS:user@server:1432/test' is still in use, all queries will cease to work.
[Warning] 17:21:18.016 <axioma::err::DatabaseAccessException::DatabaseAccessException(const QString&, const QString&)> "QTDS: Невозможно открыть соединение"

С уважением,
Дмитрий

Re: Ошибка подключения к базе данных

Добавлено: 11 дек 2024, 18:36
Дмитрий
Здравствуйте!

Да, при подключении к БД MSSQL Server из под linux такое ограничение присутствует. Проблема локализована и будет исправлена к следующему релизу.