Reply
New Member
Posts: 9
Registered: ‎06-29-2017
Kudos: 5

Re: Unifi Controller on Debian 9

Sorry that I can't help you more, but this needs to be said...

 

Ubuntu 14.04 LTS is still supported, but pretty old. I have been running 16.04 LTS on my production systems since, er... march 2016! The default java on 14.04 is openjdk 1.7 (needed to run unifi controller).

 

Debian 9 was released with the 4.10 kernel, as was ubuntu 17.04. This thread deals with a problem caused by an upgrade to a particular version of that kernel, and so is irrelevant to your post (i.e. you are off topic, but then so was I because 16.04 runs kernel 4.4!!).

 

Without giving the matter much thought, you ought to be looking at your java environment. For example, ubuntu 16.04 LTS and 17.04 (non-LTS) both have OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.17.04.1-b11).

 

... also, try "dpkg -l | grep -i unifi" (I am currently running 5.4.18-9252 on 16.04 LTS)

 

Finally, a broken apt-get upgrade is way off topic here and usually scary to fix. I usually run "dpkg --configure -a" to see which script in /var/lib/dpkg/info/ is failing, then insert an "exit 0" at a suitable point to get past the failure. From that point on, you have a "clean" upgraded system AND a broken package to deal with. Good luck!

Regular Member
Posts: 411
Registered: ‎04-15-2014
Kudos: 19
Solutions: 9

Re: Unifi Controller on Debian 9


@burchbri wrote:

Debian 9 was released with the 4.10 kernel,


Not exactly: with the 4.9 kernel, which LTS

Member
Posts: 117
Registered: ‎01-29-2013
Kudos: 10

Re: Unifi Controller on Debian 9

Yeah, thanks, but the kernel is indeed the issue, according to ubnt. So 14.04 is also affected.
Established Member
Posts: 1,603
Registered: ‎01-29-2014
Kudos: 489
Solutions: 82

Re: Unifi Controller on Debian 9

if the jsvc bodge I posted a few posts back doesn't work then AND you've installed Oracle Java 8 AND you don't have viable backups then I think I'd nuke the install from orbit and start again Man Happy

Emerging Member
Posts: 83
Registered: ‎11-23-2016
Kudos: 34

Re: Unifi Controller on Debian 9

Slightly annoying that this thread, which specifically mentions DEBIAN 9 (Stretch) in the title, has been hijacked with Ubuntu gumpf.

I'm going to be inexcusably lazy right now, but to save me reading through pages of Ubuntu crap, could someone definitively confirm whather the Unifi controller 5.4.20 will tolerate an upgrade from Debian 8 (Jessie) to Debian 9 (Stretch) as of right now 02/08/2017?

Thanks
Emerging Member
Posts: 60
Registered: ‎01-01-2016
Kudos: 34
Solutions: 3

Re: Unifi Controller on Debian 9

Yes.
Emerging Member
Posts: 83
Registered: ‎11-23-2016
Kudos: 34

Re: Unifi Controller on Debian 9

Thank you for the succinct response, that's good enough for me!
New Member
Posts: 11
Registered: ‎08-19-2013
Kudos: 1
Solutions: 1

Re: Unifi Controller on Debian 9

I cannot login after an upgrade Debian 7 -> 8 -> 9 so, i would say: possibly no.

New Member
Posts: 9
Registered: ‎06-29-2017
Kudos: 5

Re: Unifi Controller on Debian 9

It is a shame you didn't bother to work through this thread. It is a shame our forum moderator didn't think to change the title of the thread, which might be well-suited to your particular situation, but has subsequently been discovered to be much too specific. Several other threads point to this particular topic, which inevitably led to the cocktail of discussions you encountered when arriving here.

 

This was/is a kernel issue that was relevant to several different kernel lines. These kernels are distributed as debian packages, which are shared by other distros, including ALL the many flavours of ubuntu.

 

It was a major issue and caught many people out when they implemented a new unifi release which tripped over an earlier and apparently harmless kernel upgrade. You should consider yourself lucky that others had done all the hard work before you hit the problem yourself.

 

 

Member
Posts: 117
Registered: ‎01-29-2013
Kudos: 10

Re: Unifi Controller on Debian 9

Yes.
Title change, please.
This problem is directly relevant to Ubiquiti's UniFi on both Ubuntu and Debian.
Thank you kindly to those whose very specific comments led me here to study every page, identify my problem, and inquire for confirmation.
Stuffy people can pack sand. 😬


Member
Posts: 117
Registered: ‎01-29-2013
Kudos: 10

Re: Unifi Controller on Debian 9

@Aggraxis
I hope you know...
Should your June 19th instructions on page 1:

apt install linux-image-4.9.0-3-amd64:amd64=4.9.30-2

(And, I'm guessing)

apt-mark hold linux-image-4.9.0-3-amd64:amd64=4.9.30-2

also apply to an affected Ubuntu 14.04LTS server?
Or, would a different kernel be more appropriate for this:
uname -a:
4.4.0-83-generic #106~14.04.1-Ubuntu SMP Mon Jun 26 18:10:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I want to try this fix before reinstalling the entire UniFi controller as was suggested by ubnt chat support.

Currently, apt list --installed yields:

unifi/now 4.8.20-8422 all [installed,upgradable to: 5.5.20-9565]

Seems like there was a good reason with Gen1 UAPs to stay in version 4.x, though I don't recall what it was.

I appreciate any insights you can share.
Pat
New Member
Posts: 4
Registered: ‎01-06-2014

Re: Unifi Controller on Debian 9

Does this also affect raspbian Kernels?

I'm running 4.9.41-v7+ on Ubuntu 16.04 and have problems starting unifi. Not sure if this is related though, since this is a new install.

Member
Posts: 162
Registered: ‎04-14-2016
Kudos: 118

Re: Unifi Controller on Debian 9

I would speculate yes. The kernel architecture compile wouldn't change the parameters in this context. No different than a .deb build is the same as a .rpm. It's the same file with a different package container. You can rebuild the package to work on any distro. make pkg, etc.

Simply apply the 'fix' or patch as described and see if it remedies the issue. Only one way to narrow it down. It doesnt work anyway.

-OnTheGrind
Emerging Member
Posts: 61
Registered: ‎09-10-2013
Kudos: 4
Solutions: 1

Re: Unifi Controller on Debian 9

As of today (just did a dist-upgrade) I can confirm that Unifi (eventually) works fine with Debian 9 Stretch.

 

The initial apt-get dist-upgrade removed unifi due to a dependency problem with I believe with openjdk. After the reboot (and dealing with a CPU fan deciding to die right then and there), I was able to successfully apt-get install unifi without issue.

New Member
Posts: 4
Registered: ‎03-06-2018
Kudos: 1

Re: Unifi Controller on Debian 9

Hi. I update Debian from 8 to 9. And I can't access controler

 

 

unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: en
   Active: active (running) since Tue 2018-03-06 12:25:47 CET; 4min 27s ago
  Process: 449 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, statu
 Main PID: 594 (jsvc)
    Tasks: 30 (limit: 4915)
   CGroup: /system.slice/unifi.service
           ├─ 594 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-openjdk-i3
           ├─ 596 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-openjdk-i3
           ├─ 597 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-openjdk-i3
           └─1731 /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java -Xmx1024M -XX:Er

mar 06 12:25:43 debiansrv systemd[1]: Starting unifi...
mar 06 12:25:47 debiansrv unifi.init[449]: Starting Ubiquiti UniFi Controller: u
mar 06 12:25:47 debiansrv systemd[1]: Started unifi.

When I open https://debiansrv:8443/ i get time out. I reinstall unifi but problem doesn't gone Man Sad Before dist-upgrade everything works fine. Can somebody help me?

 

Ubiquiti Employee
Posts: 4,008
Registered: ‎01-11-2016
Kudos: 1195
Solutions: 29

Re: Unifi Controller on Debian 9

@gruby Can you send us /var/log/unifi/server.log and mongod.log
Want to try out new features or fixes before they're released as Stable? Sign up for Beta here: https://help.ubnt.com/hc/en-us/articles/204908664-How-To-Signup-for-Beta-Access
Having connectivity issues? See: https://help.ubnt.com/hc/en-us/articles/221029967-UniFi-Debugging-Intermittent-Connectivity-Issues-on-your-UAP
New Member
Posts: 4
Registered: ‎03-06-2018
Kudos: 1

Re: Unifi Controller on Debian 9

[ Edited ]

Yesterday I noticed that mongodb from debian repo doesn't work. So I add mongodb repo and install mongodb-org. Now everything works perfect! Man Wink

 

 unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: en
   Active: active (running) since Wed 2018-03-07 12:37:44 CET; 18h ago
  Process: 451 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, statu
 Main PID: 762 (jsvc)
    Tasks: 882 (limit: 4915)
   CGroup: /system.slice/unifi.service
           ├─ 762 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre
           ├─ 764 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre
           ├─ 765 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre
           ├─1783 /usr/lib/jvm/java-8-oracle/jre/bin/java -Xmx1024M -XX:ErrorFil
           └─2663 bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --unix

mar 07 12:37:37 debiansrv systemd[1]: Starting unifi...
mar 07 12:37:44 debiansrv unifi.init[451]: Starting Ubiquiti UniFi Controller: u
mar 07 12:37:44 debiansrv systemd[1]: Started unifi.
New Member
Posts: 6
Registered: ‎11-21-2018

Unifi Controller not working

Hello every one!
I have install unifi controller on Ubuntu VM 16.0.4. it is installed but when it use to run this command 

$ sudo /etc/init.d/unifi start. 

and its output is 

* Starting Ubiquiti UniFi Controller unifi                                        [fail]

and its status output is below:

● unifi.service - unifi
Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
Active: active (running) since Monday 2018-11-26 11:27:05 PKT; 4min 7s ago
Process: 3521 ExecStop=/usr/lib/unifi/bin/unifi.init stop (code=exited, status=0/SUCCESS)
Process: 3564 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)
Main PID: 3593 (jsvc)
CGroup: /system.slice/unifi.service
├─3593 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ac
├─3595 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ac
├─3596 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle -cp /usr/share/java/commons-daemon.jar:/usr/lib/unifi/lib/ac
└─4793 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true -Xmx1

November 26 11:26:03 ubuntu-KVM systemd[1]: Starting unifi...
November 26 11:26:03 ubuntu-KVM unifi.init[3564]: * Starting Ubiquiti UniFi Controller unifi
November 26 11:27:05 ubuntu-KVM unifi.init[3564]: ...fail!
November 26 11:27:05 ubuntu-KVM systemd[1]: Started unifi

 

check out the second last line.....
Any one can helpt me please i am stuck....

Senior Member
Posts: 23,521
Registered: ‎08-04-2017
Kudos: 4464
Solutions: 1156

Re: Unifi Controller not working

Hello @zeeshan-4775,

 

Welcome to the community!

 

Could you post the controller logs?

Have you for giggles tried using my installation scripts? ( Recommend uninstalling JAVA, UniFi and mongodb before you use the scripts )

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
Reply