Reply
New Member
Posts: 12
Registered: ‎02-27-2017
Kudos: 1

Re: Unifi Controller on Debian 9

I know very little about Linux, so I might have overlooked something simple...

But when I use the suggested command(?) "sudo echo "JSVC_EXTRA_OPTS=\"\$JSVC_EXTRA_OPTS -Xss1280k\"" >>/etc/default/unifi" on my Ubuntu 17.04 (4.10.0-24-generic x86_64) I get this:

-bash: /etc/default/unifi: Permission denied

 

Afaik my user is the only administrator, so that shouldn't be a problem...?

New Member
Posts: 43
Registered: ‎01-10-2017
Kudos: 13

Re: Unifi Controller on Debian 9

Im not able to get this to work for me on Ubuntu 16.04, any other follow up to this

New Member
Posts: 22
Registered: ‎03-12-2017
Kudos: 7

Re: Unifi Controller on Debian 9

As I understand it you need to run that as root.  I'm sure there will be lots of reasons not to do it this way but I used:

 

sudo -i 

 

And run the command from there.  You probably want to exit out of that mode as soon as you enter that line though.

 

None of that has fixed my controller though.  However the Unifi Video NVR running on the same Ubuntu VM has come back to life.

New Member
Posts: 3
Registered: ‎02-17-2016
Kudos: 4

Re: Unifi Controller on Debian 9

A systemd solution:

 

host# systemctl stop unifi.service

 

Create a backup of config file

host# cp /usr/lib/unifi/bin/unifi.init /usr/lib/unifi/bin/unifi.init.old

 

Find JSVC_EXTRA_OPTS and add '-Xss1280k' in unifi.init file.

host# sudo vi /usr/lib/unifi/bin/unifi.init

 

JSVC_EXTRA_OPTS=-Xss1280k

 

In vi use <esc> :x! to write file.


host# systemctl start unifi.service
host#  systemctl status unifi.service

Please be aware: I'm not liable, etc. etc 

New Member
Posts: 6
Registered: ‎05-24-2017
Kudos: 11

Re: Unifi Controller on Debian 9


@phibbie wrote:

I know very little about Linux, so I might have overlooked something simple...

But when I use the suggested command(?) "sudo echo "JSVC_EXTRA_OPTS=\"\$JSVC_EXTRA_OPTS -Xss1280k\"" >>/etc/default/unifi" on my Ubuntu 17.04 (4.10.0-24-generic x86_64) I get this:

-bash: /etc/default/unifi: Permission denied

 

Afaik my user is the only administrator, so that shouldn't be a problem...?


If you want to use sudo, you'll have to run

echo 'JSVC_EXTRA_OPTS="$JSVC_EXTRA_OPTS -Xss1280k"' | sudo tee -a /etc/default/unifi

If you run sudo echo, the echo is run as root, but the redirect >> still happens at the shell level, which isn't being run as root. If you do the above, and use tee as root to append to the file, it works.

New Member
Posts: 12
Registered: ‎02-27-2017
Kudos: 1

Re: Unifi Controller on Debian 9


@packets wrote:

@phibbie wrote:

I know very little about Linux, so I might have overlooked something simple...

But when I use the suggested command(?) "sudo echo "JSVC_EXTRA_OPTS=\"\$JSVC_EXTRA_OPTS -Xss1280k\"" >>/etc/default/unifi" on my Ubuntu 17.04 (4.10.0-24-generic x86_64) I get this:

-bash: /etc/default/unifi: Permission denied

 

Afaik my user is the only administrator, so that shouldn't be a problem...?


If you want to use sudo, you'll have to run

echo 'JSVC_EXTRA_OPTS="$JSVC_EXTRA_OPTS -Xss1280k"' | sudo tee -a /etc/default/unifi

If you run sudo echo, the echo is run as root, but the redirect >> still happens at the shell level, which isn't being run as root. If you do the above, and use tee as root to append to the file, it works.


And I'm back in business...

 

Thank you so much!

New Member
Posts: 43
Registered: ‎01-10-2017
Kudos: 13

Re: Unifi Controller on Debian 9

is there a way to verify if this was input correctly? I followed this and other suggestions, while I didn't get syntax or permission errors, it seems like it accepted it, still unable to access. even after rebooting

 

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

Re: Unifi Controller on Debian 9

@FlaTech Can you issue

cat /etc/default/unifi

And tell us the output?
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: 43
Registered: ‎01-10-2017
Kudos: 13

Re: Unifi Controller on Debian 9

image.png

 

I may have gone overboard trying to fix this, I've uninstalled and reinstalled, the last install i did this morning I saw it installed what looked like jre-9, I had uninstalled java at the suggestion of the ubnt chat support. 

 

Disclaimer: Whiel I am by no means a linux guru, I am pretty good at following instructions, which is how i got mine initially working. I found the linux version performs much better.  Thanks

 

Andy

Member
Posts: 265
Registered: ‎09-08-2016
Kudos: 64
Solutions: 9

Re: Unifi Controller on Debian 9



echo "JSVC_EXTRA_OPTS=\"\$JSVC_EXTRA_OPTS -Xss1280k\"" >>/etc/default/unifi

 

 

I can confirm this works on Ubuntu 16.04.x LTS.

Thanks. 

New Member
Posts: 12
Registered: ‎11-07-2016
Kudos: 9

Re: Unifi Controller on Debian 9

@UBNT-MikeD

Regarding the workaround post for this issue: https://community.ubnt.com/t5/UniFi-Wireless/IMPORTANT-Debian-Ubuntu-users-MUST-READ-Updated-06-21/t...

 

Will this change need to be reverted when a kernel fix is implemented?

 

If so, can UBNT provide remediation steps as a follow up to the post linked above?

 

Thanks,

 

Andy

New Member
Posts: 1
Registered: ‎02-12-2017

Re: Unifi Controller on Debian 9

Ubuntu 16.04.2, I needed to modify JSVC_EXTRA_OPTS in /usr/lib/unifi/bin/unifi.init 

 

Pretty vanilla installation, this was on line 110 for me.

Emerging Member
Posts: 42
Registered: ‎03-01-2017
Kudos: 5
Solutions: 2

Re: Unifi Controller on Debian 9

any word on new kernel avalibility?

New Member
Posts: 6
Registered: ‎02-26-2017
Kudos: 1

Re: Unifi Controller on Debian 9

@mrinder Why new kernel? Nothing is wrong with the new. Just run the command...
New Member
Posts: 9
Registered: ‎12-14-2015

Re: Unifi Controller on Debian 9

Since users on CentOS/RedHat have experienced similar issues with the new kernel. See https://bugs.centos.org/view.php?id=13453 and https://bugzilla.redhat.com/show_bug.cgi?id=1463241. I know that the kernel for CentOS/RedHat is different from Debian but it stinks.

 

A patch has been applied to the kernel for this CVE and suddenly Debian 7,8 and 9 can't run the Unifi controller.

Emerging Member
Posts: 42
Registered: ‎03-01-2017
Kudos: 5
Solutions: 2

Re: Unifi Controller on Debian 9

someone mentioned that fix to the current kernel is in debian unstable. The code is a workaround, its a clever workaround but I'd rather have the problem fixed.
New Member
Posts: 20
Registered: ‎12-08-2016
Kudos: 1
Solutions: 1

Re: Unifi Controller on Debian 9

I did it and now getting the below error:

 

● unifi.service - unifi
Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2017-06-21 12:24:09 CDT; 13min ago
Process: 6070 ExecStop=/usr/lib/unifi/bin/unifi.init stop (code=exited, status=0/SUCCESS)
Process: 6151 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)

Jun 21 12:24:08 mediaserver systemd[1]: Starting unifi...
Jun 21 12:24:08 mediaserver unifi.init[6151]: * Starting Ubiquiti UniFi Controller unifi
Jun 21 12:24:08 mediaserver unifi.init[6151]: Cannot locate Java Home
Jun 21 12:24:09 mediaserver unifi.init[6151]: ...fail!
Jun 21 12:24:09 mediaserver systemd[1]: Started unifi.

Emerging Member
Posts: 96
Registered: ‎12-17-2016
Kudos: 13
Solutions: 1

Re: Unifi Controller on Debian 9

echo "JSVC_EXTRA_OPTS=\"\$JSVC_EXTRA_OPTS -Xss1280k\"" | sudo tee -a /etc/default/unifi

Works with Peppermint 7 as well.

pfSense on i5-4200U/8GB Qotom Mini PC | UniFi Switch 24 | UniFi Switch 8 | UAP-AC-M-PRO | UAP-AC-M (2) | TP-Link TL-SG108E | Synology DS718+ (UniFi Controller in Debian 9.6 VM)
New Member
Posts: 3
Registered: ‎02-17-2016
Kudos: 4

Re: Unifi Controller on Debian 9


@sleither wrote:

I did it and now getting the below error:

 

● unifi.service - unifi
Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2017-06-21 12:24:09 CDT; 13min ago
Process: 6070 ExecStop=/usr/lib/unifi/bin/unifi.init stop (code=exited, status=0/SUCCESS)
Process: 6151 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)

Jun 21 12:24:08 mediaserver systemd[1]: Starting unifi...
Jun 21 12:24:08 mediaserver unifi.init[6151]: * Starting Ubiquiti UniFi Controller unifi
Jun 21 12:24:08 mediaserver unifi.init[6151]: Cannot locate Java Home
Jun 21 12:24:09 mediaserver unifi.init[6151]: ...fail!
Jun 21 12:24:09 mediaserver systemd[1]: Started unifi.



Did you try this...?

A systemd solution:

 

host# systemctl stop unifi.service

 

Create a backup of config file

host# cp /usr/lib/unifi/bin/unifi.init /usr/lib/unifi/bin/unifi.init.old

 

Find JSVC_EXTRA_OPTS and add '-Xss1280k' in unifi.init file.

host# sudo vi /usr/lib/unifi/bin/unifi.init

 

JSVC_EXTRA_OPTS=-Xss1280k

 

In vi use <esc> :x! to write file.


host# systemctl start unifi.service
host#  systemctl status unifi.service

Please be aware: I'm not liable, etc. etc 

New Member
Posts: 20
Registered: ‎12-08-2016
Kudos: 1
Solutions: 1

Re: Unifi Controller on Debian 9

[ Edited ]

I did and now getting a UniFi Setup Wizard on my localhost:8443/.  Tried to restor from backup, but cannot find it or states I do not have permission even though I have root access......

 

Capture.PNG

Reply