Unable to deploy custom business logic

Hello Team,

I am trying to deploy a before save trigger for a table in my database in Backendless Cloud. I am receiving the following error:

[ERROR] Could not get a resource from the pool
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
e from the pool
at redis.clients.util.Pool.getResource(Pool.java:50) ~[CodeRunner.jar:na
]
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:86) ~[CodeRu
nner.jar:na]
at com.backendless.redis.JedisManager.getJedis(JedisManager.java:40) ~[C
odeRunner.jar:na]
at com.backendless.redis.JedisManager.execute(JedisManager.java:97) ~[Co
deRunner.jar:na]
at com.backendless.registrator.InstanceRegistrator.register(InstanceRegi
strator.java:25) ~[CodeRunner.jar:na]
at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.j
ava:43) [CodeRunner.jar:na]
at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.jav
a:33) [CodeRunner.jar:na]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.Soc
ketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:154) ~[CodeRun
ner.jar:na]
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83) ~[Code
Runner.jar:na]
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1643) ~[Code
Runner.jar:na]
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:85) ~[C
odeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectP
ool.java:861) ~[CodeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:435) ~[CodeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:363) ~[CodeRunner.jar:na]
at redis.clients.util.Pool.getResource(Pool.java:48) ~[CodeRunner.jar:na
]
… 6 common frames omitted
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) ~[na:1
.8.0_45]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
va:345) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
Impl.java:206) ~[na:1.8.0_45]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:188) ~[na:1.8.0_45]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0
_45]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0
_45]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_45]
at redis.clients.jedis.Connection.connect(Connection.java:148) ~[CodeRun
ner.jar:na]
… 13 common frames omitted

Do I need to change some setting?

Thanks in advance.

Hi!
This issue reproduces every time when you try to deploy trigger?

Hi Kate,

Yes this issue reproduces every time.

When you say “deploy” do you run it in the debug mode or you’re actually using the “deploy” utility?

Also, could you make sure you’re using the latest code runner?

Hi Mark,

This was when i used the CodeRunner.bat command. I guess this is the debug mode.

But when I’m trying to directly deploy my code to production with the Deploy.bat command, I am getting the following error:

[ERROR] <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.8.1</center>
</body>
</html>

[ERROR] Unfortunately, CodeRunner Debugging Utility cannot continue

Do you run it from a corporate network where non-standard ports might be blocked?

Does it work when you run CodeRunner for local debugging?

Hi Mark,

I am running on personal network at my home with no firewalls or anything that might block.

When i used the CodeRunner.bat, I got the error that I have mentioned in the first comment.

Also i am using 3.0.14 version of Coderunner

Could you run CodeRunner.bat and paste here complete output of the program?

This is the complete output:

Starting CodeRunner
Listening for transport dt_socket at address: 5005
[INFO] JDK from “JAVA_HOME” - C:\Program Files\Java\jdk1.8.0_45\bin
[INFO] JRE from “JRE_HOME” - C:\Program Files\Java\jre1.8.0_45\bin
[ERROR] Could not get a resource from the pool
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
e from the pool
at redis.clients.util.Pool.getResource(Pool.java:50) ~[CodeRunner.jar:na
]
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:86) ~[CodeRu
nner.jar:na]
at com.backendless.redis.JedisManager.getJedis(JedisManager.java:40) ~[C
odeRunner.jar:na]
at com.backendless.redis.JedisManager.execute(JedisManager.java:97) ~[Co
deRunner.jar:na]
at com.backendless.registrator.InstanceRegistrator.register(InstanceRegi
strator.java:25) ~[CodeRunner.jar:na]
at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.j
ava:43) [CodeRunner.jar:na]
at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.jav
a:33) [CodeRunner.jar:na]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.Soc
ketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:154) ~[CodeRun
ner.jar:na]
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83) ~[Code
Runner.jar:na]
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1643) ~[Code
Runner.jar:na]
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:85) ~[C
odeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectP
ool.java:861) ~[CodeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:435) ~[CodeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:363) ~[CodeRunner.jar:na]
at redis.clients.util.Pool.getResource(Pool.java:48) ~[CodeRunner.jar:na
]
… 6 common frames omitted
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) ~[na:1
.8.0_66]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0
_66]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[n
a:1.8.0_66]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_6
6]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_66]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_66]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_66]
at redis.clients.jedis.Connection.connect(Connection.java:148) ~[CodeRun
ner.jar:na]
… 13 common frames omitted
Press any key to continue . . .

Hi!

Please, use latest CodeRunner (3.0.16) from code generation.

Regards,

Denys

Still getting the same error:

Starting CodeRunner
Listening for transport dt_socket at address: 5005
[INFO] JDK from “JAVA_HOME” - C:\Program Files\Java\jdk1.8.0_45\bin
[INFO] JRE from “JRE_HOME” - C:\Program Files\Java\jre1.8.0_45\bin
[ERROR] Could not get a resource from the pool
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resourc
e from the pool
at redis.clients.util.Pool.getResource(Pool.java:50) ~[CodeRunner.jar:na
]
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:86) ~[CodeRu
nner.jar:na]
at com.backendless.redis.JedisManager.getJedis(JedisManager.java:40) ~[C
odeRunner.jar:na]
at com.backendless.redis.JedisManager.execute(JedisManager.java:97) ~[Co
deRunner.jar:na]
at com.backendless.registrator.InstanceRegistrator.register(InstanceRegi
strator.java:25) ~[CodeRunner.jar:na]
at com.backendless.coderunner.CodeRunnerLoader.launch(CodeRunnerLoader.j
ava:43) [CodeRunner.jar:na]
at com.backendless.coderunner.CodeRunnerLoader.main(CodeRunnerLoader.jav
a:33) [CodeRunner.jar:na]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.Soc
ketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:154) ~[CodeRun
ner.jar:na]
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83) ~[Code
Runner.jar:na]
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1643) ~[Code
Runner.jar:na]
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:85) ~[C
odeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectP
ool.java:861) ~[CodeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:435) ~[CodeRunner.jar:na]
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:363) ~[CodeRunner.jar:na]
at redis.clients.util.Pool.getResource(Pool.java:48) ~[CodeRunner.jar:na
]
… 6 common frames omitted
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) ~[na:1
.8.0_66]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0
_66]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[n
a:1.8.0_66]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_6
6]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_66]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_66]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_66]
at redis.clients.jedis.Connection.connect(Connection.java:148) ~[CodeRun
ner.jar:na]
… 13 common frames omitted
Press any key to continue . . .

please zip your project and send to support@backendless.com

Hello!

The endpoint of your coderunner is incorrect.
Have you generated your code from online version? If so - try to generate it from your standalone installation and check again. If it doesn’t work - notify us please.
best regards,
Alex

Getting this error with the standalone version:

Starting CodeRunner
Listening for transport dt_socket at address: 5005
[INFO] JDK from “JAVA_HOME” - C:\Program Files\Java\jdk1.8.0_45\bin
[INFO] JRE from “JRE_HOME” - C:\Program Files\Java\jre1.8.0_45\bin
[INFO] CodeRunner™ Backendless Debugging Utility
[INFO] Copyright© 2016 Backendless Corp. All rights reserved.
[INFO] Version: 3.0.12-ENTERPRISE Build date: 20160324-0927
[INFO] CodeRunner session is running for 2 hour and will be terminated on 12:17:
13.711[UTC]

[INFO] Registering runner on: ‘http://192.168.224.1:90/api’ with version ‘v1’
[INFO] Application ID: ‘F9A3E088-XXXX-XXXX-XXXX-XXXXE0579600’
[INFO] Secret key: ‘F479F8BE-XXXX-XXXX-XXXX-XXXXEB451900’
[INFO] Runner successfully registered
[INFO] Parsing event model…
[ERROR] Cannot run program “jar” (in directory “…\classes”): CreateProcess erro
r=2, The system cannot find the file specified
[INFO] Debugging Utility disconnected successfully
[INFO] Thank you for using Backendless
Press any key to continue . . .

What version of Backendless Standalone do you use?

The latest one for Windows. 3.0.24
:slight_smile:

We’re looking at this issue, I hope we shall find the answer in a few days.

I’ve noticed one thing in your logs - your “JAVA_HOME” and “JRE_HOME” variables contain “\bin”. It might cause your problem. Try to set them to C:\Program Files\Java\jdk1.8.0_45 and C:\Program Files\Java\jre1.8.0_45 respectively.