GDS异常. 335544421.远程接口拒绝了连接 [英] GDS Exception. 335544421. connection rejected by remote interface

查看:263
本文介绍了GDS异常. 335544421.远程接口拒绝了连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to connect to a firebird db using the jaybird jdbc driver. Firebird is running under ubuntu. I have created a simple database located under /tmp/hellofb.fdb (yeah not the best place, just for testing). I am running firebird superserver 3.0. The firebird service is up and running 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由以下内容提供:

My spring boot application.properties is given by:

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

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

However, when I try to connect to the database, I get the following exception:

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常见问题解答,我已经用尽所有选项.任何帮助将不胜感激!

I have tried all possible permutations given by the jaybird FAQ, I am running out of options. Any help would be greatly appreciated!

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

Note: I tried to connect to the databse using flamerobin and everything works just fine

推荐答案

鉴于您没有提供我在评论中要求的信息,我不得不猜测您根据说明将Firebird 3与Jaybird 2.2.x一起使用行为.

Given you haven't provided the information I asked for in the comments, I have to guess you are using Firebird 3 with Jaybird 2.2.x based on the described behavior.

远程接口拒绝的错误连接也可能在以下所述的其他条件下发生.

The error connection rejected by remote interface can also occur under other conditions than described below.

Firebird 3引入了许多新的安全功能,这些功能默认情况下处于启用状态,但Jaybird 2.2不支持.要允许Jaybird 2.2连接到Firebird 3,您需要放松一些设置.

Firebird 3 introduces a number of new security features that are enabled by default, but are not supported by Jaybird 2.2. To allow Jaybird 2.2 to connect to Firebird 3 you need to relax some of those settings.

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

To allow Jaybird 2.2.x to connect, you need to change the following settings in firebird.conf (and restart Firebird after changing the setting):

WireCrypt设置从其默认值Required放松至Enabled:

Relax the WireCrypt setting from its default of Required to Enabled:

WireCrypt = Enabled

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

Enable support for the legacy authentication protocol:

AuthServer = Srp, Legacy_Auth

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

You then need to make sure the user you want to use for connecting to Firebird is created with the legacy usermanager by enabling support for the legacy usermanager:

UserManager = Srp, Legacy_UserManager

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

Restart Firebird to apply these settings, and then - in Flamerobin - with a SYSDBA account (or user with role RDB$ADMIN), create the required user:

CREATE USER youruser PASSWORD 'yourpasw' USING PLUGIN Legacy_UserManager

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

Alternatively you could upgrade to Jaybird 3.0.4 or higher, which supports the Srp authentication protocol and wire protocol encryption.

这些设置在我们的Wiki上的 Jaybird中有更详细的描述.和Firebird 3 .我们的常见问题解答中没有此信息,我现在将其添加到

These settings are described in more detail on our wiki in article Jaybird and Firebird 3. This information was absent from our FAQ, I have now added it under connection rejected by remote interface (335544421).

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

With Jaybird 3 or higher and Firebird 3 or higher, this error can be the result of not providing a username or password. The absence of a user name or password causes Jaybird to not try any authentication plugin. This results in Firebird rejecting the connection attempt as at least one authentication attempt should be done.

这篇关于GDS异常. 335544421.远程接口拒绝了连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆