Ubiquity Controller.

I’ve installed Ubiquity Controller from here:

https://software.opensuse.org/download.html?project=home%3Amarcelloceschia%3Aubiquiti&package=unifi

I need to automatically start it and then connect to it.
I manually started it and tried to connect to it with a web browser but I cant’t address is

 https://your.ip.address.here:8443/

Error I get is

Firefox can’t establish a connection to the server at 192.168.7.111:8443.

I thought it might be the firewall so I tried to turn it off. When I went to YAST to managed it it said it need to install firewalld I let it install.
Now I can’t manage the firewall from YAST I get no access to it. Error indicators it’s not running or maybe it is but I’m locked out.

So my dilemma is how can I make sure my firewall is turned off, automatically start Ubiquity Controller, and then connect to the GUI with my browser?
All the stuff I see on the Internet has all the lib files located in a different directory and the path is totally different. The files are in /opt/unifi not /usr/lib/whatever.
I don’t need the firewall. My network is behind a firewall already.

So I need lotsa help
Thanks.

Want to add when I start the system manually and check to see it’s running I get this

flamebait@flamebait:/opt/unifi> systemctl start unifi              
flamebait@flamebait:/opt/unifi> systemctl status unifi                 
**●** unifi.service - UniFi controller service
   Loaded: loaded (/usr/lib/systemd/system/unifi.service; disabled; vendor preset: disabled)
   Active: **active (running)** since Thu 2018-06-07 12:30:46 PDT; 13s ago
 Main PID: 10738 (java)
    Tasks: 20 (limit: 4915)
   CGroup: /system.slice/unifi.service
           └─10738 /usr/bin/java -Xmx1024M -jar /opt/unifi/lib/ace.jar start
flamebait@flamebait:/opt/unifi> 


Is it really accessible and running?

Check if it is listening on port 8443 perhaps

sudo lsof -i :8443

Returns nothing.

flamebait@flamebait:~> sudo lsof -i :8443
[sudo] password for root:  
flamebait@flamebait:~> 

Don’t even know where to go from here.

Well, that confirms no active process listening on that port. The following can be used to find out which ports are listening for TCP connections from the network:

nmap -sT -O localhost

Just in case this thread is of value…
https://community.ubnt.com/t5/UniFi-Wireless/I-can-not-start-Unifi-Controller-Software-Port-8443-is-used-by/td-p/2058929

BTW, I had a quick look at the repo you pulled from - that’s a very old version of Unifi Controller. I note that Ubiquiti currently offer version 5.7.23 (but only a .deb package unfortunately). You could probably build an RPM package easily enough though.

That’s about as much as I can offer with this.

Thanks.
Looks like I’ll continue to run this on a Mac.
Was hoping I could migrate it to my Linux box.
It’s going to be more pain than I’m up for right now.

Hi
You might consider this later binary blob build?
https://build.opensuse.org/package/show/home%3Ahgraeber/unifi

If it’s running on the machine your running the browser on, did you try localhost instead of the ip address?

I’ll try that blob.
I uninstalled the previous unifi rpm as it was quite old.
I’d like to make this play.

Jeeze you need a separate build service account…
How many times does microfocus expect me to register and to log in?
Always something.

Hi
That’s openSUSE infrastructure, nothing to do with MicroFocus… hence the separate login…

Almost sucess.

**flamebait:/home/flamebait/Downloads/Unifi RPM #** zypper in unifi-5.7.23-1.1.x86_64.rpm     
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: nothing provides libdl.so.2(GLIBC_2.17)(64bit) needed by unifi-5.7.23-1.1.x86_64
 Solution 1: do not install unifi-5.7.23-1.1.x86_64
 Solution 2: break unifi-5.7.23-1.1.x86_64 by ignoring some of its dependencies

**Choose from above solutions by number or cancel [1/2/c] (c): **c
**flamebait:/home/flamebait/Downloads/Unifi RPM #** zypper in libdl.so.2
Loading repository data...
Reading installed packages...
'libdl.so.2' not found in package names. Trying capabilities.
'glibc-32bit' providing 'libdl.so.2' is already installed.
Resolving package dependencies...

Nothing to do.
**flamebait:/home/flamebait/Downloads/Unifi RPM #**

On Fri 08 Jun 2018 01:16:03 AM CDT, FlameBait wrote:

Almost sucess.

Code:

flamebait:/home/flamebait/Downloads/Unifi RPM # zypper in
unifi-5.7.23-1.1.x86_64.rpm Loading repository data…
Reading installed packages…
Resolving package dependencies…

Problem: nothing provides libdl.so.2(GLIBC_2.17)(64bit) needed by
unifi-5.7.23-1.1.x86_64 Solution 1: do not install
unifi-5.7.23-1.1.x86_64 Solution 2: break unifi-5.7.23-1.1.x86_64 by
ignoring some of its dependencies
*Choose from above solutions by number or cancel [1/2/c] (c): *c
flamebait:/home/flamebait/Downloads/Unifi RPM # zypper in libdl.so.2
Loading repository data…
Reading installed packages…
‘libdl.so.2’ not found in package names. Trying capabilities.
‘glibc-32bit’ providing ‘libdl.so.2’ is already installed.
Resolving package dependencies…

Nothing to do.
flamebait:/home/flamebait/Downloads/Unifi RPM #


Hi
I guess the source provider doesn’t have openSUSE Tumbleweed on their
radar… the binary blobs need to be built against a later glibc… not
a lot you can do with closed source stuff…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-23-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Problem: nothing provides libdl.so.2(GLIBC_2.17)(64bit) needed by unifi-5.7.23-1.1.x86_64

I don’t know for sure, but is glibc also installed? That provides /lib64/libdl.so.2

zypper in glibc

glibc is installed and it’s the latest one.
The blob requires an older one 2.17
glibc-2.27-5.1.x86_64 is installed.
weird since is’t basicly a .jar file.
I’m good. I’m going to find another way to skin this cat hopefully.
Need to find a way to build a rpm that the learning curve is not to steep on.

I would just try ignoring that dependency for now and see how it goes.

I’m getting somewhere at least I’ve got

java -jar lib/ace.jar start

tossing errors.
If I know what was what I think I’d be golden.

Can you share these?

journalctl -u unifi

I did a manual start since it didn’t appear to be running.

-- Logs begin at Sun 2017-01-22 20:19:49 PST, end at Thu 2018-06-07 21:00:56 PDT. --
Jun 07 11:36:26 flamebait systemd[1]: Started UniFi controller service.
Jun 07 11:48:08 flamebait systemd[1]: Stopping UniFi controller service...
Jun 07 11:48:23 flamebait systemd[1]: Stopped UniFi controller service.
**-- Reboot --**
Jun 07 12:30:46 flamebait systemd[1]: Started UniFi controller service.
Jun 07 16:25:56 flamebait systemd[1]: Stopping UniFi controller service...
Jun 07 16:25:56 flamebait systemd[1]: Stopped UniFi controller service.
Jun 07 19:46:12 flamebait systemd[1]: Starting unifi...
Jun 07 19:46:12 flamebait import-cert[17774]: Missing key "/etc/ssl/servercerts/serverkey.pem"
Jun 07 19:46:12 flamebait import-cert[17774]: Missing certificate "/etc/ssl/servercerts/servercert.pem"
Jun 07 19:46:12 flamebait import-cert[17774]: Missing CA certificate "/etc/pki/trust/anchors/YaST-CA.pem"
Jun 07 19:46:12 flamebait import-cert[17774]: pkcs12: Cannot open input file /etc/ssl/servercerts/servercert.pem, No such file or directory
Jun 07 19:46:12 flamebait import-cert[17774]: pkcs12: Use -help for summary.
Jun 07 19:46:13 flamebait import-cert[17774]: Importing keystore /var/tmp/unifi.p12 to /usr/lib/unifi/data/keystore...
Jun 07 19:46:13 flamebait import-cert[17774]: keytool error: java.io.FileNotFoundException: /var/tmp/unifi.p12 (No such file or directory)
Jun 07 19:46:13 flamebait unifi.init[17794]: Starting Ubiquiti UniFi Controller/usr/lib/unifi/bin/unifi.init: line 90: start-stop-daemon: command not found
Jun 07 19:46:13 flamebait unifi.init[17794]: ..done
Jun 07 19:46:13 flamebait systemd[1]: Started unifi.
Jun 07 20:49:12 flamebait systemd[1]: Stopping unifi...
Jun 07 20:49:15 flamebait systemd[1]: Stopped unifi.
**-- Reboot --**
Jun 07 20:59:45 flamebait systemd[1]: Starting unifi...
Jun 07 20:59:45 flamebait import-cert[4326]: Missing key "/etc/ssl/servercerts/serverkey.pem"
Jun 07 20:59:45 flamebait import-cert[4326]: Missing certificate "/etc/ssl/servercerts/servercert.pem"
Jun 07 20:59:45 flamebait import-cert[4326]: Missing CA certificate "/etc/pki/trust/anchors/YaST-CA.pem"
Jun 07 20:59:45 flamebait unifi.init[4328]: Starting Ubiquiti UniFi Controller/usr/lib/unifi/bin/unifi.init: line 90: start-stop-daemon: command not found
Jun 07 20:59:45 flamebait unifi.init[4328]: ..done
Jun 07 20:59:45 flamebait systemd[1]: Started unifi.

When I try and launch the jar I get this and the terminal window hangs



flamebait@flamebait:/usr/lib/unifi> java -jar lib/ace.jar start
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: logs/server.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:66)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:277)
at com.ubnt.service.OoOO.e.o00000(Unknown Source)
at com.ubnt.service.OoOO.e.(Unknown Source)
at com.ubnt.ace.Launcher.(Unknown Source)

Hi.

Maybe try alternative downloads…

https://software.opensuse.org/package/unifi

Try " home:hgraeber" version 5.7.23

or if using unifi.zip

Check on latest Stable release…https://help.ubnt.com/hc/en-us/articles/115000441548-UniFi-Current-Controller-Versions

Goto
https://community.ubnt.com/t5/UniFi-Wireless/bd-p/UniFi
for latest Controller Stable Release
which is 5.8.21 but I would go with 5.7.23

Direct Download link…
https://dl.ubnt.com/unifi/5.7.23/UniFi.unix.zip

and save and unzip.

  1. You probably have the java and mongod installed, …

In Dolphin,… open a “Terminal Panel” under the folder you saved “Unifi” zip in… I dont use root.

  1. Check for MONGOD and check for JAVA version …

  2. In the terminal panel change PATH to find Java and Mongod …

os:~ # whereis java
java: /usr/bin/java /usr/lib64/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz

os:~ # echo $JAVA_HOME
/usr/lib64/jvm/jre <----- use this if path is the same as yours… will be an “alternative” but it works.

os:~ # whereis mongod
mongod: /usr/sbin/mongod /usr/share/man/man1/mongod.1.gz

If needed,install Mongod…
zypper in mongod

Important…CREATE symlink to mongod…

sudo ln -fs /usr/bin/mongod mongod <----- use this if path is the same as yours

Now add Java to PATH…

export PATH=$PATH:$HOME/usr/lib64/java <----- use this if PATH to JAVA is the same as yours

Now run … java -jar lib/ace.jar start

and

Then , open Firefox ( supported browser in Unifi) and bang in the below address…

https://localhost:8443

PS: you may need to make the PATH permanent for after reboot.

Cheers.

Thanks. I’m going to try and get back to this after the weekend.