Reply
Established Member
Posts: 2,301
Registered: ‎07-30-2009
Kudos: 265
Solutions: 1

Unifi server taking too long to start

I am setting up my 2nd Unifi Controller, on a different network than the first of course, and this time after I run the install and launch unifi it just gets stuck on saying "server taking to long to start."

Its Windows Enterprise 2003 sp2, all updates have been applied.
Dallas Gray
CCNP, CCNA, CCDA, CWTS, UACA, NET+, A+, CXFF
SuperUser
Posts: 41,353
Registered: ‎06-23-2009
Kudos: 8417
Solutions: 1383

Re: Unifi server taking too long to start

Dallas, have you updated to the latest
version of Java? Dave

> HQ in Seacoast region New Hampshire U.S.A.
> Ubiquiti Certified Trainer [UCT] for:
     UBWA [AirMax] / UEWA [UniFi] / UBRSS [routers]
UBNT.NH@gmail.com
Established Member
Posts: 2,301
Registered: ‎07-30-2009
Kudos: 265
Solutions: 1

Re: Unifi server taking too long to start

Dallas, have you updated to the latest
version of Java? Dave

yeah that was the first thing I did actually. let me try to uninstall java and reinstall see what happens.
Dallas Gray
CCNP, CCNA, CCDA, CWTS, UACA, NET+, A+, CXFF
Established Member
Posts: 2,301
Registered: ‎07-30-2009
Kudos: 265
Solutions: 1

Re: Unifi server taking too long to start

yeah that didn't help.. same thing.."taking to long" nothing in logs or anything.
Dallas Gray
CCNP, CCNA, CCDA, CWTS, UACA, NET+, A+, CXFF
Ubiquiti Employee
Posts: 991
Registered: ‎05-04-2009
Kudos: 525
Solutions: 17
Contributions: 1

Re: Unifi server taking too long to start

yeah that didn't help.. same thing.."taking to long" nothing in logs or anything.


dayas,

Here's something you can try:

cd %USERPROFILE%/"Ubiquiti Unifi"
java -jar lib/ace.jar start


and report any findings and send me the logs/server.log

Thanks.
Established Member
Posts: 2,301
Registered: ‎07-30-2009
Kudos: 265
Solutions: 1

Re: Unifi server taking too long to start

dayas,

Here's something you can try:

cd %USERPROFILE%/"Ubiquiti Unifi"
java -jar lib/ace.jar start


and report any findings and send me the logs/server.log

Thanks.


I emailed the log file to suppport@ubnt.com

This time it says start-up failed
Initializing UniFi Controller ...
Starting UniFi Controller ...
Start-up failed.
Dallas Gray
CCNP, CCNA, CCDA, CWTS, UACA, NET+, A+, CXFF
Ubiquiti Employee
Posts: 991
Registered: ‎05-04-2009
Kudos: 525
Solutions: 17
Contributions: 1

Re: Unifi server taking too long to start

I emailed the log file to suppport@ubnt.com

This time it says start-up failed
Initializing UniFi Controller ...
Starting UniFi Controller ...
Start-up failed.


dayas, could you send it again to jerry@ubnt.com?

Thanks.
Established Member
Posts: 2,301
Registered: ‎07-30-2009
Kudos: 265
Solutions: 1

Re: Unifi server taking too long to start

just sent, let me know thanks!
Dallas Gray
CCNP, CCNA, CCDA, CWTS, UACA, NET+, A+, CXFF
Ubiquiti Employee
Posts: 991
Registered: ‎05-04-2009
Kudos: 525
Solutions: 17
Contributions: 1

Re: Unifi server taking too long to start

just sent, let me know thanks!


dayas,

You have something running on port 8080 and UniFi couldn't start because of this. (something we need to improve)

You can take look at your
%userprofile%/"Ubiquiti UniFi"/data/system.properties
and change the port numbers to avoid conflicts.
Established Member
Posts: 2,301
Registered: ‎07-30-2009
Kudos: 265
Solutions: 1

Re: Unifi server taking too long to start

dayas,

You have something running on port 8080 and UniFi couldn't start because of this. (something we need to improve)

You can take look at your
%userprofile%/"Ubiquiti UniFi"/data/system.properties
and change the port numbers to avoid conflicts.


Thank you very much Jerry for fixing this, we had our internal helpdesk software running on port 8080 and Jerry found it and fixed it very quickly, much appreciated!
Dallas Gray
CCNP, CCNA, CCDA, CWTS, UACA, NET+, A+, CXFF
New Member
Posts: 6
Registered: ‎05-03-2013
Kudos: 8

Re: Unifi server taking too long to start

[ Edited ]

1. Check free ports (kill javaw.exe process if you have fail controller startup before).

1.1 If ports is not free change it on '/data/system.properties'. I'm recomend add "1" to before every port number. Check that any port less then 65535.

2. Move Unifi directory to root like "C:\UniFi\". It need if you have unicode characters in path. In Russian Windows default admin user name have it (Администратор).

3. Change shotcut link to C:\Windows\SysWOW64\javaw.exe -jar "C:\UniFi\lib\ace.jar" ui and working direcotry: C:\UniFi\. 

4. Run controller

 

I think it will be work 100%.

New Member
Posts: 7
Registered: ‎12-16-2013
Kudos: 1

Re: Unifi server taking too long to start

i had the same problem..

 

killing java processes helped.

 

 

New Member
Posts: 1
Registered: ‎04-22-2014

Re: Unifi server taking too long to start

Hola, si es una maquina virtual y no tienes espacio en disco suficiente, libera espacio en disco y vuelve a iniciar el controlador, en mi caso era eso.

New Member
Posts: 6
Registered: ‎09-22-2014
Kudos: 1

Re: Unifi server taking too long to start

[ Edited ]

This is correct (kill the java processes between troubleshooting attempts), and one of the best answers I have read for anyone troubleshooting. The java processes do not shut down clean if you installed when a port was already in use, it seems.  Also there is a "mongod.exe" process that might be running even after you uninstall, which happened in my case.  The   %userprofile%\Ubiquiti UniFi\logs and Lib directories were locked by mongod.exe, and could not be cleaned up during the uninstallation. 

The log files in %userprofile%\Ubiquiti UniFi\logs will probably tell you all you need to know if the controller will not start.  

One thing that UBNT also needs to improve on is this installer does not let you choose the install location. Why it must install to the user profile is beyond me.  I had exactly 3GB space on the c:\ drive where the controller was installed.  The journal requires 3379MB, so I saw this error in the mongod.exe log:

 

  • Mon Sep 22 13:43:26 [initandlisten] Please make at least 3379MB available in C:/Users/dBo/Ubiquiti UniFi/data/db/journal or use --smallfiles

My choices were limited to: use smallfiles, shell folder redirection on the profile, or clean up some space.  I just cleaned up some space and reinstalled.  

 

If you are trying to figure out what processes are running on the default ports, you can use these commands to get the ProcessID, then crossreference the PID through the task manager or from command line:

C:\>netstat -ano | find "0.0.0.0:8080"

TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 14368

.... in bold is the process ID for the application listening on that port.

 

Note that 0.0.0.0 implies the service listening on the port is listening on all interfaces. You could leave the 0.0.0.0: out, or use a specific adapter address, but you might see more results than you care to look at.   

 

You should check this for all the ports in the  %userprofile%\Ubiquiti UniFi\data\system.properties file to ensure you dont have services listening on any of them. Here is a list of the defaults in mine:

  • # unifi.http.port=8080 # device inform
  • # unifi.https.port=8443 # controller UI / API
  • # portal.http.port=8880 # portal redirect port for HTTP
  • # portal.https.port=8843 # portal redirect port for HTTPs
  • # unifi.db.port=27117 # local-bound port for DB server

 

Now with this data, you can add the PID column to the task manager in windows to find the process, or if you prefer command line, you can check what process is using the port with this command: 

C:\>tasklist /svc | find "14368"
mcservice.exe 14368 N/A

 

In my case, mcservice.exe (the mirth connector service) was listening on 8080, all interfaces. I changed up the ports to something in the ephemeral range and everything is smooth now.  For simplicities sake, I liked the idea of just prefixing them with a number if less than or equal to 65535; If you are familiar with standard ports, then its easy to recognize 18080 as http, and 18443 as https. 

 

Hope this helps anyone else running into troubles starting the controller.  

 

-d

New Member
Posts: 1
Registered: ‎04-20-2015

Re: Unifi server taking too long to start

In my case was problem with the user account, becasue in Sweden we use special characters like ÖÅÄ, and the account or Admin is administratör, so for that reason doesnt work

New Member
Posts: 2
Registered: ‎06-22-2015

Re: Unifi server taking too long to start

So, I am from Sweden as well (have "ö" in my user) and I have spent 12 hours to find out why my Unifi does not start on Windows 8. What did you do to make the Controller start? Changed the installation path to another user name? Did it work?

New Member
Posts: 6
Registered: ‎05-03-2013
Kudos: 8

Re: Unifi server taking too long to start

To solve problem, move controller folder from user folder to disk root (set permissions) and run.

New Member
Posts: 2
Registered: ‎06-22-2015

Re: Unifi server taking too long to start

Thanks alot t-artem! Now it works!Hurray

New Member
Posts: 1
Registered: ‎06-24-2015

Re: Unifi server taking too long to start

What worked for me was to add the java folder to the environment path in the advanced settings in Windows.

 

I appended this =>   C:\Program Files (x86)\Java\jre1.8.0_45\bin

 

Java-Environment.PNG

New Member
Posts: 7
Registered: ‎02-04-2016

Re: Unifi server taking too long to start

I have this same problem, but on a Mac Mini running OSX 10.8.5. Installed latest Java version and I get the same message - although the controller actually starts, but then later on crashes and it says 

 

UniFi Controller (4.8.12) started.
Restarting UniFi Controller ...
Server taking too long to start...
Start-up failed.

 

What would I do on a Mac? Make a clean install in root folder?

 

Thanks.

Reply