After installing UniFi controller on a Ubuntu12 server (nostalgic) following these steps, it was unable to start for no explainable reason. The error I found in /var/log/unifi/server.log was:
<UniFi> ERROR system - [exec] error, rc=255, cmdline=[/usr/lib/jvm/java-8-oracle/jre/bin/java, -Dfile.encoding=UTF-8, -Djava.awt.headless=true, -Dapple.awt.UIElement=true, -Xmx1024M, -XX:ErrorFile=/usr/lib/unifi/logs/hs_err_pid%p.log, -jar, /usr/lib/unifi/lib/ace.jar, start]
Not really explaining…
But that seemed a normal command, just with parameters separated with comma. So by manually running:
/usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true -Xmx1024M -XX:ErrorFile=/usr/lib/unifi/logs/hs_err_pid%p.log -jar /usr/lib/unifi/lib/ace.jar start
I was able to get a meaningful error message: unable to bind port 8080. And was of course my fault, because another service was listening on that port.