Subject Re: [Firebird-Java] Firebird Linux URL connection problems
Author Mark Rotteveel
On 5-12-2018 15:46, blyons3@... [Firebird-Java] wrote:
> The following URL connects successfully from a SpringData JPA Hibernate
> client on a SpringBoot Server to a Firebird database configured on a
> Windows server:
>
> spring.datasource.url=jdbc:firebirdsql://localhost:3050/C:/cw2db/cw2.gdb?encoding=UTF8&roleName=CWUSR
>
> When the database is rehosted on Linux, the following URL generates a
> stacktrace:
>
> spring.datasource.url=jdbc:firebirdsql://192.168.0.20:3050//opt/cw/db/cw2.gdb?encoding=UTF8&roleName=CWUSR
>
> The Linux URL works on a RazorSQL client but not from IBExpert.  The
> stack trace when trying to connect through SpringBoot is as follows:

The stacktrace shows you are using Jaybird 2.2.x (or earlier), and I
guess you are trying to connect to Firebird 3 with the default WireCrypt
setting.

If that is the case, check the FAQ entry for the "connection rejected by
remote interface" error on
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/faq.html#connection-rejected-by-remote-interface-335544421
and read
https://github.com/FirebirdSQL/jaybird/wiki/Jaybird-and-Firebird-3#jaybird-22-and-earlier

In short: you need to relax the WireCrypt setting from its default of
Required to Enabled. You also need to ensure the user exists as a
Legacy_Auth user.

Alternatively, you could upgrade to Jaybird 3.0.5 and make sure you use
a SRP user, not a Legacy_Auth user.

Likely you are using Jaybird 3.0.4 or higher with RazorSQL, which allows
it to connect. If IBExpert can't connect, then likely your system has
the Firebird 2.5 fbclient.dll installed.

If you're not using Firebird 3, I'm not sure what the problem could be.
The 'connection rejected by remote interface' in general means that the
client and server couldn't agree on a common feature set to be able to
connect, in above case Jaybird 2.2 only supports protocol 10, while
encryption required requires protocol 13 or higher.

[..]
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544421.
> connection rejected by remote interface
>
> at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
>
> at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:136)
>
> at
> com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117)
[..]
> Caused by: org.firebirdsql.gds.GDSException: connection rejected by
> remote interface
>
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.connect(AbstractJavaGDSImpl.java:1898)

> Am I misspelling something in that URL?  The server address is pingable
> and I know that the port is open and that a database catalog is
> displayed in RazorSQL after successful connection.

If you had misspelled something in the URL, you'd have received a
different error.

--
Mark Rotteveel