Project

General

Profile

Actions

Bug #11131

closed

Transitory error on LDAP at upgrade of Rudder 4.1 to 4.2 beta2 on debian8

Added by Nicolas CHARLES over 7 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Web - UI & UX
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

When upgrading Rudder, on Debian 8, I got an error when logging on the web interface for policy generation

⇨ Policy update error for process '6' at 2017-07-12 08:43:51
⇨ Cannot write configuration node
⇨ Can't get a new LDAP connection

Logs show that DSC ldap itemps where correctly created, but then I got

2017-07-12 08:43:48] DEBUG com.normation.rudder.services.policies.PromiseGenerationServiceImpl - Node's target configuration built in 1250 ms, start to update rule values.
[2017-07-12 08:43:48] DEBUG com.normation.rudder.services.policies.PromiseGenerationServiceImpl - RuleVals updated in 94 ms, start to detect changes in node configuration.
[2017-07-12 08:43:48] DEBUG com.normation.rudder.services.policies.PromiseGenerationServiceImpl - Checked node configuration updates leading to rules serial number updates and serial number updated in 26 ms
[2017-07-12 08:43:48] INFO  com.normation.rudder.services.policies.nodeconfig.NodeConfigurationServiceImpl - Configuration of following nodes were updated, their promises are going to be written: [root]
2017-07-12 08:43:48.647:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/rudder,file:/var/rudder/tmp/jetty/jetty-127.0.0.1-8080-rudder.war-_rudder-any-/webapp/},/opt/rudder/share/webapps/rudder.war
[2017-07-12 08:43:49] INFO  bootstrap.liftweb.Boot - classpath
[2017-07-12 08:43:49] INFO  application - Application Rudder started
2017-07-12 08:43:49.564:INFO:oejs.AbstractConnector:Started SelectChannelConnector@127.0.0.1:8080
[2017-07-12 08:43:51] DEBUG com.normation.rudder.services.policies.PromiseGenerationServiceImpl - Node configuration written on filesystem in 2657 ms
[2017-07-12 08:43:51] ERROR com.normation.ldap.sdk.RWPooledSimpleAuthConnectionProvider - Can't get a new LDAP connection
com.unboundid.ldap.sdk.LDAPException: An error occurred while attempting to connect to server localhost:389:  java.io.IOException: LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:389:  ConnectException(message='Connection refused (Connection refused)', trace='socketConnect(PlainSocketImpl.java:native) / doConnect(AbstractPlainSocketImpl.java:350) / connectToAddress(AbstractPlainSocketImpl.java:206) / connect(AbstractPlainSocketImpl.java:188) / connect(SocksSocketImpl.java:392) / connect(Socket.java:589) / run(ConnectThread.java:146)', revision=24201)')

Regenerating policies fixed the issue

Indeed, in the upgrade log, it shows

INFO: The migration has completed successfully.
INFO: End of migration script
INFO: Restarting Rudder webapp and inventory-endpoint... Done
Setting up rudder-inventory-ldap (4.2.0~beta2-jessie0) ...
INFO: Restarting syslogd... Done
INFO: Restarting rudder-slapd... Done
Setting up rudder-inventory-endpoint (4.2.0~beta2-jessie0) ...
INFO: Launching script to check if a migration is needed
INFO: End of migration script
Setting up rudder-reports (4.2.0~beta2-jessie0) ...
INFO: Waiting for PostgreSQL to be up... Done
Setting up rudder-server-root (4.2.0~beta2-jessie0) ...
Processing triggers for libc-bin (2.19-18) ...

We are restarting rudder webapp, then rudder-slapd

Actions #1

Updated by Benoît PECCATTE over 7 years ago

  • Category changed from Packaging to Web - UI & UX
  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 32

It is expected to have such errors if you try to connect during the upgrade.

We can make a better error message saying that you should try again if the database is down.

Actions #3

Updated by Nicolas CHARLES over 7 years ago

I did not logged in during upgrade.
I logged in after upgrade, and got the error..

If you check the message that I posted, it says that it restart rudder-webapp, then rudder-slapd.
This is bound to cause issues

Actions #4

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 4.2.0~beta3 to 4.2.0~rc1
Actions #5

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.2.0~rc1 to 4.2.0~rc2
Actions #6

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.2.0~rc2 to 4.2.0
Actions #7

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.2.0 to 4.2.1
Actions #8

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.2.1 to 4.2.2
  • Priority changed from 32 to 31
Actions #9

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.2.2 to 4.2.3
Actions #10

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 4.2.3 to 4.2.4
  • Priority changed from 31 to 30
Actions #11

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 4.2.4 to 4.2.5
  • Priority changed from 30 to 29
Actions #12

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.5 to 4.2.6
  • Priority changed from 29 to 28
Actions #13

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.6 to 4.2.7
Actions #14

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.2.7 to 414
  • Priority changed from 28 to 27
Actions #15

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 414 to 4.3.4
Actions #16

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 4.3.4 to 4.3.5
Actions #17

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.3.5 to 4.3.6
Actions #18

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.3.6 to 4.3.7
Actions #19

Updated by François ARMAND about 6 years ago

  • Status changed from New to Rejected
  • Priority changed from 27 to 0

I don't thing we can do better, and in all case we can't manage the scenario where LDAP is not collocated on the same server. As it is just transitionnary (and short), I'm closing that one.

Just inverting slapd/webapp restart may lead to other problems (like is ldap schema involved, the webapp may be lost).

If we find a better way, we will change it, but for now, I'm closing it.

Actions

Also available in: Atom PDF