B4J Question jRDC2 - I have a problem with running on the VPS server

kisoft

Well-Known Member
Licensed User
HI

I am trying to implement this solution and I have a problem with this path
/usr/share/java -jar jrdc.jar > nohup.out &
I am getting this error

Using username "root".
root@185.243.53.6's password:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 2.6.32-042stab131.1 x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Last login: Tue Aug 7 14:55:34 2018 from 46.134.189.4
root@testbd:~# nohup /usr/share/java -jar jrdc.jar > nohup.out &
[1] 663
root@testbd:~# nohup: ignoring input and redirecting stderr to stdout
nohup: failed to run command '/usr/share/java': Permission denied

I redirected the port in this way

sudo iptables -I INPUT -p tcp -m tcp --dport 17178 -j ACCEPT

Can anyone advise you?
 

kisoft

Well-Known Member
Licensed User
Success !!!!! Everything works very well.

B4X:
2018-08-09 22:46:53.807:INFO::main: Logging initialized @223ms to org.eclipse.jetty.util.log.StdErrLog
Aug 09, 2018 10:46:54 PM com.mchange.v2.log.MLog
INFO: MLog clients using java 1.4+ standard logging.
Aug 09, 2018 10:46:54 PM com.mchange.v2.c3p0.C3P0Registry
INFO: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
2018-08-09 22:46:54.663:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11
2018-08-09 22:46:54.805:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2018-08-09 22:46:54.806:INFO:oejs.session:main: No SessionScavenger set, using defaults
2018-08-09 22:46:54.808:INFO:oejs.session:main: node0 Scavenging every 660000ms
2018-08-09 22:46:54.815:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@42f93a98{/,file:///root/www,AVAILABLE}
2018-08-09 22:46:54.819:INFO:oejs.AbstractNCSARequestLog:main: Opened /root/logs/b4j-2018_08_09.request.log
2018-08-09 22:46:54.844:INFO:oejs.AbstractConnector:main: Started ServerConnector@72225131{HTTP/1.1,[http/1.1]}{0.0.0.0:17178}
2018-08-09 22:46:54.845:INFO:oejs.Server:main: Started @1262ms
jRDC is running (version = 2.21)
Aug 09, 2018 10:47:17 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1flei9y9x9020hcrt0meo|33a10788, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1flei9y9x9020hcrt0meo|33a10788, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://127.0.0.1/bazatest?characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 150, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> true, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
Command: query: czytaj2, took: 687ms, client=46.134.141.154
Command: query: czytaj2, took: 6ms, client=46.134.141.154
Command: query: czytaj2, took: 3ms, client=46.134.141.154

Thank you all for your help.

If you are using localhost in the JdbcUrl then change it to 127.0.0.1.
It was first mistake, but it should be 127.0.0.1 (without last dot)
and the second one is driver mysql-connector-java-8.0.12,. This is not working yet. I went back to the previous one mysql-connector-java-5.1.27-bin

@Erel, @OliverA, @DonManfred,
Thank you once again.
 
Last edited:
Upvote 0
Top