Subject Firebird Linux URL connection problems
Author

Hello,


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:

...


DEBUG: com.zaxxer.hikari.HikariConfig - jdbcUrl.........................jdbc:firebirdsql://192.168.0.20:3050//opt/cw/db/cw2.gdb?encoding=UTF8&roleName=CWUSR

DEBUG: com.zaxxer.hikari.HikariConfig - leakDetectionThreshold..........0

DEBUG: com.zaxxer.hikari.HikariConfig - maxLifetime.....................1800000

DEBUG: com.zaxxer.hikari.HikariConfig - maximumPoolSize.................10

DEBUG: com.zaxxer.hikari.HikariConfig - metricRegistry..................none

DEBUG: com.zaxxer.hikari.HikariConfig - metricsTrackerFactory...........none

DEBUG: com.zaxxer.hikari.HikariConfig - minimumIdle.....................10

DEBUG: com.zaxxer.hikari.HikariConfig - password........................<masked>

DEBUG: com.zaxxer.hikari.HikariConfig - poolName........................"HikariPool-1"

DEBUG: com.zaxxer.hikari.HikariConfig - readOnly........................false

DEBUG: com.zaxxer.hikari.HikariConfig - registerMbeans..................false

DEBUG: com.zaxxer.hikari.HikariConfig - scheduledExecutor...............none

DEBUG: com.zaxxer.hikari.HikariConfig - scheduledExecutorService........internal

DEBUG: com.zaxxer.hikari.HikariConfig - schema..........................none

DEBUG: com.zaxxer.hikari.HikariConfig - threadFactory...................internal

DEBUG: com.zaxxer.hikari.HikariConfig - transactionIsolation............default

DEBUG: com.zaxxer.hikari.HikariConfig - username........................"dc"

DEBUG: com.zaxxer.hikari.HikariConfig - validationTimeout...............5000

INFO : com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...

DEBUG: com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to create/setup connection: GDS Exception. 335544421. connection rejected by remote interface

DEBUG: com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Cannot acquire connection from data source

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)

at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:123)

at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:365)

at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:194)

at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:460)

at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:534)

at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)

at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)

at com.counterworks.ds.launch.CwDataServerApplication.buildDefaultDataSource(CwDataServerApplication.java:303)

at com.counterworks.ds.launch.CwDataServerApplication.dataSource(CwDataServerApplication.java:285)

at com.counterworks.ds.launch.CwDataServerApplication$$EnhancerBySpringCGLIB$$e7d49a25.CGLIB$dataSource$0(<generated>)

at com.counterworks.ds.launch.CwDataServerApplication$$EnhancerBySpringCGLIB$$e7d49a25$$FastClassBySpringCGLIB$$4852cf8e.invoke(<generated>)

at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)

at com.counterworks.ds.launch.CwDataServerApplication$$EnhancerBySpringCGLIB$$e7d49a25.dataSource(<generated>)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818)

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:197)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1276)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1133)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)

at com.counterworks.ds.launch.CwDataServerApplication.main(CwDataServerApplication.java:100)

Caused by: org.firebirdsql.gds.GDSException: connection rejected by remote interface

at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.connect(AbstractJavaGDSImpl.java:1898)

at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.internalAttachDatabase(AbstractJavaGDSImpl.java:429)

at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscAttachDatabase(AbstractJavaGDSImpl.java:409)

at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:105)

at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:509)

at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:65)

at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:118)

... 63 common frames omitted

ERROR: com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.


...


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.


Thanks!