Android Question jRDC2 - Error fetching connection

Q Candiani

Member
Licensed User
Longtime User
Hi everyone,

I'm working with jRDC2. I have a PostgreSQL DB on a Server and I try to connect from an app (Android Device).
When I test the connection on Browser get this result:

http: //190.xxx.xxx.xx: 17178 / test
RemoteServer is running (11/22/2018 11:57:42)
Error fetching connection.

What is the meaning of "Error fetching connection"?

In the logs.txt I find:

190.96.127.66 - - [22 / Nov / 2018: 14: 57: 42 +0000] "GET / test HTTP / 1.1" 200 76 "-" "Mozilla / 5.0 (Windows NT 6.3; Win64; x64) AppleWebKit / 537.36 ( KHTML, like Gecko) Chrome / 70.0.3538.102 Safari / 537.36 "

It seems that there is no error, right?

If I try to execute some SQL sentences from B4A app for Android Device, I get that result in the log file.


190.96.127.66 - - [22 / Nov / 2018: 14: 47: 59 +0000] "POST / rdc? Method = query2 HTTP / 1.1" 500 682 "-" "okhttp / 3.5.0"
190.96.127.66 - - [22 / Nov / 2018: 14: 48: 19 +0000] "POST / rdc? Method = query2 HTTP / 1.1" 500 682 "-" "okhttp / 3.5.0"
190.96.127.66 - - [22 / Nov / 2018: 14: 50: 31 +0000] "POST / rdc? Method = query2 HTTP / 1.1" 500 682 "-" "okhttp / 3.5.0"
190.96.127.66 - - [22 / Nov / 2018: 14: 51: 01 +0000] "POST / rdc? Method = query2 HTTP / 1.1" 500 682 "-" "okhttp / 3.5.0"

But, the app does not get any result. In the app log:
ResponseError. Reason: java.net.SocketTimeoutException, Response:
ERROR: java.net.SocketTimeoutException

Any idea?
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Q Candiani

Member
Licensed User
Longtime User
Thanks, DonManfred. Do you think that the problem is on config.properties file or it is a server configuration (port or something else) issue?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Sorry, you are not providing enough info to answer this.
Both are possible. As you do not post the config i just can fish.

Try to create a small b4j app using SQL, add sql connetion to it and try to connect using the b4j app to your Database. Does it work? If not; which error you get?
 
Upvote 0

Bladimir Silva Toro

Active Member
Licensed User
Longtime User
Once this happened to me, the solution I gave was the following:

1. Debug B4J on the Server where you have the DB (Check errors)
2. Change port 17178 to 17180.
3. Restart the Server and Run jRDC2

Note: Remember to change the connection in your app in B4A, also check the firewall
 
Upvote 0
Top