09-04-2014 07:13 PM
So I was finally able to get through the SSH step. The last command line goes through its process and it says "Starting Ubiquiti UniFi Controller unifi." The next line is "Cannot locate Java Home" and "[fail]." Any ideas of what I am doing wrong. I followed the instructions, and even tried starting from scratch with no avail. Thank you in advance.
09-04-2014 07:53 PM - edited 09-04-2014 07:55 PM
Well known bug with the Unifi software for Debian, it hard sets the Java path which varies on the O/S + CPU architecture, 64bit Ubuntu has a different path I believe
Check it out here:
You can either follow the instructions above to change the JAVA_HOME path or you could use the original JAVA_HOME path to create a symlink to the correct java path
12-04-2014 11:10 PM
I have registered simply to say thank you to the OP. BRadyNapier
Your tutorial and step by step guide has been of some great help in setting up a cloud unifi controller.
I had a few issues which I am taking the liberty to discuss to hopefully avoid same pitfalls from others. As a side note you might have already covered these points in your "troubleshooting..."
1- could not log on to instance using putty.
Had to convert private key from *.pem to *.ppk //
converted but connection was denied consistently.
Problem solved/bypassed using java ssh console
2- Even though have java installed, still could not see console when trying to log into instance.
Had to unhide console in control panel (windows 8) >> Java>>Advanced>>Show/unhide console
But still could not log into instance because the console did not appear
Problem finally solved by RE-ENBLING Java 7 plugin. firefox felt thaT JAVA 7 had too many vulnerabilities and disabled it.
3- vi was a pain in the neck. Never used it on linux (gedit or nano) but on windows, pressing "x" deleted letters
Solved by using ":wq" to exit and save
4- once controller was installed got the dreaded "cannot locate JAVA HOme"
Problem solved by adding (-amd64)
4- smooth sailing from there until I went on site to change the inform url of the APs
First used public DNS and it worked fine until after I provissionned APs, uplinked them and it felt too easy.
BUT I had forgotent to tick on "upgrade aps automatically."
Whilst on wire, they connected fine
but once removed from wire, I COULD SEe THEM BUT could not connect.
This was because the UAP-LR could not talk to them even though they all ran the same version (controller is 2.4.6) but APs were 188.8.131.5291 and old controlled was the latter.
UAP_LR was showing its version number (albeit different than controller) but picos did not have a version and they therefore refused to connect.
Once upgrade aps was ticked, I had to restart the entire install process but it went really smooth this time.
in almost half an hour, had 1 UAP LR and 3 pico M2 (running unifi) talking to each other as if they were mates from past lives.
Emphasis must be made that those who wish to have an elastic IP must do so immediately after setting up the controller.
I made the mistake of setting everything according to tutorial but ignored elastic IP until last step because the URL looked rather long (public DNS).
As a last thought, decided to truncate management URL by using an elastic IP.
Once it was assigned to my instance,(AND THERE WERE WARNINGS)
Lo and Behold! All my hard work disappeared.
I had to start over again.
Installed - configured - managed!
12-05-2014 07:33 PM
Please help w/ the following:
"4- once controller was installed got the dreaded "cannot locate JAVA HOme"
Problem solved by adding (-amd64)"
What does 'adding (-amd64) mean? I get the same error and am no unix guru by any stretch so how did you get around this problem? Thanks
12-06-2014 01:39 AM
Problem solved by adding -amd64
Followed this link first https://community.ubnt.com/t5/UniFi-Wireless/Unifi-12-04/td-p/268665
but better explained here with additional steps to prevent further issues when upgrading java
Hope this helps>
12-06-2014 02:05 AM
Sorry new to this forum. Did not realize I was posting rather than replying.
If you followed tutorial, you migh thave selected a 12.04 or a 14.04 install.
Got the dreaded "cannot locate Java home" because of the following according to member FTZ on this thread:
On 12.04 the name of the Java homedir changed according to the CPU architecture used and UniFi is using a hard-coded variable for the Java path in its startup script for some reason.
So here is the fix:
- Open the init script - sudo vi /etc/init.d/unifi
- Look for a variable called JAVA_HOME - :/JAVA_
- Add -amd64 - A -amd64
- Save and quit - Esc :wq
- Restart unifi - sudo service unifi restart
I did not add "-amd64 -A -amd64, I only added "-amd64" and mine looks like the following:
Remmeber if you are on windows to click on "control c " to end insert and ":wq" to quit and save.
Those are the steps that worked for me.
01-20-2015 12:39 PM
I installed a new controller on Amazon AWS with the latest Version of the UniFi Controller.
I'm stuck at the step where you enter the public DNS.
I tried to connect with :8443, :8443/manage, :8080
I mostly get timeouts or "host not reachable"
I connected via SSH and got the answer the unifi is running.
I also checked the security groups, they look fine.
I restarted the instance.
Added an Elastic IP
Nothing works for me - i can't connect to the controller... :-(
What can i try?
01-20-2015 12:45 PM
01-20-2015 01:29 PM
Thanks for the guide!
One question, how much does it cost you monthly?
01-21-2015 03:02 AM
Is there anybody having a solution of the connection issues?
Is it a problem with the security groups?
I was trying 5 time installing instances (also on different regions)... I had no success so far :-(
01-21-2015 09:16 AM
Just checked and saw that I am currently running in us-east-1a. Another way to instantiate the controller is to use the Amazon Machine Images, AMIs. Just search for Unifi and select the version of the controller you want. You can then update the image to the latest version of controller.
01-21-2015 09:46 AM
Thats a good idea!
I started another instance with a community ami in version 3.1.6
I didn't upgrade it yet - but i have the same thing again....
I get timeouts when i try to connect to the controller the first time :-(
Is there something wrong with my security settings?
Or is there something my computer blocks?
01-21-2015 12:12 PM
Okay - i now found a working solution:
I've created another UniFi Instance, forced to use us-east-1a, based on an 2.3.9 ami.
Connected via SSH to the Instance and upgraded it.
Now i'm at the latest version,
and it is reachable.
I've created everything totally new (also the security groups).
It seems unifi only works on us-east-1a
01-26-2015 11:25 AM
Thanks to the OP for this very useful thread - much appreciated and saved me tons of time fumbling around in the proverbial dark.
Here's a somewhat related quetsion for this thread - if I'm applying minRSSI to APs that are managed by an EC2 Ubuntu instance, where do I plop the config.propertes file in the instance? A short how-to would be greatly appreciated.
01-26-2015 04:06 PM
Just a short note for those having trouble with adopting their APs (going from Adopting to Disconnected). I was SSHing into my APs one at a time and performing a set-inform via CLI but it would never take (when I adopted in controller it would go from Adopting to Disconnected after 30 seconds or so and never leave disconnected state). It wasn't until I launched the Discovery tool on my laptop (had it installed on desktop but desktop still couldn't see APs, not sure why) and clicked Manage and then set the inform that way, then I was able to successfully adopt each AP without it going to Disconnected state.