Closed pundip closed 2 years ago
I can confirm the problem.
I just started up my new network with pfsense and Unifi, and after installing the Controller onto the brand new pfsense, and starting the service, I see the same error. The error appears in the shell where I started the service.
The web service sie somehow running, but it shows an error only. I tried connecting on :8080 and on :8443. Both show the same error:
UniFi Controller is starting up... Connection error. Please check your controller process state.
I understand the service can take several minutes to start, however, I started the service over an hour ago, and the web interface still displays this error.
If I install a controller on my PC, it works fine on the PC.
Would be great if somebody could have a look at it!
I can confirm the problem.
I just started up my new network with pfsense and Unifi, and after installing the Controller onto the brand new pfsense, and starting the service, I see the same error. The error appears in the shell where I started the service.
The web service sie somehow running, but it shows an error only. I tried connecting on :8080 and on :8443. Both show the same error:
UniFi Controller is starting up... Connection error. Please check your controller process state.
I understand the service can take several minutes to start, however, I started the service over an hour ago, and the web interface still displays this error.
If I install a controller on my PC, it works fine on the PC.
Would be great if somebody could have a look at it!
Same here
Unable to start the unify controller after install. service unifi.sh start results in Port 8080 not available. I was able to delete the unifi directory and re run the script which started the controller but after the server rebooted the issue returned.
The issue presists on a virgin install of pf sense.
Same here. Have you the 5.6.40 install script? It was really solid. Thanks in advance
what does pfsense show is using that port?
ps aux | grep "8080"
Or even better:
pkg install lsof
Then run:
lsof -i
Diagnostics > Sockets will show this information too.
After a reinstallation I can reach it to 8443 port, but it hangs on "UniFi Controller is starting up... Please wait a moment"
Have you tried it with the latest build of the unifi controller? The script should grab the latest. I noticed in another thread you were installing an older build. Plus what process is using 8080?
I tried latest build. It is stucked on "starting up". 8080 port is used by java. I should install a previous build. If you want i can give you direct access to verify it.
Thanks in advance for your support
And this is a default vanilla install of pfSense 2.4.4? Any other packages added? Strange. I'm pulling from the latest script and everything is a go. How much RAM is in that pfSense box?
I will do a clean install again. I tried to update to 2.4.5 development builds but with no luck (pfsense works great). My box has 2Gb installed. Used is around 30% .
And this is a default vanilla install of pfSense 2.4.4? Any other packages added? Strange. I'm pulling from the latest script and everything is a go. How much RAM is in that pfSense box?
It is a fresh install, with acme and freeradius3 as packages. As newbie to pfsense, I did not install anything else yet - with the exception of the Controller, which was one of the first things I tried to get to work.
PC Engines APU2 2.4.4-RELEASE (amd64) built on Thu Sep 20 09:03:12 EDT 2018 Memory usage | 19% of 4033 MiB
what does pfsense show is using that port?
ps aux | grep "8080"
I replace my hostname by "xxx".
[2.4.4-RELEASE][root@xxx]/root: ps aux | grep "8080"
root 66356 0.0 0.1 6564 2460 1 S+ 13:28 0:00.00 grep 8080
[2.4.4-RELEASE][xxx]/root:
Or even better:
pkg install lsof
Then run:
lsof -i
[2.4.4-RELEASE][root@xxx]/root: lsof -i
lsof: WARNING: compiled for FreeBSD release 11.2-RELEASE-p2; this is 11.2-RELEASE-p3.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php-fpm 317 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 317 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 317 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
syslogd 5404 root 7u IPv6 0xfffff80007e2cf60 0t0 UDP *:syslog
syslogd 5404 root 8u IPv4 0xfffff800241d20a0 0t0 UDP *:syslog
php-fpm 11976 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 11976 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 11976 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
php-fpm 26119 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 26119 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 26119 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
php-fpm 28486 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 28486 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 28486 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
radiusd 30228 root 14u IPv4 0xfffff80024222840 0t0 UDP localhost:18127
radiusd 30228 root 15u IPv4 0xfffff800241d2480 0t0 UDP localhost:18128
php-fpm 31259 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 31259 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 31259 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
nginx 31446 root 5u IPv4 0xfffff8005b1db820 0t0 TCP *:https (LISTEN)
nginx 31446 root 6u IPv6 0xfffff8005b2b9820 0t0 TCP *:https (LISTEN)
nginx 31446 root 7u IPv4 0xfffff8005b2ba410 0t0 TCP *:http (LISTEN)
nginx 31446 root 8u IPv6 0xfffff8005b2ba000 0t0 TCP *:http (LISTEN)
nginx 31729 root 5u IPv4 0xfffff8005b1db820 0t0 TCP *:https (LISTEN)
nginx 31729 root 6u IPv6 0xfffff8005b2b9820 0t0 TCP *:https (LISTEN)
nginx 31729 root 7u IPv4 0xfffff8005b2ba410 0t0 TCP *:http (LISTEN)
nginx 31729 root 8u IPv6 0xfffff8005b2ba000 0t0 TCP *:http (LISTEN)
nginx 31729 root 11u IPv4 0xfffff8005b2b8820 0t0 TCP xxx:https->192.168.3.35:60991 (ESTABLISHED)
nginx 31734 root 5u IPv4 0xfffff8005b1db820 0t0 TCP *:https (LISTEN)
nginx 31734 root 6u IPv6 0xfffff8005b2b9820 0t0 TCP *:https (LISTEN)
nginx 31734 root 7u IPv4 0xfffff8005b2ba410 0t0 TCP *:http (LISTEN)
nginx 31734 root 8u IPv6 0xfffff8005b2ba000 0t0 TCP *:http (LISTEN)
java 34611 root 108u IPv6 0xfffff80024086000 0t0 TCP *:8080 (LISTEN)
java 34611 root 112u IPv6 0xfffff8005b276820 0t0 TCP *:8880 (LISTEN)
java 34611 root 125u IPv6 0xfffff8005bf60820 0t0 TCP *:8443 (LISTEN)
java 34611 root 126u IPv6 0xfffff8009bfcc410 0t0 TCP localhost:43768->localhost:27117 (SYN_SENT)
java 34611 root 136u IPv6 0xfffff800cf14d410 0t0 TCP localhost:43770->localhost:27117 (SYN_SENT)
java 34611 root 137u IPv6 0xfffff8005b33d000 0t0 TCP *:8843 (LISTEN)
java 34611 root 155u IPv6 0xfffff8005b6b5000 0t0 TCP localhost:43766->localhost:27117 (SYN_SENT)
java 34611 root 157u IPv6 0xfffff8005b1db410 0t0 TCP localhost:43767->localhost:27117 (SYN_SENT)
java 34611 root 158u IPv6 0xfffff8005bf7e820 0t0 TCP localhost:43769->localhost:27117 (SYN_SENT)
java 34611 root 161u IPv6 0xfffff800cf14e410 0t0 TCP xxx:8080->[::192.168.3.35]:61542 (ESTABLISHED)
php-fpm 45303 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 45303 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 45303 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
dhcp6c 51710 root 4u IPv6 0xfffff8005b493910 0t0 ICMPV6 *:*
dhcp6c 51710 root 6u IPv6 0xfffff8005b493740 0t0 HOPOPTS *:*
dhcp6c 51710 root 7u IPv6 0xfffff80007e2dda0 0t0 UDP *:dhcpv6-client
ntpd 52929 root 20u IPv6 0xfffff800241d20c0 0t0 UDP *:ntp
ntpd 52929 root 21u IPv4 0xfffff80007e6a0a0 0t0 UDP *:ntp
ntpd 52929 root 22u IPv6 0xfffff80007e6a060 0t0 UDP [xxx]:ntp
ntpd 52929 root 23u IPv4 0xfffff800241d2220 0t0 UDP 192.168.3.4:ntp
ntpd 52929 root 24u IPv4 0xfffff800cf6bff80 0t0 UDP xxx:ntp
ntpd 52929 root 25u IPv6 0xfffff80007e6a000 0t0 UDP [fe80:2::1:1]:ntp
ntpd 52929 root 27u IPv6 0xfffff80007e69f60 0t0 UDP [fe80:3::1:1]:ntp
ntpd 52929 root 28u IPv6 0xfffff80007e69f40 0t0 UDP localhost:ntp
ntpd 52929 root 29u IPv6 0xfffff80007e69f20 0t0 UDP [fe80:5::1]:ntp
ntpd 52929 root 30u IPv4 0xfffff80007e69f00 0t0 UDP localhost:ntp
ntpd 52929 root 32u IPv6 0xfffff80007e2c3c0 0t0 UDP [xxx]:ntp
ntpd 52929 root 33u IPv4 0xfffff80007e2ce00 0t0 UDP 192.168.210.1:ntp
ntpd 52929 root 34u IPv6 0xfffff800cf6bf920 0t0 UDP [fe80:8::1:1]:ntp
ntpd 52929 root 35u IPv4 0xfffff80007e2c1a0 0t0 UDP 192.168.220.1:ntp
ntpd 52929 root 36u IPv6 0xfffff80007e69600 0t0 UDP [fe80:9::1:1]:ntp
ntpd 52929 root 37u IPv4 0xfffff800cf6bfd20 0t0 UDP 192.168.99.1:ntp
ntpd 52929 root 38u IPv6 0xfffff800241d1340 0t0 UDP [2a02:810d:fc0:1d38:20d:b9ff:fe4d:11cc]:ntp
php-fpm 55609 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 55609 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 55609 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
sshd 56408 root 3u IPv6 0xfffff8005b277820 0t0 TCP *:ssh (LISTEN)
sshd 56408 root 4u IPv4 0xfffff8005b1d9410 0t0 TCP *:ssh (LISTEN)
dpinger 58706 root 3u IPv4 0xfffff8005b494ae0 0t0 ICMP 192.168.3.4:*
dpinger 58706 root 4u IPv4 0xfffff80007e73570 0t0 ICMP 192.168.3.4:*
dpinger 59341 root 3u IPv6 0xfffff80007e73910 0t0 ICMPV6 [xxx]:*
dpinger 59341 root 4u IPv6 0xfffff8005b4951d0 0t0 ICMPV6 [xxx]:*
sshd 80996 root 3u IPv4 0xfffff800cf27b410 0t0 TCP xxx:ssh->192.168.3.35:60948 (ESTABLISHED)
php-fpm 84072 root 4u IPv4 0xfffff80007e2d020 0t0 UDP *:*
php-fpm 84072 root 5u IPv6 0xfffff80007e2d040 0t0 UDP *:*
php-fpm 84072 root 6u IPv4 0xfffff80007e3b740 0t0 RAW *:*
unbound 87900 unbound 3u IPv6 0xfffff800cf6bf020 0t0 UDP *:domain
unbound 87900 unbound 4u IPv6 0xfffff800cf14c820 0t0 TCP *:domain (LISTEN)
unbound 87900 unbound 5u IPv4 0xfffff800cf6bf2a0 0t0 UDP *:domain
unbound 87900 unbound 6u IPv4 0xfffff80024086820 0t0 TCP *:domain (LISTEN)
unbound 87900 unbound 7u IPv4 0xfffff8005b276410 0t0 TCP localhost:rndc (LISTEN)
openvpn 92389 root 6u IPv4 0xfffff8002422fb40 0t0 UDP 192.168.3.4:openvpn
dhcpd 93179 dhcpd 4u IPv4 0xfffff8005b493cb0 0t0 ICMP *:*
dhcpd 93179 dhcpd 9u IPv4 0xfffff800241d1840 0t0 UDP *:bootps
radvd 93422 root 4u IPv6 0xfffff8005b493570 0t0 ICMPV6 *:*
[2.4.4-RELEASE][root@xxx]/root:
Then I did:
[2.4.4-RELEASE][root@xxx]/root: ps -ef | grep 34611
34611 0- I 66:45.05 JAVA_HOME=/usr/local/openjdk8 PATH=/sbin:/bin:/usr/sbin:/usr/bin PWD=/ HOME=/ RC_PID=34060 /usr/local/openjdk8/bin/java -jar /usr/local/UniFi/li
[2.4.4-RELEASE][root@xxx]/root:
Diagnostics > Sockets will show this information too.
It shows something similar, but here you can see that I have IPv4 and IPv6 as well (having Internet from a German cable TV provider who is using IPv6 by default, and after some whining they gave me additionally IPv4, as having IPv4 only is really a mess if you want to reach your home by VPN). Just want to mention that, in case this "double 8080 entry" (IPv4 and IPv6) causes the problem. I show you the output of the diagnostics page:
IPv4 System Socket Information
dhcpd dhcpd 93179 9 udp4 *:67 *:*
unbound unbound 87900 5 udp4 *:53 *:*
unbound unbound 87900 6 tcp4 *:53 *:*
unbound unbound 87900 7 tcp4 127.0.0.1:953 *:*
root radiusd 30228 14 udp4 127.0.0.1:18127 *:*
root radiusd 30228 15 udp4 127.0.0.1:18128 *:*
root openvpn 92389 6 udp4 192.168.3.4:1194 *:*
root php-fpm 84072 4 udp4 *:* *:*
root php-fpm 31259 4 udp4 *:* *:*
root php-fpm 55609 4 udp4 *:* *:*
root php-fpm 11976 4 udp4 *:* *:*
root php-fpm 28486 4 udp4 *:* *:*
root php-fpm 45303 4 udp4 *:* *:*
root php-fpm 26119 4 udp4 *:* *:*
root java 34611 108 tcp46 *:8080 *:*
root java 34611 112 tcp46 *:8880 *:*
root java 34611 125 tcp46 *:8443 *:*
root java 34611 137 tcp46 *:8843 *:*
root sshd 56408 4 tcp4 *:22 *:*
root nginx 31734 5 tcp4 *:443 *:*
root nginx 31734 7 tcp4 *:80 *:*
root nginx 31729 5 tcp4 *:443 *:*
root nginx 31729 7 tcp4 *:80 *:*
root nginx 31446 5 tcp4 *:443 *:*
root nginx 31446 7 tcp4 *:80 *:*
root syslogd 5404 8 udp4 *:514 *:*
root ntpd 52929 21 udp4 *:123 *:*
root ntpd 52929 23 udp4 192.168.3.4:123 *:*
root ntpd 52929 24 udp4 192.168.33.1:123 *:*
root ntpd 52929 30 udp4 127.0.0.1:123 *:*
root ntpd 52929 33 udp4 192.168.210.1:123 *:*
root ntpd 52929 35 udp4 192.168.220.1:123 *:*
root ntpd 52929 37 udp4 192.168.99.1:123 *:*
root php-fpm 317 4 udp4 *:* *:*
IPv6 System Socket Information
unbound unbound 87900 3 udp6 *:53 *:*
unbound unbound 87900 4 tcp6 *:53 *:*
root dhcp6c 51710 7 udp6 *:546 *:*
root php-fpm 84072 5 udp6 *:* *:*
root php-fpm 31259 5 udp6 *:* *:*
root php-fpm 55609 5 udp6 *:* *:*
root php-fpm 11976 5 udp6 *:* *:*
root php-fpm 28486 5 udp6 *:* *:*
root php-fpm 45303 5 udp6 *:* *:*
root php-fpm 26119 5 udp6 *:* *:*
root java 34611 108 tcp46 *:8080 *:*
root java 34611 112 tcp46 *:8880 *:*
root java 34611 125 tcp46 *:8443 *:*
root java 34611 137 tcp46 *:8843 *:*
root sshd 56408 3 tcp6 *:22 *:*
root nginx 31734 6 tcp6 *:443 *:*
root nginx 31734 8 tcp6 *:80 *:*
root nginx 31729 6 tcp6 *:443 *:*
root nginx 31729 8 tcp6 *:80 *:*
root nginx 31446 6 tcp6 *:443 *:*
root nginx 31446 8 tcp6 *:80 *:*
root syslogd 5404 7 udp6 *:514 *:*
root ntpd 52929 20 udp6 *:123 *:*
root ntpd 52929 22 udp6 xxx%igb0:123 *:*
root ntpd 52929 25 udp6 xxx%igb1:123 *:*
root ntpd 52929 27 udp6 xxx%igb2:123 *:*
root ntpd 52929 28 udp6 ::1:123 *:*
root ntpd 52929 29 udp6 fe80::1%lo0:123 *:*
root ntpd 52929 32 udp6 xxx%ovpns1:123 *:*
root ntpd 52929 34 udp6 fe80::1:1%igb1.210:123 *:*
root ntpd 52929 36 udp6 fe80::1:1%igb1.220:123 *:*
root ntpd 52929 38 udp6 xxx:123 *:*
root php-fpm 317 5 udp6 *:* *:*
Have you tried it with the latest build of the unifi controller? The script should grab the latest. I noticed in another thread you were installing an older build. Plus what process is using 8080?
I was using the version with the shortcut. I did not save the output of the install script.
I now used the following line to try again:
fetch -o - https://raw.githubusercontent.com/gozoinks/unifi-pfsense/master/install-unifi/install-unifi.sh | sh -s
I saw some problem with mongodb, but when the script was finished, my 2000 line buffer was not enough and the mongodb line was gone.
I started the above line again. This time, there were java exceptions that aborted the script. Looked like maybe the service was not yet fully up, when the re-start tried to kill the process. So I waited a bit, checked if there are processes left, and started the script another time.
The 3rd try, there was no problem with mongodb, and there was no java exception. The script finished and after starting the service, the "Port 8080 not available" re-appeard.
Even though I received that error again, I checked the web interface, and this time the Unifi user interface came up. I will now try to connect my devices. Maybe my problem is solved by running the script without the shortcut 3 more times...
Edit one hour later: the two devices were connected with a Laptop, because I wanted to be able to configure them.
I now sshed them and used command "set-inform http://192.168.33.1:8080/inform". The IP is the IP of my pfsense (LAN). There was no error, it seemed to work.
They appeared in gray on the interface (saying anderweitig verwalted" with means something like "otherwise managed"). I tried to connect them, and after trying some options (which port, which of the two passwords to enter), I was able to connect one of them. The other one does not like me - maybe I had to many false tries...? At least, it seems to work in general... I have not tried yet if it still works after a reboot.
Edit later: it turned out that the switch port that gave power to my WLAN access point became powerless through that change. After reconfiguring everything, I was able to connect the 2nd device.
I did not yet try if this survives a reboot. I hope so... If it does not, I will write again...
^^Same as this. I've installed it on a couple devices successfully by running the install script provided on the main page, and then stopping the unifi.sh service, running "rm -R /usr/local/UniFi" and then reinstalling.
I have to do this 2 or 3 times to get it to install UniFi where it works properly, but that's the jist.
Unfortunately my "solution" did not survive power cycle. Web interface shows the error again, and starting the process shows the error message about port 8080.
However, I found something new in the logs:
Nov 13 20:44:14 | kernel | | pid 57480 (mongod), uid 0: exited on signal 6 (core dumped)
Nov 13 20:44:20 | kernel | | pid 85520 (mongod), uid 0: exited on signal 6 (core dumped)
Nov 13 20:44:26 | kernel | | pid 13066 (mongod), uid 0: exited on signal 6 (core dumped)
Nov 13 20:44:31 | kernel | | pid 13447 (mongod), uid 0: exited on signal 6 (core dumped)
Nov 13 20:44:37 | kernel | | pid 13767 (mongod), uid 0: exited on signal 6 (core dumped)
There are tons of more such entries...
Does anybody have an idea how to solve this...?
Remember, 2 days ago I already mentioned a problem with mongod. I would assume that this is the reason for the problem.
I am playing around again, trying to get it to work again. When I was running the Unifi install script again, I found the following error, next to mongodb. Can this explain my problems? How can I fix it?
Fetching mongodb34-3.4.16.txz: 100% 4 MiB 121.9kB/s 00:34
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/mongodb34-3.4.16.txz: Operation timed out
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/renderproto-.txz: Not Found
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/recordproto-.txz: Not Found
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/fixesproto-.txz: Not Found
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/xextproto-.txz: Not Found
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/inputproto-.txz: Not Found
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/xproto-.txz: Not Found
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/kbproto-.txz: Not Found
Fetching snappy-1.1.6.txz: 100% 61 KiB 62.0kB/s 00:01
Kind regards,
Angela
I can confirm the same issue.. anyone have a solution?
My best guess from experience running this recently and what others have posted is that some of the pkg repos are a little slow/glitchy (see the timeout in realnessy's posted error) and the install script may need a longer wait threshold.
I've installed it on a couple devices successfully by running the install script provided on the main page, and then stopping the unifi.sh service, running "rm -R /usr/local/UniFi" and then reinstalling. May need to do multiple times to get a good result, I think that has to do with timeouts during installation of dependencies.
So far so good on having the controller survive a reboot, but your mileage may vary.
Ran into "not running after reboot" on a new installation yesterday. Try manually starting the controller with the "service unifi.sh start" command from the shell, fixed it for me. Might be something with the rc.d script that needs to be looked it at, I'll see if I can recreate it in a lab and post any findings.
OK, some observations:
Ran into this again upgrading an existing box to the latest controller. Firstly got this:
pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/renderproto-.txz: Not Found pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/recordproto-.txz: Not Found pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/fixesproto-.txz: Not Found pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/xextproto-.txz: Not Found pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/inputproto-.txz: Not Found pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/xproto-.txz: Not Found pkg: https://pkg.freebsd.org/FreeBSD:11:amd64/latest/All/kbproto-.txz: Not Found
So I went to the mirror, and sure enough those files aren't there.
So then I checked the Fresh Ports page: https://www.freshports.org/x11/renderproto
And found this:
No installation instructions: this port has been deleted.
Switch to xorgproto instead of individual packages
Upstream used to distribute protocol headers as separate packages, but has decided to merge those to a common package, named xorgproto. This update tracks that change.
PR: 230023 Submitted by: zeising Approved by: portmgr (antoine) exp-run by: antoine
So they've been deprecated and the installer script already installs xorgproto, a little further down in the script if you look at it. Non-issue.
Tried and tried on this box which was running 2.4.3-RELEASE based on FreeBSD 11.0 to fix with UniFi dir delete and reinstall...no luck.
Upgraded pfSense to 2.4.4-RELEASE based on FreeBSD 11.2, stopped the unifi.sh service, did "rm -r /usr/local/UniFi", re-ran the installer. It works again! :)
Just passing that along, something in the dependencies when using FreeBSD 11.0 from what I can tell. Upgrade to 11.2 fixed it.
Those of you getting the Port 8080 issue, and are deleting everything and reinstalling to get the app to work. Next time you have an issue please check the Mongo log located at /usr/local/UniFi/logs/mongo.log I almost bet it will look like this
2019-04-25T21:38:57.403+0600 I CONTROL [main] ***** SERVER RESTARTED *****
2019-04-25T21:38:57.414+0600 I CONTROL [initandlisten] MongoDB starting : pid=81733 port=27117 dbpath=/usr/local/UniFi/data/db 64-bit host=CTIPF1.computerteam.com
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] db version v3.4.20
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] git version: 447847d93d6e0a21b018d5df45528e815c7c13d8
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2o-freebsd 27 Mar 2018
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] allocator: system
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] modules: none
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] build environment:
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] distarch: x86_64
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] target_arch: x86_64
2019-04-25T21:38:57.415+0600 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1", port: 27117, unixDomainSocket: { pathPrefix: "/usr/local/UniFi/run" } }, storage: { dbPath: "/usr/local/UniFi/data/db" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/UniFi/logs/mongod.log" } }
2019-04-25T21:38:57.415+0600 I - [initandlisten] Detected data files in /usr/local/UniFi/data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-04-25T21:38:57.415+0600 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3276M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),
2019-04-25T21:38:57.419+0600 E STORAGE [initandlisten] WiredTiger error (0) [1556206737:419171][81733:0x808c16000], file:WiredTiger.wt, connection: WiredTiger.turtle: encountered an illegal file format or internal value
2019-04-25T21:38:57.419+0600 E STORAGE [initandlisten] WiredTiger error (-31804) [1556206737:419317][81733:0x808c16000], file:WiredTiger.wt, connection: the process must exit and restart: WT_PANIC: WiredTiger library panic
2019-04-25T21:38:57.419+0600 I - [initandlisten] Fatal Assertion 28558 at src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp 365
2019-04-25T21:38:57.419+0600 I - [initandlisten]
***aborting after fassert() failure
2019-04-25T21:38:57.420+0600 F - [initandlisten] Got signal: 6 (Abort trap).
This appears to be some form of corrupted Unifi database. Unknown cause but it will cause both, the Mongo error logs issue reported, the Port 8080 issue reported, and the Unifi controller is starting issue.
Not sure if this is useful for anyone having the 8080 in use issue but I got the same error right after installing darkstat which also looks like it uses MongoDB. Removing both and reinstalling unifi again from the script put it right.
I also see this error if updating or installing any other pfsense package, mongodb incorrectly gets removed by the pkg command.
Same as https://github.com/gozoinks/unifi-pfsense/issues/128
Note: Make sure 8443/8080 aren't already in use by other services like pfBlockerNG which defaults to 8081/8443. I ended up changing pfBlockerNG's 8443 to 8444.
If you need to get up and running quickly (at least this worked for me without having to reinstall)
Install lsof (if you haven't done so already)
pkg install lsof
Find the PID holding up 8080/8443 and kill the PID
kill -9 $(lsof -i | grep -E "8443|8080" | awk '{print $2}' | sort -u | tr "\n" " ")
Startup UniFi
service unifi.sh start
Watch the logs (optional; Ctrl+C to break out)
tail -f /usr/local/UniFi/logs/mongod.log
Try to log back into the UniFi Web Ui
That’s a great one liner that should work as long as the problem is not FreeBSD package manager pkg forcefully removing mongodb.
no more updates, closing
Unable to start the unify controller after install.
service unifi.sh start results in Port 8080 not available. I was able to delete the unifi directory and re run the script which started the controller but after the server rebooted the issue returned.
The issue presists on a virgin install of pf sense.