I'm having some trouble with this myself. After successfully installing it before, I tried to log in to the Unifi manager this morning and got "connection refused". I was able to ping the IP, but
openssl s_client connect unifi.mydomain:8443
returned a "connection refused".
So, using
iocage console unifi
, I logged into the jail, and found that the unifi service wasn't running. I started it (
service unifi start
), and it showed that it was running for a few seconds, and then it stopped again. Well, easy enough, the point of this script is to be able to blow away the jail and reinstall it easily, so I destroyed the jail, downloaded the latest unifi-jail.sh and deploy.sh to the appropriate locations, and ran unifi-jail.sh again.
It ran as expected until the end, when it returned this:
Code:
* Starting unifi
+ Started OK
+ Configuring VNET OK
+ Starting services OK
Importing keystore /etc/dehydrated/certs/unifi.familybrown.org/signed.p12 to /usr/local/share/java/unifi/data/keystore...
keytool error: java.lang.Exception: Alias <-noprompt> does not exist
Usage:
service -e
service -R
service [-v] -l | -r
service [-v] <rc.d script> start|stop|etc.
service -h
-e Show services that are enabled
-R Stop and start enabled /usr/local/etc/rc.d services
-l List all scripts in /etc/rc.d and /usr/local/etc/rc.d
-r Show the results of boot time rcorder
-v Verbose
True
Thinking this looked like an issue with the cert deployment, I logged into the jail again and ran
dehydrated -c -x
to force reissue and re-deployment of the cert. Here was the output of that:
Code:
root@unifi:~ # dehydrated -c -x
# INFO: Using main config file /etc/dehydrated/config
Processing unifi.familybrown.org
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Apr 26 00:24:47 2018 GMT (Longer than 30 days). Ignoring because renew was forced!
+ Signing domains...
+ Generating private key...
+ Generating signing request...
+ Requesting challenge for unifi.familybrown.org...
+ CloudFlare hook executing: deploy_challenge
+ Settling down for 10s...
+ Responding to challenge for unifi.familybrown.org...
+ CloudFlare hook executing: clean_challenge
+ Challenge is valid!
+ Requesting certificate...
+ Checking certificate...
+ Done!
+ Creating fullchain.pem...
+ CloudFlare hook executing: deploy_cert
+ Done!
+ CloudFlare hook executing: exit_hook
It appears to complete successfully, but when I try to start the unifi service, it stops almost immediately. I can't see anything in the log files either--the
server.log hasn't been touched for two weeks:
Code:
root@unifi:/usr/local/share/java/unifi/logs # ll
total 12167
-rw------- 1 unifi nogroup 37878935 Mar 3 07:32 mongod.log
-rw------- 1 unifi wheel 7467144 Mar 3 07:32 server.log
-rw------- 1 unifi wheel 10485763 Feb 25 09:37 server.log.1
-rw------- 1 unifi wheel 10485852 Feb 17 01:39 server.log.2
-rw------- 1 unifi wheel 10485866 Feb 8 17:53 server.log.3
...and nothing at all comes up in
/var/log/messages (or anything else in
/var/log/) when I try to start the service. I'm stumped. Any ideas?