Reply
New Member
Posts: 7
Registered: ‎07-20-2018
Kudos: 1

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

I got a new Raspberry 3+ with a new microsd card and installed this 5.10.12 Stable and the updated Java.

 

I found this note from the release notes of 5.10.12:

 

"Cloud Access feature in this release is not supported on Linux/ARMv6 architecture (e.g. Raspberry Pi 1). "

 

I tried to set this new controller version to be accessible through my cloud account, and it did not work. It just said my login credentials are wrong, yet I know they work.

 

Is it really so that cloud access is not supported any more in this new version? That sucks.

 

 

New Member
Posts: 31
Registered: ‎05-02-2014
Kudos: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl


@Dudemax wrote:

5.10.12 Stable has been released.

https://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-Network-Controller-5-10-12-Stable-has-been-re...

 

Followed this guide to update Java

https://ribasco.wordpress.com/2018/02/11/how-to-install-the-latest-java-version-in-raspbian-stretch/

 

used update script and it's up and running but notice a few I/O exception on startup:

pi@raspberrypi:~ $ sudo service unifi status
● unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-02-07 08:00:35 GMT; 4min 32s ago
 Main PID: 2643 (jsvc)
      CPU: 49.750s
   CGroup: /system.slice/unifi.service
           ├─2643 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java
           ├─2645 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java
           ├─2646 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java
           ├─2679 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=
           └─2918 bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --unixSocketPrefix /usr/li

Feb 07 07:59:47 raspberrypi systemd[1]: Starting unifi...
Feb 07 07:59:55 raspberrypi unifi[2645]: Feb 07, 2019 7:59:55 AM org.apache.commons.httpclient.HttpM
                                         INFO: I/O exception (java.net.ConnectException) caught when
Feb 07 07:59:55 raspberrypi unifi[2645]: Feb 07, 2019 7:59:55 AM org.apache.commons.httpclient.HttpM
                                         INFO: Retrying request
Feb 07 07:59:55 raspberrypi unifi[2645]: Feb 07, 2019 7:59:55 AM org.apache.commons.httpclient.HttpM
                                         INFO: I/O exception (java.net.ConnectException) caught when
Feb 07 07:59:55 raspberrypi unifi[2645]: Feb 07, 2019 7:59:55 AM org.apache.commons.httpclient.HttpM
                                         INFO: Retrying request
Feb 07 07:59:55 raspberrypi unifi[2645]: Feb 07, 2019 7:59:55 AM org.apache.commons.httpclient.HttpM
                                         INFO: I/O exception (java.net.ConnectException) caught when
Feb 07 07:59:55 raspberrypi unifi[2645]: Feb 07, 2019 7:59:55 AM org.apache.commons.httpclient.HttpM
                                         INFO: Retrying request
Feb 07 08:00:35 raspberrypi unifi.init[2554]: Starting Ubiquiti UniFi Controller: unifi.
Feb 07 08:00:35 raspberrypi systemd[1]: Started unifi.

 

 


I'm facing the same problem here....

 

pi@RasControl:~ $ sudo service unifi status
● unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled)
   Active: active (running) since Thu 2019-02-07 21:28:30 UTC; 1min 13s ago
  Process: 705 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)
 Main PID: 758 (jsvc)
   CGroup: /system.slice/unifi.service
           ├─758 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unif...
           ├─759 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unif...
           └─760 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unif...

Feb 07 21:27:32 RasControl unifi[759]: Feb 07, 2019 9:27:32 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                       INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Feb 07 21:27:32 RasControl unifi[759]: Feb 07, 2019 9:27:32 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                       INFO: Retrying request
Feb 07 21:27:32 RasControl unifi[759]: Feb 07, 2019 9:27:32 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                       INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Feb 07 21:27:32 RasControl unifi[759]: Feb 07, 2019 9:27:32 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                       INFO: Retrying request
Feb 07 21:27:32 RasControl unifi[759]: Feb 07, 2019 9:27:32 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                       INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Feb 07 21:27:32 RasControl unifi[759]: Feb 07, 2019 9:27:32 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                       INFO: Retrying request
Feb 07 21:28:30 RasControl unifi.init[705]: Starting Ubiquiti UniFi Controller: unifi failed!
Feb 07 21:28:30 RasControl systemd[1]: Started unifi.

Updated the java using the instructions found above:

 

pi@RasControl:~ $ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)
pi@RasControl:~ $ update-java-alternatives -l
java-1.7.0-openjdk-armhf 1063 /usr/lib/jvm/java-1.7.0-openjdk-armhf
java-8-oracle 1081 /usr/lib/jvm/java-8-oracle
jdk-8-oracle-arm32-vfp-hflt 318 /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt
Emerging Member
Posts: 45
Registered: ‎05-22-2016
Kudos: 62

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

I'll try it out myself tomorrow or on Saturday when I find the time to see what can be done.
I'll update the opening post with working commands (and without a link to an external guide).

Emerging Member
Posts: 45
Registered: ‎05-22-2016
Kudos: 62

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

@SmokingCrop wrote:

I'll try it out myself tomorrow or on Saturday when I find the time to see what can be done.
I'll update the opening post with working commands (and without a link to an external guide).


I have updated the script, as well as the opening post with the commands to install 5.10.12.


I'll also try and see what exactly has to be done to upgrade from 5.9 with the old java version.
It'll probably come down to shutting off unifi, removing java, installing the new java, starting unifi again and upgrading it.

Or changing the java_path / default version to the latest version of java.

Emerging Member
Posts: 45
Registered: ‎05-22-2016
Kudos: 62

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

Updating your UniFi 5.9.29 controller to UniFi 5.10.12 if you used my tutorial before is as simple as executing the entire code below, make sure you have the entire thing.
This will update your java to the latest version available which is required for 5.10.X versions of the controller. So do not execute this code to upgrade your 5.10.X controller to an even newer version.

 

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean;sudo systemctl stop unifi;sudo apt-get install dirmngr -y;sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886;echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | sudo tee --append /etc/apt/sources.list;echo 'deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | sudo tee --append /etc/apt/sources.list;sudo apt-get update;sudo apt-get install oracle-java8-installer -y;wget https://dl.ubnt.com/unifi/5.10.12/unifi_sysvinit_all.deb;sudo dpkg -i unifi_sysvinit_all.deb; sudo apt-get install -f -y

I've used it to update my own controller and it worked flawlessly.

If you are still having issues, I would suggest to start over & install with the script in the opening post, and use your backup of your UniFi controller to restore everything.

New Member
Posts: 7
Registered: ‎05-16-2018

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

Didn't work for me. Still getting connection refused errors from java

unifi.service - unifi

   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)

   Active: active (running) since Sat 2019-02-09 10:24:14 GMT; 30s ago

 Main PID: 5083 (jsvc)

   CGroup: /system.slice/unifi.service

           ├─5083 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/r

           ├─5084 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/r

           ├─5085 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/r

           ├─5115 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true -Xmx1024M -XX:+ExitOnOutOfMemo

           └─5215 bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --unixSocketPrefix /usr/lib/unifi/run --logappend --logpath /usr/lib/unifi/logs/mongod.l

 

Feb 09 10:23:54 raspberrypi systemd[1]: Starting unifi...

Feb 09 10:24:01 raspberrypi unifi[5084]: Feb 09, 2019 10:24:01 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

                                         INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused (Connection refused)

Feb 09 10:24:01 raspberrypi unifi[5084]: Feb 09, 2019 10:24:01 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

                                         INFO: Retrying request

Feb 09 10:24:01 raspberrypi unifi[5084]: Feb 09, 2019 10:24:01 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

                                         INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused (Connection refused)

Feb 09 10:24:01 raspberrypi unifi[5084]: Feb 09, 2019 10:24:01 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

                                         INFO: Retrying request

Feb 09 10:24:01 raspberrypi unifi[5084]: Feb 09, 2019 10:24:01 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

                                         INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused (Connection refused)

Feb 09 10:24:01 raspberrypi unifi[5084]: Feb 09, 2019 10:24:01 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

                                         INFO: Retrying request

Feb 09 10:24:14 raspberrypi unifi.init[4994]: Starting Ubiquiti UniFi Controller: unifi.

Feb 09 10:24:14 raspberrypi systemd[1]: Started unifi.

 

Controller undiscoverable in UniFi app and refuses connection via http

New Member
Posts: 3
Registered: ‎12-10-2018
Kudos: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

Same problem as user petitpiton 

 

10:46:30,968] <UniFi> ERROR system - [exec] error, rc=141, cmdline=[/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java, -Dfile.encoding=UTF-8, -Djava.awt.headless=true, -Dapple.awt.UIElement=true, -Xmx1024M, $
 Feb 09, 2019 10:45:03 AM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused

Latest java version installed

 

java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) Client VM (build 25.201-b09, mixed mode)

 Can not connect to the controller

New Member
Posts: 7
Registered: ‎05-16-2018

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

I've resolved mine now.
I had to purge the install of unifi, then reinstalled 5.9.29 and restored from backup. Then upgraded to 5.10 by sudo apt-get update / upgrade cycle.
I'm *guessing* the purge was required as I had already tried just reverting to 5.9.29 and re-upgrading.
New Member
Posts: 3
Registered: ‎12-10-2018
Kudos: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Reverted to previous version and restored backup and the old version is working.

 

Upgraded tot the latest via apt upgrade and then I can not connect tot the interface.

 

Didn't work

Emerging Member
Posts: 45
Registered: ‎05-22-2016
Kudos: 62

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

I find that trying upgrades and then reverting and then trying different things often fail.
If the process fails for me somehow, I just reinstall everything from scratch. Usually faster than dealing with weird problems.

 

You can use a 5.9.29 backup file to restore in 5.10.12 by the way.

New Member
Posts: 3
Registered: ‎12-10-2018
Kudos: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Reinstalled the whole sd card, it's working now....

New Member
Posts: 1
Registered: ‎04-30-2018

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

 pi@dolores  ~  sudo systemctl status unifi                                    ✔  3639  22:43:57
● unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-02-09 22:43:47 +06; 21s ago
  Process: 3954 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)
 Main PID: 3988 (jsvc)
   CGroup: /system.slice/unifi.service
           ├─3988 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/sh
           ├─3989 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/sh
           └─3990 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/sh

Feb 09 22:42:42 dolores systemd[1]: Starting unifi...
Feb 09 22:42:47 dolores unifi[3989]: Feb 09, 2019 10:42:47 PM org.apache.commons.httpclient.HttpMethod
                                     INFO: I/O exception (java.net.ConnectException) caught when proce
Feb 09 22:42:47 dolores unifi[3989]: Feb 09, 2019 10:42:47 PM org.apache.commons.httpclient.HttpMethod
                                     INFO: Retrying request
Feb 09 22:42:47 dolores unifi[3989]: Feb 09, 2019 10:42:47 PM org.apache.commons.httpclient.HttpMethod
                                     INFO: I/O exception (java.net.ConnectException) caught when proce
Feb 09 22:42:47 dolores unifi[3989]: Feb 09, 2019 10:42:47 PM org.apache.commons.httpclient.HttpMethod
                                     INFO: Retrying request
Feb 09 22:42:47 dolores unifi[3989]: Feb 09, 2019 10:42:47 PM org.apache.commons.httpclient.HttpMethod
                                     INFO: I/O exception (java.net.ConnectException) caught when proce
Feb 09 22:42:47 dolores unifi[3989]: Feb 09, 2019 10:42:47 PM org.apache.commons.httpclient.HttpMethod
                                     INFO: Retrying request
Feb 09 22:43:47 dolores unifi.init[3954]: Starting Ubiquiti UniFi Controller: unifi failed!
Feb 09 22:43:47 dolores systemd[1]: Started unifi.

Any fix for this? I removed and re installed Java and Unifi Controller but didn't work. But Unifi v5.9.29 works fine. Note I'm using RPI 3b+ and Raspbian.

Emerging Member
Posts: 40
Registered: ‎10-14-2016
Kudos: 6
Solutions: 1

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

tried to use  method "B" to upgrade as it wasthe same method that i use that to install it in the first place and i experienced the errors

 

tried updating using the script

 

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean;sudo systemctl stop unifi;sudo apt-get install dirmngr -y;sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886;echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | sudo tee --append /etc/apt/sources.list;echo 'deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | sudo tee --append /etc/apt/sources.list;sudo apt-get update;sudo apt-get install oracle-java8-installer -y;wget https://dl.ubnt.com/unifi/5.10.12/unifi_sysvinit_all.deb;sudo dpkg -i unifi_sysvinit_all.deb; sudo apt-get install -f -y

 and it worked

New Member
Posts: 19
Registered: ‎01-24-2017
Kudos: 4

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

It seems a lot of us are having this problem with the exact same error message when you do a "sudo service unifi status". 5.9.29 works fine but 5.10.10 fails with java  connects even though I have supposedly upgraded it to V8. I'm hoping someone from Ubiquiti gets involved soon as it would be a pity to stay with 5.9.29 when the new version has so many nice new features and UI...

 

EDIT: Feb 10. Decided to try to reinitialise Raspberry Pi Raspian and start again. Ran Script above again which took some time. This time 5.10.12 started with the errors again but does actually appear to run properly. It remains to be seen if it lasts...

New Member
Posts: 1
Registered: a week ago

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Your instructions helped me with my Java issue.  Out of the box raspian installs openjdk 9 when you install unifi, so I had to remove it and install Oracle Java 8 according to your instructions.  However, java didn't seem to work correct after the install, but I found a message during the install process that said to install oracle-java8-set-default so running the command:

 

sudo apt-get install oracle-java8-set-default

 

seemed to fix it.  I could then install unifi through apt-get and it didn't install any new Java.  The software started successfully and I'm in business.

 

Thanks.

 

 

New Member
Posts: 31
Registered: ‎05-02-2014
Kudos: 2

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

@redman5087 wrote:

Reinstalled the whole sd card, it's working now....


I did the same, but isn't working.

Fresh install, ran the script updated to work with 5.10.x, but same error....

Then I've ran the script again, but installed the 5.9.29 and this version is working.

 

RPi 3 here (Raspberry Pi 3 Model B Rev 1.2).

 

EDIT ------------

 

It's running, with the same warnnings, but running....

 

â unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-02-09 22:25:44 GMT; 6min ago
  Process: 607 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)
 Main PID: 715 (jsvc)
   CGroup: /system.slice/unifi.service
           ââ 715 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unifi -Dunifi.rundir=/var/run/unifi -Xmx1024M -Djava.awt.headless=true -Dfile.encoding=UTF-8 com.ubnt.ace.Launcher start
           ââ 716 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unifi -Dunifi.rundir=/var/run/unifi -Xmx1024M -Djava.awt.headless=true -Dfile.encoding=UTF-8 com.ubnt.ace.Launcher start
           ââ 717 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unifi -Dunifi.rundir=/var/run/unifi -Xmx1024M -Djava.awt.headless=true -Dfile.encoding=UTF-8 com.ubnt.ace.Launcher start
           ââ2441 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true -Xmx1024M -XX:+ExitOnOutOfMemoryError -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/usr/lib/unifi/logs/hs_err_pid%p.log -jar /usr/lib/unifi/lib/ace.jar start
           ââ2562 bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --unixSocketPrefix /usr/lib/unifi/run --logappend --logpath /usr/lib/unifi/logs/mongod.log --nohttpinterface --bind_ip 127.0.0.1

Feb 09 22:24:17 raspberrypi systemd[1]: Starting unifi...
Feb 09 22:24:26 raspberrypi unifi[716]: Feb 09, 2019 10:24:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused (Connection refused)
Feb 09 22:24:26 raspberrypi unifi[716]: Feb 09, 2019 10:24:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: Retrying request
Feb 09 22:24:26 raspberrypi unifi[716]: Feb 09, 2019 10:24:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused (Connection refused)
Feb 09 22:24:26 raspberrypi unifi[716]: Feb 09, 2019 10:24:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: Retrying request
Feb 09 22:24:26 raspberrypi unifi[716]: Feb 09, 2019 10:24:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused (Connection refused)
Feb 09 22:24:26 raspberrypi unifi[716]: Feb 09, 2019 10:24:26 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                        INFO: Retrying request
Feb 09 22:25:44 raspberrypi unifi.init[607]: Starting Ubiquiti UniFi Controller: unifi.
Feb 09 22:25:44 raspberrypi systemd[1]: Started unifi.
Emerging Member
Posts: 45
Registered: ‎05-22-2016
Kudos: 62

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

[ Edited ]

@mcunha wrote:

@redman5087 wrote:

Reinstalled the whole sd card, it's working now....


I did the same, but isn't working.

Fresh install, ran the script updated to work with 5.10.x, but same error....

Then I've ran the script again, but installed the 5.9.29 and this version is working.

 

RPi 3 here (Raspberry Pi 3 Model B Rev 1.2).

 

EDIT ------------

 

It's running, with the same warnnings, but running....


Those apache I/O Exceptions & Retrying requests are only cosmetic and they are working on it.

 

see: https://community.ubnt.com/t5/UniFi-Routing-Switching/UniFi-Network-Controller-5-10-12-Stable-Candid...

New Member
Posts: 1
Registered: a week ago

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

root@unificontroller:~# service unifi status
● unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-02-09 23:51:41 CET; 8h ago
  Process: 1387 ExecStop=/usr/lib/unifi/bin/unifi.init stop (code=exited, status=0/SUCCESS)
  Process: 2361 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)
 Main PID: 2389 (jsvc)
   CGroup: /system.slice/unifi.service
           ├─2389 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unifi -D
           ├─2390 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unifi -D
           └─2391 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ace.jar -pidfile /var/run/unifi.pid -procname unifi -outfile SYSLOG -errfile SYSLOG -umask 027 -user unifi -Dunifi.datadir=/var/lib/unifi -Dunifi.logdir=/var/log/unifi -D

Feb 09 23:50:36 unificontroller systemd[1]: Starting unifi...
Feb 09 23:50:40 unificontroller unifi[2390]: Feb 09, 2019 11:50:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                             INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Feb 09 23:50:40 unificontroller unifi[2390]: Feb 09, 2019 11:50:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                             INFO: Retrying request
Feb 09 23:50:40 unificontroller unifi[2390]: Feb 09, 2019 11:50:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                             INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Feb 09 23:50:40 unificontroller unifi[2390]: Feb 09, 2019 11:50:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                             INFO: Retrying request
Feb 09 23:50:40 unificontroller unifi[2390]: Feb 09, 2019 11:50:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                             INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Feb 09 23:50:40 unificontroller unifi[2390]: Feb 09, 2019 11:50:40 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
                                             INFO: Retrying request
Feb 09 23:51:41 unificontroller unifi.init[2361]: Starting Ubiquiti UniFi Controller: unifi failed!
Feb 09 23:51:41 unificontroller systemd[1]: Started unifi.

 

root@unificontroller:~# netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      542/sshd            
tcp6       0      0 :::22                   :::*                    LISTEN      542/sshd            
udp        0      0 0.0.0.0:38941           0.0.0.0:*                           320/avahi-daemon: r 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           498/dhcpcd          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           320/avahi-daemon: r 
udp6       0      0 :::39397                :::*                                320/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                320/avahi-daemon: r 

 

The Web-IF still does not work.

New Member
Posts: 2
Registered: a week ago

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl

Same errors and Java updated to latest version and Web-IF still does not work.

New Member
Posts: 4
Registered: ‎07-14-2018

Re: [Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi controller and Pi-hole from scratch (headl


@SmokingCrop wrote:

Updating your UniFi 5.9.29 controller to UniFi 5.10.12 if you used my tutorial before is as simple as executing the entire code below, make sure you have the entire thing.
This will update your java to the latest version available which is required for 5.10.X versions of the controller. So do not execute this code to upgrade your 5.10.X controller to an even newer version.

 

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean;sudo systemctl stop unifi;sudo apt-get install dirmngr -y;sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886;echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | sudo tee --append /etc/apt/sources.list;echo 'deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' | sudo tee --append /etc/apt/sources.list;sudo apt-get update;sudo apt-get install oracle-java8-installer -y;wget https://dl.ubnt.com/unifi/5.10.12/unifi_sysvinit_all.deb;sudo dpkg -i unifi_sysvinit_all.deb; sudo apt-get install -f -y

I've used it to update my own controller and it worked flawlessly.

If you are still having issues, I would suggest to start over & install with the script in the opening post, and use your backup of your UniFi controller to restore everything.


Code worked without problems...thank you! Man Happy

Reply