【问题标题】:GDS Exception. 335544421. connection rejected by remote interfaceGDS 例外。 335544421. 连接被远程接口拒绝
【发布时间】:2017-10-25 21:15:52
【问题描述】:

我正在尝试使用 jaybird jdbc 驱动程序连接到 firebird db。 Firebird 在 ubuntu 下运行。我在 /tmp/hellofb.fdb 下创建了一个简单的数据库(是的,这不是最好的地方,只是为了测试)。我正在运行火鸟超级服务器 3.0。 firebird 服务已启动并运行sudo service firbird3.0 status:

firebird3.0.service - Firebird Database Server ( SuperServer )
   Loaded: loaded (/lib/systemd/system/firebird3.0.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2017-10-25 22:40:53 CEST; 25min ago
  Process: 23411 ExecStart=/usr/sbin/fbguard -pidfile /run/firebird3.0/default.pid -daemon -forever (code=exited, status=0/SUCC
 Main PID: 23412 (fbguard)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/firebird3.0.service
           ├─23412 /usr/sbin/fbguard -pidfile /run/firebird3.0/default.pid -daemon -forever
           └─23413 /usr/sbin/firebird

Okt 25 22:40:53 XPS-L322X systemd[1]: Starting Firebird Database Server ( SuperServer )...
Okt 25 22:40:53 XPS-L322X systemd[1]: Started Firebird Database Server ( SuperServer ).

我的 spring boot application.properties 由:

spring.datasource.url:jdbc:firebirdsql://localhost:3050//tmp/hellofb.fdb
spring.datasource.driverClassName:org.firebirdsql.jdbc.FBDriver

但是,当我尝试连接到数据库时,出现以下异常:

org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544421. connection rejected by remote interface

我已经尝试了jaybird FAQ 给出的所有可能的排列,但我已经没有选择了。任何帮助将不胜感激!

注意:我尝试使用flarerobin连接到数据库,一切正常

【问题讨论】:

  • 什么版本的Firebird,什么版本的Jaybird,firebird.conf中AuthServerWireCrypt的值是多少?
  • 也告诉使用设置IPv6V6Only的值。

标签: firebird jaybird


【解决方案1】:

鉴于您没有提供我在 cmets 中要求的信息,我不得不根据所描述的行为猜测您正在使用 Firebird 3 和 Jaybird 2.2.x。

错误连接被远程接口拒绝也可能发生在下面描述的其他情况下。

可能原因:需要有线协议加密

Firebird 3 引入了许多默认启用但 Jaybird 2.2 不支持的新安全功能。要让 Jaybird 2.2 连接到 Firebird 3,您需要放松其中的一些设置。

要让 Jaybird 2.2.x 连接,您需要更改 firebird.conf 中的以下设置(并在更改设置后重新启动 Firebird):

WireCrypt 设置从默认的Required 放松为Enabled

WireCrypt = Enabled

启用对旧式身份验证协议的支持:

AuthServer = Srp, Legacy_Auth

然后,您需要通过启用对旧版用户管理器的支持,确保您要用于连接到 Firebird 的用户是使用旧版用户管理器创建的:

UserManager = Srp, Legacy_UserManager

重新启动 Firebird 以应用这些设置,然后 - 在 Flamerobin 中 - 使用 SYSDBA 帐户(或具有角色 RDB$ADMIN 的用户)创建所需的用户:

CREATE USER youruser PASSWORD 'yourpasw' USING PLUGIN Legacy_UserManager

您也可以升级到 Jaybird 3.0.4 或更高版本,它支持Srp 身份验证协议和有线协议加密。

这些设置在我们的 wiki 文章 Jaybird and Firebird 3 中有更详细的描述。我们的常见问题解答中没有此信息,我现在已将其添加到 connection rejected by remote interface (335544421) 下。

可能原因:没有用户名和密码

对于 Jaybird 3 或更高版本以及 Firebird 3 或更高版本,此错误可能是由于未提供用户名或密码造成的。缺少用户名或密码会导致 Jaybird 不尝试任何身份验证插件。这会导致 Firebird 拒绝连接尝试,因为至少应该进行一次身份验证尝试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-04
    • 2013-08-02
    • 1970-01-01
    • 2017-08-08
    • 2018-11-16
    • 2015-07-19
    相关资源
    最近更新 更多