N
N
Nikolay Baranenko2017-03-11 12:53:02
Java
Nikolay Baranenko, 2017-03-11 12:53:02

Why does a GDS Exception occur when connecting to FireBird. 335544421. connection rejected by remote interface?

Hello.
Today I decided to discover the FireBird DBMS.
Installed Firebird 3.0.1 server under Widnows
Created a database file

Server version:
WI-V3.0.1.32609 Firebird 3.0
Database: "D:\databases\firebird\data\example.fdb", User: DUTYUSER
SQL> select MON$DATABASE_NAME from mon$database;

MON$DATABASE_NAME                                                                                                                                                                                                                               
===============================================================================
D:\DATABASES\FIREBIRD\DATA\EXAMPLE.FDB

I tried to make a client in Java
String USERNAME = "SYSDBA";
        String PASSWORD = "пароль";
        String Text_Script="select MON$DATABASE_NAME from mon$database";
        String connection_string="jdbc:firebirdsql:192.168.10.41/3050:d:\\databases\\firebird\\data\\example.fdb";
        boolean st = false;
        Connection con = null;
        PreparedStatement ps = null;
        ResultSet rs = null;
        String Connection_Status = "";
        String value;
        Integer count_values;

        try {
            Class.forName("org.firebirdsql.jdbc.FBDriver");
            Connection connection = DriverManager.getConnection(connection_string, USERNAME, PASSWORD);
            connection.close();
            Connection_Status = "Подключение к БД " + connection_string + " прошло успешно.";
            try {
                Class.forName("org.firebirdsql.jdbc.FBDriver");
                con = DriverManager.getConnection
                        (connection_string, USERNAME, PASSWORD);
                ps = con.prepareStatement
                        (Text_Script);
                rs = ps.executeQuery();
           } catch (Exception e) {
                e.printStackTrace();
                System.out.println("\r\nerror: "+Connection_Status+" НО есть проблема с выборкой данных с помощью скрипта '"+Text_Script+"', ошибка: "+e+".");
            } finally {
                if (rs != null) {
                    try {
                        rs.close();
                    } catch (Exception e) {
                    }
                }
                if (ps != null) {
                    try {
                        ps.close();
                    } catch (Exception e) {
                    }
                }
                if (con != null) {
                    try {
                        con.close();
                    } catch (Exception e) {
                    }
                }
            }

        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
            System.out.format(value);
            System.out.println("\r\nerror: Проблема с подключением к БД "+connection_string+", ошибка: "+e+".");
        }

an error occurs when trying to connect
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544421. connection rejected by remote interface

What is the error and how to solve it?
Thank you in advance for your response.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Baranenko, 2017-03-11
@drno-reg


make changes to firebird.conf

AuthServer = Srp, Legacy_Auth
UserManager = Srp, Legacy_Auth
WireCrypt = Enabled

create user
and issue rights, for example, to the CUSTOMERS table
GRANT SELECT, UPDATE, INSERT, DELETE ON customers TO SYS;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question