Project

General

Profile

Actions

Bug #7252

closed

LDAPSDKUsageException - MatchedValuesRequestControl.filters must not be empty

Added by Janos Mattyasovszky about 9 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
1 (highest)
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Hi,

When I am running the 3.1-latest (currently 3.1.2) via Docker, I get following error shortly after startup:

[2015-10-07 08:59:01] ERROR net.liftweb.util.Schedule - LDAPSDKUsageException(message='MatchedValuesRequestControl.filters must not be empty..  Thread stack trace:  getStackTrace(Thread.java:1589) 
ensureTrue(Validator.java:302) 
encodeValue(MatchedValuesRequestControl.java:212) 
<init>(MatchedValuesRequestControl.java:149) 
<init>(MatchedValuesRequestControl.java:132) 
apply(HomePage.scala:348) 
apply(HomePage.scala:335) 
map(Box.scala:553) 
apply(HomePage.scala:335) 
apply(HomePage.scala:331) 
flatMap(Box.scala:555) 
apply(HomePage.scala:331) 
apply(HomePage.scala:330) 
apply(LDAPConnectionProvider.scala:117) 
apply(LDAPConnectionProvider.scala:116) 
withCon(LDAPConnectionProvider.scala:154) 
withCon(LDAPConnectionProvider.scala:369) 
flatMap(LDAPConnectionProvider.scala:116) 
flatMap(LDAPConnectionProvider.scala:369) 
getRudderAgentVersion(HomePage.scala:330) 
rudderAgentVersion(HomePage.scala:295) 
invoke0(NativeMethodAccessorImpl.java) / invoke(NativeMethodAccessorImpl.java:57) / invoke(DelegatingMethodAccessorImpl.java:43) / invoke(Method.java:606) / apply(ClassHelpers.scala:321) / tryo(ControlHelpers.scala:46) / tryo(Helpers.scala:34) / tryo(ControlHelpers.scala:84) / tryo(Helpers.scala:34) / apply(ClassHelpers.scala:321) / apply(ClassHelpers.scala:321) / next(Iterator.scala:328) / find(Iterator.scala:779) / find(Iterator.scala:1157) / net$liftweb$util$ClassHelpers$$_invokeMethod(ClassHelpers.scala:322) / invokeMethod(ClassHelpers.scala:241) / invokeMethod(Helpers.scala:34) / invokeMethod(ClassHelpers.scala:226) / invokeMethod(Helpers.scala:34) / apply(LiftSession.scala:1801) / apply(LiftSession.scala:1801) / or(Box.scala:646) / apply(LiftSession.scala:1800) / apply(LiftSession.scala:1797) / openOr(Box.scala:644) / apply(LiftSession.scala:1797) / apply(LiftSession.scala:1710) / openOr(Box.scala:644) / apply(LiftSession.scala:1708) / apply(LiftSession.scala:1708) / openOr(Box.scala:644) / apply(LiftSession.scala:1707) / apply(LiftSession.scala:1707) / net$liftweb$http$LiftSession$$runWhitelist$1(LiftSession.scala:1697) / apply(LiftSession.scala:1706) / apply(LiftSession.scala:1706) / doSnippet(S.scala:2393) / doSnippet(S.scala:47) / apply(LiftSession.scala:1705) / apply(LiftSession.scala:1703) / map(Box.scala:553) / net$liftweb$http$LiftSession$$processSnippet(LiftSession.scala:1703) / applyOrElse(LiftSession.scala:1930) / applyOrElse(LiftSession.scala:1918) / apply(AbstractPartialFunction.scala:33) / apply(NamedPartialFunction.scala:36) / apply(NamedPartialFunction.scala:82) / apply(LiftSession.scala:2028) / apply(LiftSession.scala:2027) / doWith(ThreadGlobal.scala:71) / withAttrs(S.scala:2137) / withAttrs(S.scala:47) / apply(LiftSession.scala:2026) / apply(LiftSession.scala:2026) / doSnippet(S.scala:2393) / doSnippet(S.scala:47) / apply(LiftSession.scala:2025) / apply(LiftSession.scala:2025) / doWith(ThreadGlobal.scala:71) / withCurrentSnippetNodeSeq(S.scala:2354) / withCurrentSnippetNodeSeq(S.scala:47) / apply(LiftSession.scala:2024) / apply(LiftSession.scala:2024) / net$liftweb$http$LiftSession$$processOrDefer(LiftSession.scala:2005) / apply(LiftSession.scala:2023) / apply(LiftSession.scala:2018) / apply(TraversableLike.scala:251) / apply(TraversableLike.scala:251) / foreach(Iterator.scala:727) / foreach(Iterator.scala:1157) / foreach(IterableLike.scala:72) / foreach(Iterable.scala:54) / flatMap(TraversableLike.scala:251) / flatMap(Traversable.scala:105) / processSurroundAndInclude(LiftSession.scala:2018) / apply(LiftSession.scala:2040) / apply(LiftSession.scala:2018) / apply(TraversableLike.scala:251) / apply(TraversableLike.scala:251) / foreach(Iterator.scala:727) / foreach(Iterator.scala:1157) / foreach(IterableLike.scala:72) / foreach(Iterable.scala:54) / flatMap(TraversableLike.scala:251) / flatMap(Traversable.scala:105) / processSurroundAndInclude(LiftSession.scala:2018) / apply(JsCommands.scala:608) / apply(JsCommands.scala:607) / map(Box.scala:553) / fixHtmlAndJs(JsCommands.scala:607) / fixHtmlAndJs(JqJsCmds.scala:345) / fixHtmlCmdFunc(JsCommands.scala:591) / fixHtmlCmdFunc(JqJsCmds.scala:345) / <init>(JqJsCmds.scala:346) / <init>(JqJsCmds.scala:501) / replace(JQueryArtifacts.scala:73) / replace(JQueryArtifacts.scala:137) / <init>(JsCommands.scala:686) / apply(LazyLoad.scala:102) / apply(LazyLoad.scala:102) / apply(LiftSession.scala:1640) / doWith(AnyVar.scala:233) / doWith(AnyVar.scala:89) / apply(LiftSession.scala:457) / openOr(Box.scala:644) / doWith(LiftSession.scala:457) / net$liftweb$http$LiftSession$$doExec$1(LiftSession.scala:1638) / apply(LiftSession.scala:1652) / net$liftweb$http$S$$wrapQuery(S.scala:1460) / apply(S.scala:1625) / net$liftweb$http$S$$doAround(S.scala:1389) / apply(S.scala:1623) / doWith(ThreadGlobal.scala:71) / net$liftweb$http$S$$_nest2InnerInit(S.scala:1622) / apply(S.scala:1666) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1676) / doWith(ThreadGlobal.scala:71) / withReq(S.scala:1675) / withReq(S.scala:47) / apply(S.scala:1662) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1660) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1659) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1658) / doWith(ThreadGlobal.scala:71) / net$liftweb$http$S$$_innerInit(S.scala:1657) / apply(S.scala:1699) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1697) / apply(Vars.scala:613) / apply(Vars.scala:515) / apply(S.scala:1696) / apply(Vars.scala:619) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:618) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:617) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:616) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:615) / apply(Vars.scala:528) / apply(S.scala:1695) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1694) / doWith(ThreadGlobal.scala:71) / apply(S.scala:1693) / doWith(ThreadGlobal.scala:71) / net$liftweb$http$S$$_init(S.scala:1692) / init(S.scala:1274) / init(S.scala:47) / executeInScope(LiftSession.scala:1652) / apply(LiftSession.scala:1632) / apply(Vars.scala:554) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:553) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:552) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:551) / doWith(ThreadGlobal.scala:71) / apply(Vars.scala:550) / apply(Vars.scala:550) / apply(LiftSession.scala:1631) / apply$mcV$sp(LazyLoad.scala:155) / run(Schedule.scala:152) / runWorker(ThreadPoolExecutor.java:1145) / run(ThreadPoolExecutor.java:615) / run(Thread.java:745)')

I am not sure if this is connected to the use within Docker or a generic bug.


Related issues 1 (0 open1 closed)

Is duplicate of Rudder - Bug #7383: Improve Rule compliance details loadingReleasedFrançois ARMAND2015-11-06Actions
Actions #1

Updated by Janos Mattyasovszky about 9 years ago

  • Found in version(s) old 3.1.2 added
Actions #2

Updated by Vincent MEMBRÉ about 9 years ago

  • Category set to Web - Nodes & inventories
  • Assignee set to François ARMAND
  • Priority changed from N/A to 1 (highest)

Thanks Janos!

Is this still happening after first server inventory is treated ?

From what i see in the stacktrace, it happens when looking for agent versions, so if there is no inventory (possible at first start up) it throws an error

François, do you have any other idea ?

Actions #3

Updated by Janos Mattyasovszky about 9 years ago

It happens when I log in after the container started.

The issue might be that the server's current running hostname has changed, since it was built in a separate process, and that time the hostname was different, then this:

# docker ps
CONTAINER ID        IMAGE                                 COMMAND             CREATED             STATUS              PORTS                                    NAMES
fd31d29c6334        matya/rudder-server-root:3.1.latest   "/sbin/my_init"     3 minutes ago       Up 3 minutes        80/tcp, 5309/tcp, 0.0.0.0:443->443/tcp   determined_lovelace

-> This fd31.. does not match the one initially displayed on the WebGUI.

After entering the container by "docker exec" and forcing an "rudder agent inventory" and "rudder agent run", the hostname appears to match the current one, and also no inventory age of 1969-12-31 22:00...

Inventory date: 2015-10-07 11:01
Date inventory last received: 2015-10-07 11:02
Date first accepted in Rudder: 2015-10-06 11:51

I would probably require to force an automated inventory upload and agent run after init.d has passed rudder-jetty in the container.

Actions #4

Updated by Janos Mattyasovszky about 9 years ago

  • Description updated (diff)
Actions #5

Updated by François ARMAND almost 9 years ago

  • Description updated (diff)

The fact that it is an "LDAPSDKUsageException" tends to let us thing that it's our own fault. The cause of the exception is not clear at all. It seems to happen on that code, where we seem to do what is expected to not raise the problem (even comments!):

// Skip if there is no rudder-agent packages in software DN
if (! agentSoftDn.isEmpty) {
  //only get interesting entries control - that make a huge difference in perf
  sr.addControl(new MatchedValuesRequestControl(agentSoftDn.map(dn => MatchedValuesFilter.createEqualityFilter(A_SOFTWARE_DN, dn)).toSeq:_*))
  con.search(sr)
} else {
  Seq()
}
Actions #6

Updated by François ARMAND almost 9 years ago

  • Status changed from New to Rejected
  • Target version set to 3.1.9
  • Found in version(s) old 3.0.0, 3.0.1, 3.0.10, 3.0.11, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.1.0, 3.1.1, 3.1.3, 3.1.4 added

Ok, my bad. The test was added along with the correction of #7383 (https://github.com/Normation/rudder/pull/954/files), included in 3.1.5, so you should not have the problem anymore.

I marked it as resolved (rejected), but please let me know if it is not the case, I will investigate more.

Actions #7

Updated by François ARMAND almost 9 years ago

  • Is duplicate of Bug #7383: Improve Rule compliance details loading added
Actions #8

Updated by Benoît PECCATTE almost 8 years ago

  • Found in version (s) 3.1.4 added
Actions #9

Updated by Benoît PECCATTE almost 8 years ago

  • Found in version (s) 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.1.0, 3.0.8, 3.1.1, 3.0.9, 3.1.2, 3.0.10, 3.1.3, 3.0.11 added
Actions #10

Updated by Benoît PECCATTE almost 8 years ago

  • Found in version(s) old deleted (3.0.0, 3.0.1, 3.0.10, 3.0.11, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4)
Actions

Also available in: Atom PDF