Faced the problem of installing unifi 4.6

All installation actions were performed on a clean debian (just created)

~# lsb_release -d Description: Debian GNU/Linux 8.1 (jessie) ~# apt-cache show unifi Package: unifi Version: 4.6.6-5426 ~# java -version java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-1~deb8u1) OpenJDK Client VM (build 24.79-b02, mixed mode, sharing) ~# mongo -version MongoDB shell version: 2.4.14 

Keys and corresponding repositories have been added:

 ~# apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50 ~# apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 ~# echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' > /etc/apt/sources.list.d/100-ubnt.list ~# echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' > /etc/apt/sources.list.d/mongodb.list ~# apt-get update ~# apt-get install unifi 

I check the statuses of unifi and mongo services - both are running and active. I check open ports:

 ~# netstat -ntlpu tcp 0 0 127.0.0.1:27117 0.0.0.0:* LISTEN 4589/mongod tcp 0 0 0.0.0.0:28017 0.0.0.0:* LISTEN 2763/mongod tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 2763/mongod tcp6 0 0 :::8880 :::* LISTEN 4553/java tcp6 0 0 :::8080 :::* LISTEN 4553/java tcp6 0 0 :::8443 :::* LISTEN 4553/java tcp6 0 0 :::8843 :::* LISTEN 4553/java udp6 0 0 :::10001 :::* 4553/java udp6 0 0 XXX.XXX.XXX.XXX:56929 :::* 4553/java udp6 0 0 :::3478 :::* 4553/java 

In log unif

 INFO system - unknown exception com.ubnt.data.X$_o: null ^ at com.ubnt.data.X$_Oo.Ò00000(Unknown Source) at com.ubnt.data.X$_Oo.Ö00000(Unknown Source) at com.ubnt.data.X.parseJSON(Unknown Source) at com.ubnt.service.ooOO.C.o00000(Unknown Source) at com.ubnt.service.ooOO.C.Õ00000(Unknown Source) at com.ubnt.service.ooOO.C.ÒÓ0000(Unknown Source) at com.ubnt.service.ooOO.H$5.run(Unknown Source) at com.ubnt.ace.E$_Oo.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 

At the same time, http: // ip: 8443 does not open in the browser, but is constantly loaded (as if waiting for a response from the server)

 ~# telnet -4 localhost 8443 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 

Checked by curl (curl localhost: 8443) and launched strace - this is the conclusion

 clock_gettime(CLOCK_MONOTONIC, {4605, 231368060}) = 0 clock_gettime(CLOCK_MONOTONIC, {4605, 231529800}) = 0 rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fd234e5d8d0}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fd234e5d8d0}, NULL, 8) = 0 poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout) 

the curl is just hanging ... what's wrong with that unifi? Or a problem with java? There is a suspicion that there is not enough memory (the installation is done on DigitalOcean droplet - 512Mb). Added swap-section and swappiness settings (10%) - the situation has not changed ... I do not know where to dig any more.

    1 answer 1

    judging by the output of the netstat program, the java program for you only listens to ipv6 addresses.

    and you send an http request to your ipv4 address.

    you probably need to reconfigure your http server to listen on ipv4 addresses.