Backup Domain Contoller can't join domain

When running univention-join on a new backup domain controller, the join process fails with:

**************************************************************************
* Join failed!                                                           *
* Contact your system administrator                                      *
**************************************************************************
* Message:  FAILED: 50univention-pkgdb.inst
**************************************************************************

The package is installed, however the join script fails, the /var/log/univention/join.log has this as the final entry:
Configure 50univention-pkgdb.inst Tue Mar 27 13:27:46 PDT 2018
2018-03-27 13:27:46.381745892-07:00 (in joinscript_init)
Traceback (most recent call last):
  File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
    univention.pkgdb.main()
  File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 576, in main
    connection = open_database_connection(config_registry, pkgdbu=True)
  File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 560, in open_database_connection
    connection = pgdb.connect(database=connectstring)
  File "/usr/lib/python2.7/dist-packages/pgdb.py", line 1615, in connect
    cnx = _connect(dbname, dbhost, dbport, dbopt, dbuser, dbpasswd)
pg.InternalError: FATAL:  database "pkgdb" does not exist

Tue Mar 27 13:27:46 PDT 2018: finish /usr/sbin/univention-join

Not sure what I am missing as the package univention-pkgdb is installed.

Installing SAMBA4 also seems to be having issues, fails during the univention-run-join-scripts with the following errors:

Running 92univention-management-console-web-server.inst    skipped (already executed)
Running 96univention-samba4.inst                           failed (exitcode: 1)
Running 97univention-s4-connector.inst                     skipped (already executed)
Running 98univention-pkgdb-tools.inst                      skipped (already executed)
Running 98univention-samba4-dns.inst                       failed (exitcode: 1)
Running 98univention-samba4-saml-kerberos.inst             skipped (already executed)

/var/log/univention/join.log has the following:

root@awsucsbdcsvrp1:/var/log/univention# tail -f join.log
Deleted CN=AWSUCSBDCSVRP1,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Conf                                                                                                                                                             iguration,DC=ucs,DC=bebconsultingservices,DC=com
Failed to join the domain ucs.bebconsultingservices.com.
EXITCODE=1
RUNNING 97univention-s4-connector.inst
EXITCODE=already_executed
RUNNING 98univention-pkgdb-tools.inst
EXITCODE=already_executed
RUNNING 98univention-samba4-dns.inst
2018-03-27 14:02:43.780174660-07:00 (in joinscript_init)
Waiting for RID Pool replication: ...................................................................................................................................................................................
Error no rIDSetReferences replicated for awsucsbdcsvrp1
EXITCODE=1
RUNNING 98univention-samba4-saml-kerberos.inst
EXITCODE=already_executed

Tue Mar 27 14:06:10 PDT 2018
univention-run-join-scripts finished

Ok fixed the Joining of the backup domain controller, still have issues with univention-pkgdb installing.

Hey,

can you please run the following commands and post their full output:

sh -x /var/lib/dpkg/info/univention-pkgdb.postinst configure
sh -x /usr/lib/univention-install/50univention-pkgdb.inst

Kind regards,
mosu

Here is the output:

root@awsucsbdcsvrp1:~# sh -x /var/lib/dpkg/info/univention-pkgdb.postinst configure
sh: 0: Can't open /var/lib/dpkg/info/univention-pkgdb.postinst

root@awsucsbdcsvrp1:~# sh -x /usr/lib/univention-install/50univention-pkgdb.inst
sh: 0: Can't open /usr/lib/univention-install/50univention-pkgdb.inst

Hey,

well, at the moment you don’t have that package installed; hence the original error you’ve posted in this thread won’t happen again as that join script isn’t installed anymore either. If you don’t need the package database (which is only an overview of which packages are installed on which UCS server; it doesn’t do anything else and is completely optional), then leave the situation as-is.

If you do need the package database, then re-install the package, and if the error occurs again, re-run the two scripts I’ve asked you to run.

Kind regards,
mosu

Thanks, now the question is the package database only need to be installed on a Master or does it need to be deployed everywhere to maintain accurate data/inventory, we have been installing it everywhere, but now what you mention above calls into question our decision to install it everywhere, when there is the possibility it only needs to be installed once…

Your thoughts? Suggestions?

Thanks.

Hey,

you only need the package database itself on a single server. On all the other servers you only need the package database tools. Those tools will know which server the database is installed on via special DNS entries that are created when you install the package database.

You should probably read the corresponding section in the documentation, too.

Kind regards,
mosu

I have read it a number of times, but the documentation does not make it clear if there is only one installation needed, or if it needs to be installed on every UCS node.

Section: 5.8. Central monitoring of software installation statuses with the software monitor, does not say either way if it needs to be installed once or everywhere. I will drop a note to Univention, mentioning that it should be made clearer that the Package Database itself only needs to be installed ONCE within the UCS Domain, and the tools else where.

Thanks for the assistance…we have some clean up now. :slight_smile:

Mastodon