Login failed (internal server error)

Hi guys,

just out of the blue I bumped into a login error. Seems it created a ticket for you, but it might be helpful to reiterate it here as well.

I registered the user, then updated some data, then went to login, and this happened. Second try to login worked ok.

    Response error:  Error: Backendless encountered an error while handling the request. An internal trouble ticket with ID 05F61B7A-F0B7-918B-FFBD-CDE6D8500E00 has been created and we will be investigating the issue.
java.lang.RuntimeException: java.lang.RuntimeException: redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhausted
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhausted
	at com.backendless.services.RunnerService.executeApiCall(RunnerService.java:72)
	at com.backendless.inject.interceptors.AbstractApiCallInterceptor.invoke(AbstractApiCallInterceptor.java:29)
	at controllers.Users.login(Users.java:230)
	at router.Routes$$anonfun$routes$1.$anonfun$applyOrElse$788(Routes.scala:13259)
	at play.core.routing.HandlerInvokerFactory$$anon$6.resultCall(HandlerInvoker.scala:134)
	at play.core.routing.HandlerInvokerFactory$$anon$6.resultCall(HandlerInvoker.scala:133)
	at play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$3$$anon$4$$anon$5.invocation(HandlerInvoker.scala:108)
	at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:88)
	at play.http.DefaultActionCreator$1.call(DefaultActionCreator.java:31)
	at com.backendless.old.security.OriginAction.call(OriginAction.java:41)
	at com.backendless.old.security.ApplicationExistenceAndUseAction.call(ApplicationExistenceAndUseAction.java:38)
	at com.backendless.old.security.ConsiderApiCallAction.call(ConsiderApiCallAction.java:29)
	at com.backendless.TimeOutAction.call(TimeOutAction.java:26)
	at com.backendless.SimultaneousApiCallLimitAction.call(SimultaneousApiCallLimitAction.java:25)
	at com.backendless.StaticHttpResponseHeadersAction.call(StaticHttpResponseHeadersAction.java:18)
	at com.backendless.StackOverflowHandlerAction.call(StackOverflowHandlerAction.java:19)
	at com.backendless.CloseEntityManagerAction.call(CloseEntityManagerAction.java:36)
	at com.backendless.CurrentRequestsNumberAction.call(CurrentRequestsNumberAction.java:30)
	at com.backendless.old.security.ValidateApplication.call(ValidateApplication.java:57)
	at play.core.j.JavaAction.$anonfun$apply$8(JavaAction.scala:138)
	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
	at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
	at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
	at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:56)
	at play.api.libs.streams.Execution$trampoline$.execute(Execution.scala:70)
	at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:48)
	at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:72)
	at scala.concurrent.impl.Promise$KeptPromise$Kept.onComplete(Promise.scala:372)
	at scala.concurrent.impl.Promise$KeptPromise$Kept.onComplete$(Promise.scala:371)
	at scala.concurrent.impl.Promise$KeptPromise$Successful.onComplete(Promise.scala:379)
	at scala.concurrent.impl.Promise.transform(Promise.scala:33)
	at scala.concurrent.impl.Promise.transform$(Promise.scala:31)
	at scala.concurrent.impl.Promise$KeptPromise$Successful.transform(Promise.scala:379)
	at scala.concurrent.Future.map(Future.scala:292)
	at scala.concurrent.Future.map$(Future.scala:292)
	at scala.concurrent.impl.Promise$KeptPromise$Successful.map(Promise.scala:379)
	at scala.concurrent.Future$.apply(Future.scala:658)
	at play.core.j.JavaAction.apply(JavaAction.scala:138)
	at play.api.mvc.Action.$anonfun$apply$2(Action.scala:96)
	at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
	at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhausted
	at com.backendless.inject.interceptors.AbstractApiCallInterceptor.lambda$invoke$0(AbstractApiCallInterceptor.java:36)
	at com.backendless.services.RunnerService.executeApiCall(RunnerService.java:56)
	... 54 more
Caused by: java.lang.RuntimeException: redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhausted
	at com.backendless.redis.JedisManager.execute(JedisManager.java:136)
	at com.backendless.taskman.JedisClientManager.execute(JedisClientManager.java:70)
	at com.backendless.taskman.TaskManager.queueTask(TaskManager.java:386)
	at com.backendless.taskman.TaskManager.queueTask(TaskManager.java:337)
	at com.backendless.services.users.services.UserLogin.login(UserLogin.java:137)
	at com.backendless.services.users.services.UserLogin.login(UserLogin.java:55)
	at com.backendless.services.users.impl.UserService.login(UserService.java:164)
	at com.backendless.services.users.impl.CustomLogicDecorator.lambda$login$0(CustomLogicDecorator.java:91)
	at com.backendless.servercode.codeModel.ModelCodeExtender.performActionWithValidation(ModelCodeExtender.java:105)
	at com.backendless.servercode.codeModel.ModelCodeExtender.performActionWithValidation(ModelCodeExtender.java:91)
	at com.backendless.services.users.impl.CustomLogicDecorator.performActionWithValidation(CustomLogicDecorator.java:84)
	at com.backendless.services.users.impl.CustomLogicDecorator.login(CustomLogicDecorator.java:91)
	at com.backendless.services.users.impl.UserServiceClientsProxyOrigin.login(UserServiceClientsProxyOrigin.java:229)
	at com.backendless.inject.interceptors.GoogleAnalyticInterceptor.invoke(GoogleAnalyticInterceptor.java:28)
	at com.backendless.inject.interceptors.AbstractApiCallInterceptor.lambda$invoke$0(AbstractApiCallInterceptor.java:32)
	... 55 more
Caused by: redis.clients.jedis.exceptions.JedisExhaustedPoolException: Could not get a resource since the pool is exhausted
	at redis.clients.jedis.util.Pool.getResource(Pool.java:53)
	at redis.clients.jedis.JedisSentinelPool.getResource(JedisSentinelPool.java:213)
	at redis.clients.jedis.JedisSentinelPool.getResource(JedisSentinelPool.java:16)
	at com.backendless.redis.JedisManager.getJedis(JedisManager.java:43)
	at com.backendless.redis.JedisManager.execute(JedisManager.java:129)
	... 69 more
Caused by: java.util.NoSuchElementException: Unable to validate object
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:502)
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:361)
	at redis.clients.jedis.util.Pool.getResource(Pool.java:50)
	... 73 more

    at new ResponseError (https://localhost:3000/static/js/0.chunk.js:185616:128)
    at checkStatus (https://localhost:3000/static/js/0.chunk.js:185808:35)
    console.<computed> @ index.js:1
    console.<computed> @ console-breadcrumbs.js:33
    onActionError @ Login.js:101
    onLogin @ Login.js:149
    async function (async)
    onLogin @ Login.js:142
    callCallback @ react-dom.development.js:347
    __trace__ @ inline-script-content.js:138
    invokeGuardedCallbackDev @ react-dom.development.js:397
    invokeGuardedCallback @ react-dom.development.js:454
    invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:468
    executeDispatch @ react-dom.development.js:600
    executeDispatchesInOrder @ react-dom.development.js:622
    executeDispatchesAndRelease @ react-dom.development.js:725
    executeDispatchesAndReleaseTopLevel @ react-dom.development.js:733
    forEachAccumulated @ react-dom.development.js:707
    runEventsInBatch @ react-dom.development.js:750
    runExtractedPluginEventsInBatch @ react-dom.development.js:881
    handleTopLevel @ react-dom.development.js:5901
    batchedEventUpdates @ react-dom.development.js:2344
    dispatchEventForPluginEventSystem @ react-dom.development.js:5996
    dispatchEvent @ react-dom.development.js:6025
    unstable_runWithPriority @ scheduler.development.js:643
    runWithPriority$2 @ react-dom.development.js:11305
    discreteUpdates$1 @ react-dom.development.js:21672
    discreteUpdates @ react-dom.development.js:2359
    dispatchDiscreteEvent @ react-dom.development.js:5979
    __trace__ @ inline-script-content.js:138

Hi, @Justinas_Grazulis !

Thank you for creating the ticket here too. Could you please reproduce this error? If yes, please provide your application`s appId.

@Justinas_Grazulis, we used to have a problem with Redis which could cause this error, and we fixed it. But if you can reproduce this error, we will tackle the problem.

Thanks Igor,

This error happened, and I cannot reproduce it. If I will see it again, I will re-open the ticket,

Cheers,
Justinas

1 Like