.net-core - iAnywhere.Data.SQLAnywhere.SAException 连接错误:连接已断开(可能不是 SQL Anywhere 服务器)
问题描述
尝试从 Azure ServiceFabric 连接到 SQLAnywhere (Sybase) 数据库(C# 代码)时:
await using var connection = new SAConnection(connectionString);
await connection.OpenAsync();
接收 iAnywhere.Data.SQLAnywhere.SAException
Connection error: Connection was dropped (may not be a SQL Anywhere server)
错误代码是错误 832。这是一般连接错误:An error occurred while attempting to establish a connection with the database server, but before attempting to connect to a database. Failure to initialize a communication link during the connection attempt is an example of this error. Creating a debug log file using the LogFile connection parameter may provide more information.
在本地它可以工作,但不能在 Service Fabric 上工作。
修复想法尝试:
- 缺少司机?看起来没有,Sybase(现在是 SAP)SQLAnywhere 需要特殊的驱动程序或客户端 - 但在本地也可以在没有此驱动程序的情况下工作,只需安装 iAnywhere.Data.SQLAnywhere.NETCore nupackage
- 网络连接/防火墙问题?看起来没有,可以从 Service Fabric 节点 ping 数据库服务器
解决方案
这是另一种交通保护工具。虽然可以远程登录端口,但来自应用程序的流量仍然被另一个工具阻止。
推荐阅读
- liquid-xml - 文本文件的 Liquid-XML 编辑器行号
- python - 按多列排序时为每列设置升序降序
- php - 如何从 php 中的 mysql 查询中删除重复的结果?
- javascript - 期望值相等:[Function wrap] - 如何模拟它?
- matlab - 矩阵函数最小化
- stm32 - STM32 SPI数据反向发送
- oracle - 为什么 oracle 触发器显示不同的时间戳正在插入的内容
- android - 无法使用 DrawerLayout 将图像放在 ListView 上方
- java - java客户端-服务器项目中的连接超时错误
- sql - 试图从乱码 XML 数据中获取不同数量的值