Android Question RDC, can it run from Linux OS?

incendio

Well-Known Member
Licensed User
Longtime User
I saw that RDC is design to run on Windows OS. Can it run on Linux? If it can, how?
 

incendio

Well-Known Member
Licensed User
Longtime User
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I have tried this method suggested on this link : http://www.b4x.com/android/fo...ect-to-any-remote-db.31540/page-8#post-217480

I tried it on Centos 6.3 64bit, with jre1.7.0-51, firewall is disabled, with Firebird Database. On Windows OS, I can connect to Firebird database in Centos without a problem.

When tested on browser at CentOS at address http://127.0.0.1:17178/?method=test, I got these message :

RemoteServer is running (Thu Apr 10 14:56:29 WIT 2014)
java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

Not sure, but I think this is an error. Any ideas how to fix it?

Thanks in advance.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
This means that RDC was not able to connect to the database. Check the JdbcUrl. Maybe the port is wrong.

It is also possible that the user name or password are incorrect.

Thanks for your replied.

In config.properties on CentOs, JdbcUrl is like this :
DriverClass=org.firebirdsql.jdbc.FBDriver
JdbcUrl=jdbc:firebirdsql://localhost/homy_int_dba

ServerPort=17178

On Windows, I used the exact JdbcUrl like above without problem.

For user name or password, I sure it is correct, cause I can connect to Firebird Server in CentOs via my app in Windows.

Checking via Terminal on CentOS, produce a result like these :
[root@CentOs63-2 ~]# lsof -i :17178
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
firefox 2212 root 56u IPv4 17625 0t0 TCP localhost:60095->localhost:17178 (ESTABLISHED)
java 2258 root 41u IPv6 17620 0t0 TCP *:17178 (LISTEN)
java 2258 root 42u IPv6 17624 0t0 TCP localhost:17178->localhost:60095 (ESTABLISHED)
[root@CentOs63-2 ~]#

I am a noob in Linux, but I think the server is listening on port 17178.
 
Last edited:
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
The RDC server is listening to the correct port and is accessible. The error means that RDC wasn't able to connect to the database. Maybe the database server isn't running properly?
Thanks for your replied.
I am pretty sure that database server is running properly cause I can connect it via Windows app.

Is that an error from RDC or firebird JDBC?

Btw, on Windows, I am using JDK 1.6, on CentOS, using JDK 1.7 also CentOS is running in Virtualbox. Could it be this is the reason?

I think, RDC couldn't find the ip address of database server.
Here are the error when trying to run RDC via terminal :
==================================
[root@CentOs63-2 b4a-rdc]# cd /home/admin/b4a-rdc
[root@CentOs63-2 b4a-rdc]# java -Xmx256m -cp .:/home/admin/b4a-rdc/libs/*:/home/admin/b4a-rdc/jdbc_driver/* anywheresoftware.b4a.remotedatabase.RemoteServer
B4A Remote Database Connecter (version 0.9)
loading: /home/admin/b4a-rdc/config.properties
2014-04-10 23:34:46.687:INFO::jetty-7.4.2.v20110526
2014-04-10 23:34:46.720:INFO::started o.e.j.s.ServletContextHandler{/,null}
Apr 10, 2014 11:34:46 PM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Apr 10, 2014 11:34:46 PM com.mchange.v2.uid.UidUtils generateVmId
INFO: Failed to get local InetAddress for VMID. This is unlikely to matter. At all. We'll add some extra randomness
java.net.UnknownHostException: CentOs63-2: CentOs63-2
at java.net.InetAddress.getLocalHost(InetAddress.java:1426)
at com.mchange.v2.uid.UidUtils.generateVmId(UidUtils.java:70)
at com.mchange.v2.uid.UidUtils.<clinit>(UidUtils.java:54)
at com.mchange.v2.c3p0.impl.C3P0ImplUtils.<clinit>(C3P0ImplUtils.java:122)
at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>
 
Last edited:
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Try to change localhost with 127.0.0.1

Thanks for your replied.

localhost or 127.0.0.1 also failed although database server is running on the same machine with RDC.

Finally, I found the solution !
Changing localhost to server IP address solved the problem.
But before IP address changed, I have changed from jre 1.7 to jre 1.6. I guess, jre 1.7 will also works fine.

May be there is a bug, in RDC or JDBC, not sure.

Btw, how many connections (user connected at the same time) can handle by RDC, is it unlimited?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is not a bug in RDC. It failed to resolve the local host. Seems like there is something misconfigured in your linux machine.


Btw, how many connections (user connected at the same time) can handle by RDC, is it unlimited?
There are always limitations (memory, bandwidth, ...). However there is no hard limit. It should be able to support many concurrent connections.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…