Alternative or solution for ON EXTERNAL DATA SOURCE in Linux firebird 5.0 arm64.
The following trigger gives me a connection error.
SET TERM ^ ;
CREATE OR ALTER TRIGGER SYSTEM_SHAREWARE ACTIVE
ON CONNECT POSITION 0
AS
DECLARE VARIABLE comando D_VARCHAR_1024;
DECLARE VARIABLE entrada D_BOOLEAN_T;
DECLARE VARIABLE c_Fchi D_FECHA;
DECLARE VARIABLE c_Fcha D_FECHA;
DECLARE VARIABLE c_Fchv D_FECHA;
BEGIN
IF(CURRENT_ROLE <> 'RRR_SOFTSURENA')THEN
BEGIN
comando = 'SELECT FCHI, FCHA, FCHV FROM SP_V_E_S_SYS(?);';
entrada = TRUE;
FOR EXECUTE STATEMENT (comando) ((select RDB$GET_CONTEXT('SYSTEM', 'DB_GUID') from RDB$DATABASE))
ON EXTERNAL 'registros.db'
AS USER 'SYSDBA'
PASSWORD '1'
INTO
:c_Fchi, c_Fcha, c_Fchv
DO BEGIN
IF(CURRENT_DATE < c_Fchi)THEN
EXCEPTION E_FECHA_INICIAL_INCORRECTA;
IF(CURRENT_DATE < c_Fcha)THEN
EXCEPTION E_FECHA_ACTUAL_INCORRECTA;
IF(CURRENT_DATE > c_Fchv)THEN
EXCEPTION E_FECHA_VENCIMIENTO;
UPDATE V_T_E_S_SYS SET
FCHI = :c_Fchi,
FCHA = :c_Fcha,
FCHV = :c_Fchv;
entrada = FALSE;
END
IF(entrada) THEN
EXCEPTION E_EQUIPO_NO_REGISTRADO;
END
END
^
SET TERM ; ^
OutPut:
Please, provide reproducible test case.
Is the problem arm64 specific or did you tested only on it?
Problems is ARM64 ubuntu arm64 on oracle VPS. Free tier.
` import java.sql.SQLException; import java.util.logging.Level; import org.firebirdsql.event.DatabaseEvent; import org.firebirdsql.event.FBEventManager; import org.firebirdsql.gds.impl.GDSType; import org.firebirdsql.gds.ng.WireCrypt; import sur.softsurena.entidades.Almacen; import sur.softsurena.formularios.frmAlmacenes; import sur.softsurena.formularios.frmClientes; import static sur.softsurena.formularios.frmClientes.llenarTablaCorreos; import static sur.softsurena.formularios.frmClientes.llenarTablaDirreciones; import static sur.softsurena.formularios.frmClientes.llenarTablaTelefonos; import sur.softsurena.formularios.frmDeudas; import static sur.softsurena.formularios.frmProductos.llenarTablaProductos; import static sur.softsurena.formularios.frmUsuarios.llenarTablaUsuarios; import static sur.softsurena.utilidades.Utilidades.LOG;
public class FirebirdEventos extends FBEventManager {
public FirebirdEventos(){
super(GDSType.getType("PURE_JAVA"));
setUser("sysdba");
setPassword("1");
setServerName("Oracle VPS Free Tier");
setPortNumber(3050);
setDatabaseName("aliasDB");
setCharSet("UTF8");
setWireCryptAsEnum(WireCrypt.ENABLED);
try {
connect();
} catch (SQLException ex) {
LOG.log(
Level.SEVERE,
ex.getMessage(),
ex
);
throw new ExceptionInInitializerError("No pudo conectarse.");
}
}
public static void main(String[] args) {
FirebirdEventos eventos = new FirebirdEventos();
eventos.registro();
}
public synchronized boolean registro() {
try {
//Evento para productos.********************************************
addEventListener( "EVENT_PRODUCTO", (DatabaseEvent event) -> {
LOG.log(
Level.INFO,
"Event [{0}] occured {1} time(s)",
new Object[]{event.getEventName(), event.getEventCount()}
);
llenarTablaProductos("evento");
});
} catch (SQLException ex) {
LOG.log(
Level.SEVERE,
ex.getMessage(),
ex
);
return false;
}
return true;
}
} `
mar 14, 2025 6:04:06 P.�M. sur.softsurena.FirebirdEventos.FirebirdEventos registro GRAVE: Error writing data to the connection. [SQLState:08006, ISC error code:335544727] java.sql.SQLException: Error writing data to the connection. [SQLState:08006, ISC error code:335544727] at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:618) at org.firebirdsql.gds.ng.FbExceptionBuilder$ExceptionInformation.toSQLException(FbExceptionBuilder.java:571) at org.firebirdsql.gds.ng.FbExceptionBuilder.toSQLException(FbExceptionBuilder.java:309) at org.firebirdsql.gds.ng.wire.version10.V10AsynchronousChannel.connect(V10AsynchronousChannel.java:111) at org.firebirdsql.gds.ng.wire.version10.V10Database.initAsynchronousChannel(V10Database.java:473) at org.firebirdsql.gds.ng.wire.AbstractFbWireDatabase.queueEvent(AbstractFbWireDatabase.java:234) at org.firebirdsql.event.FBEventManager$GdsEventHandler.register(FBEventManager.java:537) at org.firebirdsql.event.FBEventManager.registerListener(FBEventManager.java:430) at org.firebirdsql.event.FBEventManager.addEventListener(FBEventManager.java:378) at sur.softsurena.FirebirdEventos.FirebirdEventos.registro(FirebirdEventos.java:73) at sur.softsurena.FirebirdEventos.FirebirdEventos.main(FirebirdEventos.java:49) Caused by: java.net.ConnectException: Connection timed out: connect at java.base/sun.nio.ch.Net.connect0(Native Method) at java.base/sun.nio.ch.Net.connect(Net.java:589) at java.base/sun.nio.ch.Net.connect(Net.java:596) at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:880) at org.firebirdsql.gds.ng.wire.version10.V10AsynchronousChannel.connect(V10AsynchronousChannel.java:108) ... 7 more
Same error on JAVA. ORACLE UBUNTU ARM64 VPS free tier...
Connection timed out: connect at java.base/sun.nio.ch.Net.connect0(Native Method) at java.base/
Set dedicated port for events conection (RemoteAuxPort in firebird.conf) and make sure it is not blocked by firewall.
mar 14, 2025 6:04:06 P.�M. sur.softsurena.FirebirdEventos.FirebirdEventos registro GRAVE: Error writing data to the connection. [SQLState:08006, ISC error code:335544727] java.sql.SQLException: Error writing data to the connection. [SQLState:08006, ISC error code:335544727] at
Also, this is completely different error than in the first message.
We need complete test case, preferable with ISQL only if Java is not necessary for reproduce.
databases.conf
My VPS ports.
Server config and firewalls settings.
firebird.log
I don't know how to do....
Try to set RemoteAuxPort in firebird.conf (not in databases.conf).
It is wrongly marked as per-database in comments.
Currently working with Firebird 5.0.0. I'll have the same issues as in later versions. Sorry, I've been pretty busy lately.