Reply
Highlighted
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1
Accepted Solution

Unifi Controller webgui issues

Hi all,

 

I am struggling to get my unifi controller back to work. Eveyrthing seems to work except my webgui. For some reason it does not start anymore. I have no idea what happend.

 

Raspbian stretch

controller version latest from repo

MongoDB shell version: 2.4.14

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)

 

echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle

 

Unifi service status:

 

unifi.service - unifi
Loaded: loaded (/etc/systemd/system/unifi.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Tue 2019-03-12 13:35:11 CET; 36min ago
Process: 21716 ExecStop=/usr/lib/unifi/bin/unifi.init stop (code=exited, status=0/SUCCESS)
Process: 21676 ExecStart=/usr/lib/unifi/bin/unifi.init start (code=exited, status=0/SUCCESS)

Mar 12 13:35:11 AutoHome systemd[1]: unifi.service: Service hold-off time over, scheduling restart.
Mar 12 13:35:11 AutoHome systemd[1]: Stopped unifi.
Mar 12 13:35:11 AutoHome systemd[1]: unifi.service: Start request repeated too quickly.
Mar 12 13:35:11 AutoHome systemd[1]: Failed to start unifi.
Mar 12 13:35:11 AutoHome systemd[1]: unifi.service: Unit entered failed state.
Mar 12 13:35:11 AutoHome systemd[1]: unifi.service: Failed with result 'start-limit-hit'

 

./unifi start
[....] Starting Ubiquiti UniFi Controller: unifiCannot set group id for user 'unifi'
Error validating user 'unifi'
failed!

 

id unifi
uid=110(unifi) gid=114(unifi) groups=114(unifi)

 

Complete uninstall (purge) and reinstall didn't do the trick.

 

I do not want to reinstall raspbian as my home automation is running on it to (last resort)

 

I have no clue where to look anymore. I tried many solutions, but I am afraid that may have damaged even more.

 

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 3.0G 11G 22% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 6.3M 458M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 41M 22M 20M 54% /boot
tmpfs 93M 0 93M 0% /run/user/1001

 


Accepted Solutions
Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Run the following commands.

service unifi stop
touch /etc/default/unifi
apt purge oracle-java8-jdk -y
sed -i 's/^JAVA_HOME/#JAVA_HOME/' /etc/default/unifi
echo "JAVA_HOME="$( readlink -f "$( which java )" | sed "s:bin/.*$::" )"" >> /etc/default/unifi
service unifi start

 

 

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

View solution in original post

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Run the following command and login with the root password... then run the commands.

su

If you don't have a root password run this:

sudo passwd root

Also run the following commands..

dpkg --remove --force-remove-reinstreq unifi
wget https://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
dpkg -i unifi_sysvinit_all.deb
rm unifi_sysvinit_all.deb

 

 

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

View solution in original post

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

You didn't run all my commands, these commands resolved your issues...

dpkg --remove --force-remove-reinstreq unifi
wget https://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
dpkg -i unifi_sysvinit_all.deb
rm unifi_sysvinit_all.deb

 

 

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

View solution in original post


All Replies
Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,


What is the output of the following commands?

dpkg -l | grep "openjdk\|oracle"

Could you also PM me the controller logs?

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

Hi @AmazedMender16 

 

ii oracle-java8-installer 8u201-1~webupd8~1 all Oracle Java(TM) Development Kit (JDK) 8

ii oracle-java8-jdk 8u65 armhf Java™ Platform, Standard Edition 8 Development Kit

ii oracle-java8-set-default 8u201-1~webupd8~1 all Set Oracle JDK 8 as default Java

 

I will pm the logs

 

 

 

 

 

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Run the following commands.

service unifi stop
touch /etc/default/unifi
apt purge oracle-java8-jdk -y
sed -i 's/^JAVA_HOME/#JAVA_HOME/' /etc/default/unifi
echo "JAVA_HOME="$( readlink -f "$( which java )" | sed "s:bin/.*$::" )"" >> /etc/default/unifi
service unifi start

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

[ Edited ]

service unifi stop
Failed to stop unifi.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status unifi.service' for details

 

touch /etc/default/unifi
touch: cannot touch '/etc/default/unifi': Permission denied

 

sudo apt purge oracle-java8-jdk -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libxi6 libxrender1 libxtst6
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
oracle-java8-jdk*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 173 MB disk space will be freed.
(Reading database ... 39720 files and directories currently installed.)
Removing oracle-java8-jdk (8u65) ...

 

sed -i 's/^JAVA_HOME/#JAVA_HOME/' /etc/default/unifi
sed: can't read /etc/default/unifi: No such file or directory

 

echo "JAVA_HOME="$( readlink -f "$( which java )" | sed "s:bin/.*$::" )"" >> /etc/default/unifi
-bash: /etc/default/unifi: Permission denied

 

Strange, I ran it as sudo. Did not work, tried again, diffrent results. Please wait.

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Do you have unifi even installed right now?

dpkg -l | grep unifi

Run the commands as root user.

su

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

[ Edited ]

sudo echo "JAVA_HOME="$( readlink -f "$( which java )" | sed "s:bin/.*$::" )"" >> /etc/default/unifi
-bash: /etc/default/unifi: Permission denied

 

The rest of the commands did work.

 

dpkg -l | grep unifi
ii unifi 5.10.19-11646-1 all Ubiquiti UniFi server

 

 

Just noticed that there is no /etc/default/unifi dir. Ow, yes it is there it is hidden, and it is not a directory ofcourse.

 

 

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Run the following command and login with the root password... then run the commands.

su

If you don't have a root password run this:

sudo passwd root

Also run the following commands..

dpkg --remove --force-remove-reinstreq unifi
wget https://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
dpkg -i unifi_sysvinit_all.deb
rm unifi_sysvinit_all.deb

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

Hi @AmazedMender16 

 

I ran everything as su. Webgui is still not working.

 

https://192.168.188.3:8443/manage/account/login?redirect=%2Fmanage

 

This is what I am trying to access btw. That always worked up intill a few days ago.

 

 

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Output of the following commands again?

dpkg -l | grep "openjdk\|oracle"
cat /etc/default/unifi

Also PM me the controller logs.

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

[ Edited ]

@AmazedMender16 

These are the outputs:


dpkg -l | grep "openjdk\|oracle"
ii oracle-java8-installer 8u201-1~webupd8~1 all Oracle Java(TM) Development Kit (JDK) 8
ii oracle-java8-set-default 8u201-1~webupd8~1 all Set Oracle JDK 8 as default Java

 

cat /etc/default/unifi
#JAVA_HOME/#JAVA_HOME/' /etc/default/unifi

 

I am working on the logs

 

Ok so logs are in /usr/lib/unifi/logs or in /var/log/unifi/

Both dirs are empty.

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Run this one again as ROOT.

su
echo "JAVA_HOME="$( readlink -f "$( which java )" | sed "s:bin/.*$::" )"" >> /etc/default/unifi

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

@AmazedMender16 

Done, no output from commandline.

 

Thanks for your assistance and patience btw.

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

Okay.. run the cat command once again.

Also send me the logs Man Happy

 

 

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
New Member
Posts: 11
Registered: ‎12-30-2018
Solutions: 1

Re: Unifi Controller webgui issues

cat /etc/default/unifi
#JAVA_HOME/#JAVA_HOME/' /etc/default/unifi
JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre/
JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre/

 

There are no log files /usr/lib/unifi/logs/ this dir is empty.

Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

I will reach out to you via a PM..

 

 

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
Senior Member
Posts: 23,794
Registered: ‎08-04-2017
Kudos: 4500
Solutions: 1168

Re: Unifi Controller webgui issues

Hello @rgrs,

 

You didn't run all my commands, these commands resolved your issues...

dpkg --remove --force-remove-reinstreq unifi
wget https://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
dpkg -i unifi_sysvinit_all.deb
rm unifi_sysvinit_all.deb

 

 

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