Fixing some very annoying bugs in jetty and chef-server-webui


Hi all,

If you’ve ever tried to install debian chef-server from apt, you’ll know there are 2 very annoying bugs which prevent it all automatically working.

The first is it relies on the “jetty” package, which is configured to NOT START in the debian package itself (the jetty package not the chef package). Ridiculous.

This is how you may go about fixing that in your knife bootstrap bash/sh file:

Fix poor .deb installation of jetty in preparation for chef-server dependency

apt-get -y -d install jetty # Download only (do not install)
dpkg --unpack /var/cache/apt/archives/jetty*.deb # Unpack only
perl -pi -e ‘s/NO_START=1/NO_START=0/’ /etc/default/jetty.dpkg-new # Fix jetty not starting
apt-get -y -f install # Do the rest of jetty startup

The second is that chef-server-webui is a broken install. There is an unresolved bug about this - see known issues on this page : >

However I’ve solved the reason why as follows:
strace -f /etc/init.d/chef-server-webui 2>&1 | less reveals that “Password must be a minimum of 6 characters” is written to file descriptor /dev/null (why there is no log for the reason why it didnt start up)

By setting the passwords accordingly in /etc/chef/webui.rb to be more than 6 characters rather than the default admin/webui, this fixed the problem of /etc/init.d/chef-server-webui not starting up and having to do a /usr/sbin/chef-server-webui start first.

This could easily be fixed in the deb by the chef moderators community otherwise I hope this helps anybody that is also frustrated by this