1

1and1 VPS ("dynamic cloud server") does not boot any more as soon as mysql lookup is enabled in nsswitch.conf - any suggestions appreciated.

Minimal setup to reproduce the problem:

  • install Ubuntu 12.04 / LTS minimal server image
  • install mysql-server, libnss-mysql-bg, nscd
  • configure /etc/libnss-mysql.cfg and /etc/libnss-mysql-root.cfg
  • set up appropriate database tables
  • configure nss lookups through mysql in nsswitch.conf

    passwd:         compat mysql
    group:          compat mysql 
    shadow:         compat mysql 
    

Now, when I try to reboot the server it just hangs. No logs (maybe due to /var not yet being mounted), and I can't see console output (since this is a VPS). Booting into recovery image and removing "mysql" from /etc/nsswitch.conf makes the system bootable again, so this is definitely related to nsswitch/libnss-mysql-bg.

There's a thread on gentoo-users which seems to describe a similar problem, unfortunately there's no real solution described, also the thread is rather old (from 2006) so I'm not sure whether this applies to me at all.

chrisv
  • 287
  • 2
  • 5
  • Can you explain little bit more about below configurations(real steps) install Ubuntu 12.04 / LTS minimal server image install mysql-server, libnss-mysql-bg, nscd configure /etc/libnss-mysql.cfg and /etc/libnss-mysql-root.cfg set up appropriate database tables configure nss lookups through mysql in nsswitch.conf regards, sg – Jai Jun 06 '14 at 07:40

1 Answers1

0

Although I cannot completely explain why, moving /usr to the same partition as / solves this problem. To me, it looks as if during startup, some daemon or process tries to look up some user or group, and fails because the MySQL client or libs under /usr are not (yet) there.

In theory, this should not cause trouble, since all system users/groups can be resolved through /etc/passwd and /etc/group, but in practise these lookups appears to break the boot process.

chrisv
  • 287
  • 2
  • 5