我正在使用FastAPI和Docker测试一个API。当我加载网页时,它会尝试使用使用pyodbc设置的AS400连接运行查询
我从错误开始:pyodbc.InterfaceError: ('28000', '[28000] [IBM][System i Access ODBC Driver]Communication link failure. comm rc=8051 - CWBSY1011 - Kerberos client credentials not found
所以我安装了krb5并创建了一个票证。然后重新加载网页,我遇到的新错误是pyodbc.InterfaceError: ('28000', '[28000] [IBM][System i Access ODBC Driver]Communication link failure. comm rc=8052 - CWBSY1012 - Kerberos service principal not found for system SYSTEM
,其中SYSTEM是我的AS400系统的名称
以前有人碰到过这个吗?似乎AS400要求我在连接时使用Kerberos,但我设置了它,系统没有Kerberos服务主体
我是否可能需要使用instructions found here完全加入域?我启动了这个过程,但是我遇到了一个错误:Failed to join domain: Not enough storage is available to process this command.
当我试图运行net ads join
时,我假设这是因为Docker映像太小;所以我认为这是不可能的
这是我的ODBC.ini配置文件:
[QDSN_ASW]
Description=ASW
Driver=iSeries Access ODBC Driver
System=192.168.100.1
UserID=user
Password=pass
Naming=0
DefaultLibraries=QGPL
Database=1492BFDD
ConnectionType=2
CommitMode=2
ExtendedDynamic=0
DefaultPkgLibrary=QGPL
DefaultPackage=A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression=1
LibraryView=0
AllowUnsupportedChar=0
ForceTranslation=0
Trace=0
Trusted_Connection=no
AuthenticationType=No Authentication
多亏了this post on stackoverflow,我才能够解决这个问题
基本上,我最初构建的数据库连接(如下所示)似乎过于复杂,没有必要
我能够将其简化为:
现在,当我构建Docker映像并加载web页面时,它会立即查询数据库,而不需要Kerberos身份验证
相关问题 更多 >
编程相关推荐