Emerging Member
Posts: 42
Registered: ‎09-14-2014
Kudos: 2
Solutions: 1
Accepted Solution

Unifi 4.6.0 Controller just stops running as a service

Has anyone else had issues with the Unifi Controller stopping randomly while running as a Windows Service?  I'm runing this on a Windows 2012 R2 server as a windows service.   Also after firing back up it seems like it takes a while but if the state is "running" I can then access the configuration through the web interface.   Its a little frustrating that it doesn't reliably stay up so that I can access it when needed. Just looking for ideas from those with more experience.


Accepted Solutions
Veteran Member
Posts: 4,919
Registered: ‎09-26-2013
Kudos: 1341
Solutions: 351

Re: Unifi 4.6.0 Controller just stops running as a service

This is your issue:

 

[2015-01-24 18:41:15,787] <1> ERROR Http11Protocol - Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]

 

Something else is already using port 8080.  You need to either get rid of that, or change the UniFi port to something else.

 

Cheers,

Andrew

View solution in original post


All Replies
Veteran Member
Posts: 4,919
Registered: ‎09-26-2013
Kudos: 1341
Solutions: 351

Re: Unifi 4.6.0 Controller just stops running as a service

I'm running on Windows 2008 R2 and don't have any problems - UniFi service starts up with the machine and stays running until the machine is next restarted.

 

What do the event logs say for the service?  Also, what do you see in the controller log?

 

Cheers,

Andrew

Emerging Member
Posts: 58
Registered: ‎01-28-2015
Kudos: 20
Solutions: 3

Re: Unifi 4.6.0 Controller just stops running as a service

[ Edited ]

Sorry I run my controller on a Ubuntu host so I may not be much help.

 

Some thoughts: Is there anything else that could be conflicting with the port? Is IIS running on the server? Could there be a port conflict? Personally I would try and get some logs to get some information on what is causing the service to crash.

SuperUser
Posts: 15,107
Registered: ‎08-07-2008
Kudos: 7315
Solutions: 415
Contributions: 1

Re: Unifi 4.6.0 Controller just stops running as a service

Keep an eye on used memory. 2012 R2 has a lot of issues with mongodb.  mFi dies real fast on that system for the same reason. Unifi uses a lot less data so it may stay running longer.

Walks in, tells it like it is, walks out , milks a cow
Emerging Member
Posts: 42
Registered: ‎09-14-2014
Kudos: 2
Solutions: 1

Re: Unifi 4.6.0 Controller just stops running as a service

Thanks for the replies.  I can't see any reason a windows service wouldn't work under 2012 vs 2008.  Here are the logs.

 

Windows Event Log:

Faulting application name: UniFi.exe, version: 1.0.12.0, time stamp: 0x50f39c01
Faulting module name: jvm.dll, version: 25.31.0.7, time stamp: 0x549266a0
Exception code: 0xc0000005
Fault offset: 0x000ca9b6
Faulting process id: 0xc14
Faulting application start time: 0x01d0383ecdb91032
Faulting application path: C:\Users\sysadmin\Ubiquiti UniFi\bin\UniFi.exe
Faulting module path: C:\Program Files (x86)\Java\jre1.8.0_31\bin\client\jvm.dll
Report Id: 057dc083-a433-11e4-80ca-000c2949dd77
Faulting package full name:
Faulting package-relative application ID:

 

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: UniFi.exe
P2: 1.0.12.0
P3: 50f39c01
P4: jvm.dll
P5: 25.31.0.7
P6: 549266a0
P7: c0000005
P8: 000ca9b6
P9:
P10:

Attached files:
C:\Windows\Temp\WER1B94.tmp.appcompat.txt
C:\Windows\Temp\WER1BA5.tmp.WERInternalMetadata.xml
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_UniFi.exe_9dbbb01ce1147bdb597832b55dd3c1eeff0ba40_6a9cf2b3_cab_16c01bb2\memory.hdmp
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_UniFi.exe_9dbbb01ce1147bdb597832b55dd3c1eeff0ba40_6a9cf2b3_cab_16c01bb2\triagedump.dmp

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_UniFi.exe_9dbbb01ce1147bdb597832b55dd3c1eeff0ba40_6a9cf2b3_cab_16c01bb2

Analysis symbol:
Rechecking for solution: 0
Report Id: 057dc083-a433-11e4-80ca-000c2949dd77
Report Status: 4
Hashed bucket:
 

Emerging Member
Posts: 42
Registered: ‎09-14-2014
Kudos: 2
Solutions: 1

Re: Unifi 4.6.0 Controller just stops running as a service

 

UniFi Controller Error (at same time as service stop):

[2015-01-24 18:35:57,894] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:36:11,941] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:37:07,302] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:38:17,896] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:39:07,240] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:39:19,240] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:39:57,506] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:40:17,615] <launcher-ui> INFO  launcher - UniFi Controller (4.6.0) started.
[2015-01-24 18:40:45,459] <launcher> INFO  launcher - service_loop()
[2015-01-24 18:40:45,881] <UniFi> ERROR system - [exec] error, rc=-1, output=Already running
[2015-01-24 18:40:46,881] <UniFi> ERROR system - [exec] error, rc=-1, output=Already running
[2015-01-24 18:40:47,896] <UniFi> ERROR system - [exec] error, rc=-1, output=Already running
[2015-01-24 18:40:48,896] <UniFi> ERROR system - [exec] error, rc=-1, output=Already running
[2015-01-24 18:40:53,146] <launcher> INFO  launcher - service_loop()
[2015-01-24 18:41:15,787] <1> ERROR Http11Protocol - Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]
java.net.BindException: Address already in use: JVM_Bind <null>:8080
    at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:410)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
    at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:981)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:814)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
    at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
    at com.ubnt.net.do.Ò00000(Unknown Source)
    at com.ubnt.net.do.afterPropertiesSet(Unknown Source)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73)
    at com.ubnt.service.new.if(Unknown Source)
    at com.ubnt.ace.Launcher.main(Unknown Source)

 

 

MongoOD Error: (Seen over and over)

***** SERVER RESTARTED *****


Sat Jan 24 18:39:11 [initandlisten] MongoDB starting : pid=4972 port=27117 dbpath=C:\Users\sysadmin\Ubiquiti UniFi\data\db 64-bit host=DC02
Sat Jan 24 18:39:11 [initandlisten] db version v2.2.2, pdfile version 4.5
Sat Jan 24 18:39:11 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Sat Jan 24 18:39:11 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Sat Jan 24 18:39:11 [initandlisten] options: { bind_ip: "127.0.0.1", dbpath: "C:\Users\sysadmin\Ubiquiti UniFi\data\db", logappend: true, logpath: "logs/mongod.log", nohttpinterface: true, port: 27117 }
Sat Jan 24 18:39:11 [initandlisten] journal dir=C:/Users/sysadmin/Ubiquiti UniFi/data/db/journal
Sat Jan 24 18:39:11 [initandlisten] recover : no journal files present, no recovery needed
Sat Jan 24 18:39:11 [initandlisten] waiting for connections on port 27117
Sat Jan 24 18:39:14 [initandlisten] connection accepted from 127.0.0.1:57899 #1 (1 connection now open)
Sat Jan 24 18:39:14 [initandlisten] connection accepted from 127.0.0.1:57900 #2 (2 connections now open)
Sat Jan 24 18:39:14 [initandlisten] connection accepted from 127.0.0.1:57901 #3 (3 connections now open)
Sat Jan 24 18:39:14 [conn3] terminating, shutdown command received
Sat Jan 24 18:39:14 dbexit: shutdown called
Sat Jan 24 18:39:14 [conn3] shutdown: going to close listening sockets...
Sat Jan 24 18:39:14 [conn3] closing listening socket: 364
Sat Jan 24 18:39:14 [conn3] shutdown: going to flush diaglog...
Sat Jan 24 18:39:14 [conn3] shutdown: going to close sockets...
Sat Jan 24 18:39:14 [conn3] shutdown: waiting for fs preallocator...
Sat Jan 24 18:39:14 [conn3] shutdown: lock for final commit...
Sat Jan 24 18:39:14 [conn3] shutdown: final commit...
Sat Jan 24 18:39:14 [conn3] shutdown: closing all files...
Sat Jan 24 18:39:14 [conn3] closeAllFiles() finished
Sat Jan 24 18:39:14 [conn3] journalCleanup...
Sat Jan 24 18:39:14 [conn2] end connection 127.0.0.1:57900 (2 connections now open)
Sat Jan 24 18:39:14 [conn1] end connection 127.0.0.1:57899 (2 connections now open)
Sat Jan 24 18:39:14 [conn3] removeJournalFiles
Sat Jan 24 18:39:14 [conn3] shutdown: removing fs lock...
Sat Jan 24 18:39:14 dbexit: really exiting now


***** SERVER RESTARTED *****


Sat Jan 24 18:39:14 [initandlisten] MongoDB starting : pid=5152 port=27117 dbpath=C:\Users\sysadmin\Ubiquiti UniFi\data\db 64-bit host=DC02
Sat Jan 24 18:39:14 [initandlisten] db version v2.2.2, pdfile version 4.5
Sat Jan 24 18:39:14 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Sat Jan 24 18:39:14 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Sat Jan 24 18:39:14 [initandlisten] options: { bind_ip: "127.0.0.1", dbpath: "C:\Users\sysadmin\Ubiquiti UniFi\data\db", logappend: true, logpath: "logs/mongod.log", nohttpinterface: true, port: 27117 }
Sat Jan 24 18:39:14 [initandlisten] journal dir=C:/Users/sysadmin/Ubiquiti UniFi/data/db/journal
Sat Jan 24 18:39:14 [initandlisten] recover : no journal files present, no recovery needed
Sat Jan 24 18:39:14 [initandlisten] waiting for connections on port 27117
Sat Jan 24 18:39:17 [initandlisten] connection accepted from 127.0.0.1:57902 #1 (1 connection now open)
Sat Jan 24 18:39:17 [initandlisten] connection accepted from 127.0.0.1:57903 #2 (2 connections now open)
Sat Jan 24 18:39:17 [initandlisten] connection accepted from 127.0.0.1:57904 #3 (3 connections now open)
Sat Jan 24 18:39:17 [initandlisten] connection accepted from 127.0.0.1:57905 #4 (4 connections now open)
Sat Jan 24 18:39:17 [conn4] terminating, shutdown command received
Sat Jan 24 18:39:17 dbexit: shutdown called
Sat Jan 24 18:39:17 [conn4] shutdown: going to close listening sockets...
Sat Jan 24 18:39:17 [conn4] closing listening socket: 372
Sat Jan 24 18:39:17 [conn4] shutdown: going to flush diaglog...
Sat Jan 24 18:39:17 [conn4] shutdown: going to close sockets...
Sat Jan 24 18:39:17 [conn4] shutdown: waiting for fs preallocator...
Sat Jan 24 18:39:17 [conn4] shutdown: lock for final commit...
Sat Jan 24 18:39:17 [conn4] shutdown: final commit...
Sat Jan 24 18:39:17 [conn4] shutdown: closing all files...
Sat Jan 24 18:39:17 [conn3] end connection 127.0.0.1:57904 (3 connections now open)
Sat Jan 24 18:39:17 [conn4] closeAllFiles() finished
Sat Jan 24 18:39:17 [conn4] journalCleanup...
Sat Jan 24 18:39:17 [conn1] end connection 127.0.0.1:57902 (3 connections now open)
Sat Jan 24 18:39:17 [conn2] end connection 127.0.0.1:57903 (3 connections now open)
Sat Jan 24 18:39:17 [conn4] removeJournalFiles
Sat Jan 24 18:39:17 [conn4] shutdown: removing fs lock...
Sat Jan 24 18:39:17 dbexit: really exiting now


***** SERVER RESTARTED *****


Sat Jan 24 18:39:17 [initandlisten] MongoDB starting : pid=2976 port=27117 dbpath=C:\Users\sysadmin\Ubiquiti UniFi\data\db 64-bit host=DC02
Sat Jan 24 18:39:17 [initandlisten] db version v2.2.2, pdfile version 4.5
Sat Jan 24 18:39:17 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Sat Jan 24 18:39:17 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Sat Jan 24 18:39:17 [initandlisten] options: { bind_ip: "127.0.0.1", dbpath: "C:\Users\sysadmin\Ubiquiti UniFi\data\db", logappend: true, logpath: "logs/mongod.log", nohttpinterface: true, port: 27117 }
Sat Jan 24 18:39:17 [initandlisten] journal dir=C:/Users/sysadmin/Ubiquiti UniFi/data/db/journal
Sat Jan 24 18:39:17 [initandlisten] recover : no journal files present, no recovery needed
Sat Jan 24 18:39:17 [initandlisten] waiting for connections on port 27117
Sat Jan 24 18:39:20 [initandlisten] connection accepted from 127.0.0.1:57908 #1 (1 connection now open)
Sat Jan 24 18:39:20 [initandlisten] connection accepted from 127.0.0.1:57909 #2 (2 connections now open)
Sat Jan 24 18:39:20 [initandlisten] connection accepted from 127.0.0.1:57911 #3 (3 connections now open)
Sat Jan 24 18:39:20 [conn3] terminating, shutdown command received
Sat Jan 24 18:39:20 dbexit: shutdown called
Sat Jan 24 18:39:20 [conn3] shutdown: going to close listening sockets...
Sat Jan 24 18:39:20 [conn3] closing listening socket: 368
Sat Jan 24 18:39:20 [conn3] shutdown: going to flush diaglog...
Sat Jan 24 18:39:20 [conn3] shutdown: going to close sockets...
Sat Jan 24 18:39:20 [conn3] shutdown: waiting for fs preallocator...
Sat Jan 24 18:39:20 [conn3] shutdown: lock for final commit...
Sat Jan 24 18:39:20 [conn3] shutdown: final commit...
Sat Jan 24 18:39:20 [conn3] shutdown: closing all files...
Sat Jan 24 18:39:20 [conn3] closeAllFiles() finished
Sat Jan 24 18:39:20 [conn3] journalCleanup...
Sat Jan 24 18:39:20 [conn2] end connection 127.0.0.1:57909 (2 connections now open)
Sat Jan 24 18:39:20 [conn1] end connection 127.0.0.1:57908 (2 connections now open)
Sat Jan 24 18:39:20 [conn3] removeJournalFiles
Sat Jan 24 18:39:20 [conn3] shutdown: removing fs lock...
Sat Jan 24 18:39:20 dbexit: really exiting now


***** SERVER RESTARTED *****
 

Veteran Member
Posts: 4,919
Registered: ‎09-26-2013
Kudos: 1341
Solutions: 351

Re: Unifi 4.6.0 Controller just stops running as a service

This is your issue:

 

[2015-01-24 18:41:15,787] <1> ERROR Http11Protocol - Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]

 

Something else is already using port 8080.  You need to either get rid of that, or change the UniFi port to something else.

 

Cheers,

Andrew

Emerging Member
Posts: 50
Registered: ‎08-08-2013
Kudos: 9

Re: Unifi 4.6.0 Controller just stops running as a service

How do I run 4.6.6 as a service on Windows Server 2012?