jeejeestudio
Member
Hi,
seem to have trouble getting jRDC2 running on Raspberry running Linux Ubuntu Server 20.04 with Apache and Mariadb, some things are really unclear:
- Installed Openjdk/jre 11 via putty on the Raspberry
- followed this tut https://www.b4x.com/android/forum/t...-rdc-remote-database-connector.61801/#content and the video
In configuration.properties I'm not sure if it should read localhost or LAN-IP where Rasp is on like 192.168.0.240
also not sure if the mariadb string is correct, could not find that on their website
- copied the jRDC.jar to folder private, because it was stated to not put it in www folder in case of apache server, but also not where to put it in case of apache
-opened port 17178 on Raspberry (I'm using ISPconfig and opening a port in the Firewall is easy)
- followed this https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/page-2 giving the nohup command via putty I get no confirmation if it has started or not, it looks like it is hanging
- Entering 192.168.0.240:17178/test or http://mylocalwebsitename.int:17178/test in FireFox browser does nothing, Firefox says can't make a connection
- Running jRDC server in B4J and entering localhost:17178/test in the browser it shows that it is running (but no db connection as I had Xampp not running on windows)
- Stopped B4J
- Started the app in B4A
This is in sub process_globals:
this is like in the example sub :
and in Activity_Create sub this was added:
When running in B4A and requesting data from Raspberry I get this error:
ResponseError. Reason: java.net.SocketTimeoutException: failed to connect to /192.168.0.240 (port 17178) from /192.168.232.2 (port 35584) after 30000ms, Response:
ERROR: java.net.SocketTimeoutException: failed to connect to /192.168.0.240 (port 17178) from /192.168.232.2 (port 35584) after 30000ms
Now it seems thejRDC2 Server is just not running on the Raspberry. How do I get this running correctly?
And where is this strange ip and port coming from 192.168.232.2 (port 35584) ---is that B4A or the android emulator?
Thanks for any help
seem to have trouble getting jRDC2 running on Raspberry running Linux Ubuntu Server 20.04 with Apache and Mariadb, some things are really unclear:
- Installed Openjdk/jre 11 via putty on the Raspberry
- followed this tut https://www.b4x.com/android/forum/t...-rdc-remote-database-connector.61801/#content and the video
In configuration.properties I'm not sure if it should read localhost or LAN-IP where Rasp is on like 192.168.0.240
also not sure if the mariadb string is correct, could not find that on their website
in configuration.properties:
#DATABASE CONFIGURATION
DriverClass=com.mariadb.jdbc.Driver
JdbcUrl=jdbc:mariadb://localhost/test?characterEncoding=utf8
User=mewhoelse
Password=blablabla
#Java server port
ServerPort=17178
sql.select_info=SELECT id, this, that, who FROM table;
-opened port 17178 on Raspberry (I'm using ISPconfig and opening a port in the Firewall is easy)
- followed this https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/page-2 giving the nohup command via putty I get no confirmation if it has started or not, it looks like it is hanging
- Entering 192.168.0.240:17178/test or http://mylocalwebsitename.int:17178/test in FireFox browser does nothing, Firefox says can't make a connection
- Running jRDC server in B4J and entering localhost:17178/test in the browser it shows that it is running (but no db connection as I had Xampp not running on windows)
- Stopped B4J
- Started the app in B4A
This is in sub process_globals:
B4X:
Sub Process_Globals
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Type DBCommand (Name As String, Parameters() As Object)
Private const rdcLink As String = "http://192.168.0.240:17178/rdc"
End Sub
this is like in the example sub :
B4X:
Sub InfoData
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_info", Null)
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
'work with result
req.PrintTable(res)
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub
and in Activity_Create sub this was added:
B4X:
Sub Activity_Create(FirstTime As Boolean)
InfoData
'and of course the rest of it..'
End Sub
When running in B4A and requesting data from Raspberry I get this error:
ResponseError. Reason: java.net.SocketTimeoutException: failed to connect to /192.168.0.240 (port 17178) from /192.168.232.2 (port 35584) after 30000ms, Response:
ERROR: java.net.SocketTimeoutException: failed to connect to /192.168.0.240 (port 17178) from /192.168.232.2 (port 35584) after 30000ms
Now it seems thejRDC2 Server is just not running on the Raspberry. How do I get this running correctly?
And where is this strange ip and port coming from 192.168.232.2 (port 35584) ---is that B4A or the android emulator?
Thanks for any help