Bug 35723 - Initial listener configuration failed on DC master during installation
Initial listener configuration failed on DC master during installation
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Notifier (univention-directory-notifier)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-3-errata
Assigned To: Stefan Gohmann
Arvid Requate
:
Depends on:
Blocks: 35724
  Show dependency treegraph
 
Reported: 2014-08-27 13:41 CEST by Stefan Gohmann
Modified: 2014-09-10 17:39 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2014-08-27 13:41:58 CEST
We saw some failed installations because the app center LDAP schema registration failed. The problem is that the DC master does not wait for the initialization of the listener modules, see 03univention-directory-listener. 

In this case the listener initialization is started in 15univention-directory-notifier but this join script does not wait for the final initialization.

One possible solution would be to start in 15univention-directory-notifier the initial listener installation. At least on a DC master.
Comment 1 Stefan Gohmann univentionstaff 2014-08-29 16:18:11 CEST
The notifier join script now waits for the first initialization of the listener on a DC master.

UCS 3.2-3: r53167
UCS 4.0-0: r53168
3.2-3 YAML: r53169
Comment 2 Arvid Requate univentionstaff 2014-09-08 18:34:49 CEST
Hmm, don't know, this looks strange in setup.log, what's your opinion?

=====================================================================
__MSG__:Einrichten von 15univention-directory-notifier-post
__STEP__:10
Configure /usr/lib/univention-install/15univention-directory-notifier-post.inst
Restarting univention-directory-notifier daemon: .
ok: run: univention-directory-notifier: (pid 5307) 1s, normally down
done.
Stopping univention-directory-listener daemon.
done.
08.09.14 18:29:30.419  DEBUG_INIT
08.09.14 18:29:30.432  LISTENER    ( ERROR   ) : Failed to search for "(objectClass=univentionBase)" on LDAP
 server ucs-5239.foobar.dev:7389 with message Invalid DN syntax
08.09.14 18:29:30.433  LISTENER    ( ERROR   ) : can not connect any server, exit
Starting univention-directory-listener daemon.
done.
=====================================================================
Comment 3 Stefan Gohmann univentionstaff 2014-09-08 21:57:46 CEST
(In reply to Arvid Requate from comment #2)
> Hmm, don't know, this looks strange in setup.log, what's your opinion?

Yes, that's not right. I think you changed it with r53433. With \"$ldap_base\" the " was given as part of the $ldap_base. However, I solved it in a different way now:
UCS 3.2-3: r53457 + r53458
UCS 4.0-0: r53459
YAML: r53460
Comment 4 Arvid Requate univentionstaff 2014-09-09 18:17:04 CEST
I fixed another typo in the join script, but it still fails:


Configure /usr/lib/univention-install/15univention-directory-notifier-post.inst
Restarting univention-directory-notifier daemon: .
ok: run: univention-directory-notifier: (pid 5318) 0s, normally down
done.
Stopping univention-directory-listener daemon.
done.
09.09.14 18:14:11.870  DEBUG_INIT
09.09.14 18:14:11.876  LISTENER    ( ERROR   ) : failed to connect to any notifier
09.09.14 18:14:11.876  LISTENER    ( ERROR   ) : can not connect any server, exit
Starting univention-directory-listener daemon.
Comment 5 Arvid Requate univentionstaff 2014-09-09 18:47:51 CEST
This looks like another timing issue. When I insert a "sleep 1" into the joinscript before the listener initialization then it works.


I tested this with with my VM arequate_bug35599 snapshot dev1. Basically that's a ucs-kt-image in the state system/setup/boot/start=true, which I logged into via ssh (to the default address of these VMs) and upgraded to the latest errata3.2-3 packages. The "dev1" snapshot was taken in this situation.
Comment 6 Arvid Requate univentionstaff 2014-09-09 20:15:35 CEST
Maybe do something like a port ping first?

i=0; while ((i++ < 5)) && ! nc -z localhost 6669; do sleep 1; done
if ((i==6)); then exit 1; fi
Comment 7 Stefan Gohmann univentionstaff 2014-09-09 20:55:25 CEST
(In reply to Arvid Requate from comment #6)
> Maybe do something like a port ping first?
> 
> i=0; while ((i++ < 5)) && ! nc -z localhost 6669; do sleep 1; done
> if ((i==6)); then exit 1; fi

Yes that was also my guess and the notifier needs some seconds:

root@ucsmaster:~# /etc/init.d/univention-directory-notifier start; nc -z localhost 6669; echo $?; sleep 3; nc -z localhost 6669; echo $?
Starting Univention Directory Notifier daemon.
ok: run: univention-directory-notifier: (pid 6317) 0s, normally down
done.
1
0
root@ucsmaster:~#


The script waits now up to 15 seconds but it does not abort.

UCS 3.2-3: r53501
UCS 4.0: r53502
YAML: r53503
Comment 8 Arvid Requate univentionstaff 2014-09-10 11:29:02 CEST
Ok, works, advisory is ok too.
Comment 9 Janek Walkenhorst univentionstaff 2014-09-10 17:39:01 CEST
http://errata.univention.de/ucs/3.2/195.html