Reply
Senior Member
Posts: 10,315
Registered: ‎08-04-2017
Kudos: 1672
Solutions: 506

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

[ Edited ]

Hello @StLouisWireless,

 

How much RAM does your machine have?

 

Change

unifi.xms=048
unifi.xmx=2048

To

unifi.xms=2048
unifi.xmx=2048

Than run the following command

service unifi restart

 

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@AmazedMender16   

 

ubuntu@ip-:~$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

No certain if this was posted correctly before, so im trying again...lol

ubuntu@ip-~$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

That was a mistake on my part, as I accidentally deleted the number 2 it when pasting it to the forum. So the original entry is correct.
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@AmazedMender16 I currently have 4GB of RAM on my AWS Ubuntu server. Before the upgrade, my processor averaged at around 15 % or less usage when running Unifi. 

Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

[ Edited ]

After disabling Unifi , I am only using 1% CPU

ubuntu@ip-:~$ echo $[100-$(vmstat 1 2|tail -1|awk '{print $15}')]
1

Senior Member
Posts: 10,315
Registered: ‎08-04-2017
Kudos: 1672
Solutions: 506

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

Hello @StLouisWireless,

 

Personally not experiencing this... Have you tried reinstalling mongodb, java and unifi? (ofcourse download a backup.)

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@AmazedMender16  Woudl you so happen to know the Ubuntu commands to do this ?

Senior Member
Posts: 10,315
Registered: ‎08-04-2017
Kudos: 1672
Solutions: 506

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

[ Edited ]

Hello @StLouisWireless,

 

Make sure you download a Settings Only backup onto your desktop.

Settings > Maintenance > Backup

 

See the commands below:

sudo service mongod stop
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt autoremove 
sudo rm /etc/apt/sources.list.d/mongod*.list
sudo apt purge unifi -y
sudo apt purge oracle-java* -y
sudo apt autoremove

You might want to use My Installation Script to install UniFi afterwards.

You will also need to manually change the settings in the system.properties file.

 


Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@AmazedMender16

 

Thank you , I went a head and completely removed Unifi, and reinstalled it with a settings only backup. 

 

The CPU is back to normal and running at 6% . Hopefully it stays that way. 

Member
Posts: 299
Registered: ‎01-28-2016
Kudos: 64
Solutions: 10

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@StLouisWireless I don't think it was asked, what version of MongoDB do you have? I found that Java would frequently consume too much RAM and CPU before I upgraded Mongo. Version 3.2+ includes the WiredTiger storage engine, which is more efficient and doesn't cause the UniFi Java app to use as much RAM. If you're still using a pre-3.2 version of Mongo then I suspect your performance may degrade again after the database begins to grow.

 

For more info, see here: https://help.ubnt.com/hc/en-us/articles/115005159588-UniFi-How-to-Tune-the-Controller-for-High-Numbe...

 

--

Klint

Primary Innovator at Sprocket Technology
Ubiquiti Enterprise Wireless Admin

Setup and secure your UniFi SDN Controller the easy way! Check out the Easy UBNT project and view the source on GitHub. Also, try Vultr for hosting your cloud controller!
Emerging Member
Posts: 95
Registered: ‎06-03-2014
Kudos: 3
Solutions: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@SprockTech

 

I am currently running version 2.6.10. I will see about upgrading to version 3.2, and see if makes a difference once my database gets larger. 

New Member
Posts: 2
Registered: ‎10-02-2016

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

I am having issues after the upgrade from 5.6.39 to 5.6.40, similar to what others have reported.

 

We are running Ubuntu 16.04 and have unifi installed via apt.

server.log tells us every 6s:

[2018-10-24 11:18:54,200] <launcher> INFO  system - ======================================================================
[2018-10-24 11:18:54,200] <launcher> INFO  system - UniFi 5.6.40 (build atag_5.6.40_10370 - release) is started
[2018-10-24 11:18:54,201] <launcher> INFO  system - ======================================================================
[2018-10-24 11:18:54,205] <launcher> INFO  system - BASE dir:/usr/lib/unifi
[2018-10-24 11:18:54,220] <launcher> INFO  system - Current System IP: 10.110.2.30
[2018-10-24 11:18:54,220] <launcher> INFO  system - Hostname: Unifi
[2018-10-24 11:18:54,327] <UniFi> ERROR system - [exec] error, rc=1

We have plenty of disk and RAM (we encounted the mongoDB 3GB limit a while back, so we increased the disk a lot):

Filesystem      Size  Used Avail Use% Mounted on
udev            1,5G  4,0K  1,5G   1% /dev
tmpfs           301M  368K  301M   1% /run
/dev/dm-0        32G   13G   18G  42% /
none            4,0K     0  4,0K   0% /sys/fs/cgroup
none            5,0M     0  5,0M   0% /run/lock
none            1,5G   64K  1,5G   1% /run/shm
none            100M     0  100M   0% /run/user
/dev/vda1       236M   42M  182M  19% /boot


             total       used       free     shared    buffers     cached
Mem:          2,9G       292M       2,7G       580K        26M       130M
-/+ buffers/cache:       135M       2,8G
Swap:         391M         0B       391M

Our system.propterties was unedited, but I have tried to add the recommended 2GB memory parameters (not pasting the first 40 comment rows):

#Wed Oct 24 09:30:35 UTC 2018
download_timeframe=7
is_default=false
unifi.xms=2048
unifi.xmx=2048
uuid=61265343-8b39-4438-9819-6f26eb0e3416

For Java we are running OpenJDK 1.7:

java version "1.7.0_181"
OpenJDK Runtime Environment (IcedTea 2.6.14) (7u181-2.6.14-0ubuntu0.2)
OpenJDK 64-Bit Server VM (build 24.181-b01, mixed mode)

It worked fine until this upgrade. And I am not very keen on uninstalling java since it seems to remove unifi at the same time, like in this thread.

 

The log file does not give much info imho. Can we be certain that the Java version is the problem. It seems everyone who had the same problem so far, have solved it by reinstalling unifi completely. And if we need to change Java version, how can we do that without reinstalling unifi?

 

Senior Member
Posts: 10,315
Registered: ‎08-04-2017
Kudos: 1672
Solutions: 506

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

[ Edited ]

Hello @abill,

 

Update to JAVA8 ( The commands I posted in that thread included uninstalling the current java version, which I removed a few minutes after.. )

You can run my easy update script it will install JAVA8

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Member
Posts: 299
Registered: ‎01-28-2016
Kudos: 64
Solutions: 10

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

@abill,

 

Try to start/restart your unifi service again, then cross-check your syslog for additional details.

 

tail --lines=50 /var/log/syslog

 

Increase the lines to see more if needed.

 

Java 8 is recommended. If you wanted to, you could leave Java 7 and install 'openjdk-8-jre-headless' (you may need to install 'ca-certificates-java' as well) then set the default version to 8.

 

update-java-alternatives --set java-1.8.0-openjdk-amd64

 

--

Klint

Primary Innovator at Sprocket Technology
Ubiquiti Enterprise Wireless Admin

Setup and secure your UniFi SDN Controller the easy way! Check out the Easy UBNT project and view the source on GitHub. Also, try Vultr for hosting your cloud controller!
New Member
Posts: 2
Registered: ‎10-02-2016

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

I updated, using your instructions, and it worked without any problems. 

 

Thanks for the help!

Senior Member
Posts: 10,315
Registered: ‎08-04-2017
Kudos: 1672
Solutions: 506

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

Hello @abill,

 

Awesome, thanks for reporting back!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 7
Registered: ‎09-13-2013
Kudos: 2

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

For those with even older Debian installs -- Wheezy --

 

Upgrade to Java 8 before you upgrade to 5.6.40 ( I had to restore 7 VM's because I did not do step 1.  SnapShot ).

 

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" > /etc/apt/sources.list.d/ppa-ubuntu-precise.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list.d/ppa-ubuntu-precise.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer

 

apt-get -V upgrade  ( I do -V to ensure what version I am upgrading to )

Member
Posts: 299
Registered: ‎01-28-2016
Kudos: 64
Solutions: 10

Re: UniFi SDN Controller 5.6.40 LTS Stable has been released

[ Edited ]

Yes, you're right. Debian Wheezy and Ubuntu Precise don't seem to have the OpenJDK 8 package, so the WebUpd8 package is needed. I've found the same for Ubuntu Trusty, YMMV. For others reading, I would add this install command just to be safe:

 

apt-get install oracle-java8-set-default

 

--

Klint

Primary Innovator at Sprocket Technology
Ubiquiti Enterprise Wireless Admin

Setup and secure your UniFi SDN Controller the easy way! Check out the Easy UBNT project and view the source on GitHub. Also, try Vultr for hosting your cloud controller!
Reply