Project

General

Profile

Actions

Bug #16055

closed

java.lang.Error null in PooledConnectionProvider

Added by Elaad FURREEDAN about 5 years ago. Updated about 5 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Architecture - Internal libs
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

This happened after a reboot where Rudder was behaving very strangely (slow, no connection to DB, etc). See #16051.

The trace is:

Caused by: java.lang.RuntimeException: BackendException: An error occured; cause was: java.lang.Error: null 
 -> com.normation.ldap.sdk.PooledConnectionProvider.liftedTree1$1(LDAPConnectionProvider.scala:243)
 -> com.normation.ldap.sdk.PooledConnectionProvider.pool(LDAPConnectionProvider.scala:238)
 -> com.normation.ldap.sdk.PooledConnectionProvider.pool$(LDAPConnectionProvider.scala:238)
    at com.normation.cfclerk.services.impl.GitTechniqueReader$RunOrThrow.runNow(GitTechniqueReader.scala:149)
    at com.normation.cfclerk.services.impl.GitTechniqueReader.<init>(GitTechniqueReader.scala:185)
    at bootstrap.liftweb.RudderConfig$.techniqueReader$lzycompute(RudderConfig.scala:1266)
    at bootstrap.liftweb.RudderConfig$.techniqueReader(RudderConfig.scala:1228)
    at bootstrap.liftweb.RudderConfig$.techniqueRepositoryImpl$lzycompute(RudderConfig.scala:1631)
    at bootstrap.liftweb.RudderConfig$.techniqueRepositoryImpl(RudderConfig.scala:1629)

Which matches that code:

231 trait PooledConnectionProvider[LDAP <: RoLDAPConnection] extends LDAPConnectionProvider[LDAP] {
232  self:UnboundidConnectionProvider =>
233
234  def poolSize : Int
235  def ldifFileLogger:LDIFFileLogger
236
237  // for performance reason, operation on pool can't be wrapped into ZIO
238  protected lazy val pool = try {
239    new LDAPConnectionPool(self.newUnboundidConnection, poolSize)
240  } catch {
241    case ex: LDAPException =>
242      LDAPConnectionLogger.error(s"Error during LDAP connection pool initialisation. Exception: ${ex.getDiagnosticMessage}")
243      throw new Error(ex.getDiagnosticMessage)
244  }

Files

rudder_webapp.log (7.19 KB) rudder_webapp.log Elaad FURREEDAN, 2019-10-24 15:00
before_error.log (106 KB) before_error.log Elaad FURREEDAN, 2019-10-24 15:06
LDIF.log (367 KB) LDIF.log Elaad FURREEDAN, 2019-10-24 15:23

Related issues 1 (1 open0 closed)

Related to Rudder - Architecture #16051: Re-authentication error in postgres doesn't kill existing poolNewActions
Actions #2

Updated by Elaad FURREEDAN about 5 years ago

Actions #3

Updated by François ARMAND about 5 years ago

  • Related to Architecture #16051: Re-authentication error in postgres doesn't kill existing pool added
Actions #4

Updated by François ARMAND about 5 years ago

  • Subject changed from java.lang.Error null after my Rudder became slow to java.lang.Error null in PooledConnectionProvider
  • Description updated (diff)
Actions #5

Updated by François ARMAND about 5 years ago

  • Category set to Architecture - Internal libs
  • Target version changed from 6.0.0~beta1 to 6.0.0

This error happens in that code, which is extremely strange:

231 trait PooledConnectionProvider[LDAP <: RoLDAPConnection] extends LDAPConnectionProvider[LDAP] {
232  self:UnboundidConnectionProvider =>
233
234  def poolSize : Int
235  def ldifFileLogger:LDIFFileLogger
236
237  // for performance reason, operation on pool can't be wrapped into ZIO
238  protected lazy val pool = try {
239    new LDAPConnectionPool(self.newUnboundidConnection, poolSize)
240  } catch {
241    case ex: LDAPException =>
242      LDAPConnectionLogger.error(s"Error during LDAP connection pool initialisation. Exception: ${ex.getDiagnosticMessage}")
243      throw new Error(ex.getDiagnosticMessage)
244  }

We get a null for a lazy val?

Actions #6

Updated by François ARMAND about 5 years ago

  • Description updated (diff)

Add code in description.

Actions #7

Updated by Alexis Mousset about 5 years ago

  • Target version changed from 6.0.0 to 6.0.1
Actions #8

Updated by Elaad FURREEDAN about 5 years ago

I haven't seen the bug since.

Actions #9

Updated by Elaad FURREEDAN about 5 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF