B4J Question jRDC on Linux Command line

schalkgreyling

Member
Licensed User
Longtime User
Hi guys,

I'm busy migrating my jRDC to a command line linux system. I can connect to the database (mysql on linux) from my Windows pc with jRDC but when I run the .jar on the linux system and executes a query I get the following:

2017-03-28 19:38:56.600:INFO::main: Logging initialized @344ms
2017-03-28 19:39:01.968:INFO:eek:ejs.Server:main: jetty-9.3.z-SNAPSHOT
2017-03-28 19:39:02.025:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@2892dae4{/,file:///home/klasie/www,AVAILABLE}
2017-03-28 19:39:02.028:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened /home/klasie/logs/b4j-2017_03_28.request.log
2017-03-28 19:39:02.041:INFO:eek:ejs.ServerConnector:main: Started ServerConnector@31275903{HTTP/1.1,[http/1.1]}{0.0.0.0:17178}
2017-03-28 19:39:02.042:INFO:eek:ejs.Server:main: Started @5787ms
jRDC is running (version = 2.1)

(TimeoutException) com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@79acf084 -- timeout at awaitAvailable()
(CannotAcquireResourceException) com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
(TimeoutException) com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@79acf084 -- timeout at awaitAvailable()
(CannotAcquireResourceException) com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.

Command: , took: 5966ms, client=192.168.1.211
Command: , took: 21232ms, client=192.168.1.211



I'm suspecting it's got to do with the mysql-driver but i'm not too familiar with linux so i'm not sure where to start/what is required to run the jar.

When I run the same .jar on windows after the "Command:" i see the login command being posted. But not on the Linux system.

Also I deleted/add the environmental variable to the classpath for the mysql-driver and now the jRDC server is not receiving any requests. But I have no idea how to fix it.

line used :
export CLASSPATH=/path/mysql-connector-java-ver-bin.jar:$CLASSPATH

Obviously adding the driver version and the correct path to the driver.

I'm sure that i'm missing a step or two in the config.

Any help would be appreciated.

Regards,
 

schalkgreyling

Member
Licensed User
Longtime User
Hi Earl,

I'm hosting on yayavpn.dontexit.org. I cannot telnet into port 17178, i have checked and the app is running:
- I have allowed the port on my router (i can connect to mysql over it), but I get the same issue for jRDC on the local network.

iptables is disabled:
root@xx:/home/klasie# service iptables stop
Failed to stop iptables.service: Unit iptables.service not loaded.

root@xx:/home/xx# ps -ef | grep 22793
root 22793 1 25 10:52 pts/0 00:00:11 java -jar /home/klasie/jRDC.jar

root@xx:/home/xx# lsof -i TCP | grep 17178
java 22793 root 8u IPv6 285957 0t0 TCP *:17178 (LISTEN)

Should the above be listed as ipv6?

Is there something obvious which i am missing?

The jRDC log is now not showing anything anymore after "jRDC is running (version = 2.1)" which mean I broke something even more when i messed with the classpath in env vars?

Ugh feels like I should resort to running it on windows rather?
 
Upvote 0
Top