Fix for UniFi Controller and version 5.1.1

04.07.2016 / Wakko / 48 Comments

Good news, Everyone! The problem

1

2

<db-server>ERROR system-[exec]error,rc=141

<db-server>INFO db-DbServer stopped

which affected many people is solved now.

By numerous samples, testing and compiling different versions of MongoDB, the good version was found, which stably works. Just build a package with a new version of the UniFi Controller 5.1.1. It is a separate package that you can’t upgrade the usual way. Transition to the following algorithm:

From the old version of Web interface, UniFi Controller save backup all the settings in a separate file;

From Synology Web interface stop service old version UniFi Controller;

Install the package with a new version of the UniFi Controller 5;

Launching a new version of the package Controller 5 UniFi;

Open the Web interface of the new version of Controller 5 UniFi;

Import the backup settings in the new version;

After you verify that everything works normally – you can delete the package with an older version of UniFi Controller.

I want to say thanks to all who supported me and kicked me by email. Thanks a lot for people are donated me. If someone wants to support – you can always do it here.
PS. Always make backups! Just yesterday my Synology DS713+ for backups turn on it beeper very loudly and blinking yellow LED. Web interface showed terrible, the status of RAID-0 was Crashed. It happened half an hour before the match Iceland – France. Apparently disappointed in advance when presenting the result of the meeting. But Iceland is to be congratulated! Well done!
PPS. The data is of course not injured, soon I will write how the situation was resolved.

I’ve briefly tried to run 5.1.1 but didn’t work either on my DS414. The reason for the RC=141 is that the Mongod is crashing. It starts, but almost immediately it crashes with segmentation fault.
At first it didn’t run at all (with the original mongod), so I changed to a different mongod I use for running Unifi 4.8.18 and got the segmentation fault.

Thank you for this usefull app. I use it for months on syno.
Today, I upgrade the app and forget to do a backup. And.. have now error rc 141 🙁
Is there a way to down grade the app to make a backup? Or maybe is there a way to save some files in SSH, reinstall the App and replace files to make it reworking again and make a backup?
I didn’t want to setup all my Wifi again.. :,(
Thank you

Maybe, but repos didn’t allow me to browse to find one. Did you have a link?
I find UniFi_Controller-x64-4.8.14-160223 on another repo, but when I try to manually install it, syno tell me I can’t because I have 4.8.20

Thanks for this useful package. I use it on a DS1815+ with DSM 6.01.
Used previous beta version 4.9.4 if I remember correct. Worked well, only errors during start of App. Did an backup and removed the package as I found your instructions AFTER I got some issues.
Here my points and hope that others can confirm and you hopefully fix it for future releases.
– After restore of beta 4.9.4 backup I could not start the package again, finally I did a complete new setup, OK maybe because of Beta to Beta move….. 🙂
– Have still the errors during startup of App, think same like others report here.
– App does not auto start after reboot of Synology, is this normal or can this be changed?
– Unifi IOS App does not longer find the controller, with version 4.9.4 this was working fine. Is this my mistake or a general issue?
– Got an some browsers warnings after visiting the controller site. As it looks on my Mac with Safari I can’t get the controller page visible, get always the warning that safari could not generate a safe connection. Currently it seems to work on Win10 Edge browser and also Firefox. Is there a solution to get it running again on Safari?

I’m interested in testing new beta v5.2.2 because of all the issues (App access, Safari….) I have.
Could you provide a new version please?
If not, is it possible to update the existing version 5.1.1 by myself via ssh?
If yes, how?
Thanks for your help.

New unifi beta v5.2.2 is available now.
Because of my issues, mentioned above, I would like to give it a try.
Do you intend to release a new installer soon?
If not, is it possible to update v5.1.1 via SSH commands?
If yes, how?

Hi, I’m having trouble accessing the controller recently updated to 5.1.1 beta. It seems to be a problem with the certificate. I get “ERR_SSL_VERSION_OR_CIPHER_MISMATCH” on Chrome 52.
Is there a way to fix it?
My setup is a Synology 415+ and unifi controller 5.1.1 beta.

I was struggling with the v5 of Unifi Controller on my DS414. I had a good running mongod for v4 (posted earlier), but didn’t get v5 running stable.
Couple of days ago I tested the latest release (5.2.7-160926) of Alex and couldn’t get it started. Next I replaced the mongod from the release with the version of Andreas. That works perfectly!! Now my Unifi Controller has been running for several days without issues.
Thanks Alex and Andreas for all the effort!

Hi Alex
got this error: ERR_SSL_OBSOLETE_CIPHER on 2 different synology 1815+ when i try to connect to web interface.
Found this:http://community.ubnt.com/t5/UniFi-Wireless/ERR-SSL-VERSION-OR-CIPHER-MISMATCH-after-upgrading-to-5-2-7/m-p/1681242
But if i add or change this line:
unifi.https.ciphers=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA

to system.properties file under /volume1/@appstore/Unifi Controller5/data and restart, the Unifi Controller crash with this exceptions:
UniFi Controller 5: Exception in thread “launcher” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘?00000’ defined in class com.ubnt.service.AppContext: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [com.ubnt.service.K.D com.ubnt.service.AppContext.?00000()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dbService’ defined in class com.ubnt.service.AppContext: Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1055) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) 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.(AnnotationConfigApplicationContext.java:73) at com.ubnt.service.new.interface(Unknown Source) at com.ubnt.ace.Launcher.main(Unknown Source) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [com.ubnt.service.K.D com.ubnt.service.AppContext.?00000()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dbService’ defined in class com.ubnt.service.AppContext: Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:586) … 14 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dbService’ defined in class com.ubnt.service.AppContext: Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) 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.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:305) at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6.dbService() at com.ubnt.service.AppContext.?00000(Unknown Source) at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6.CGLIB$?00000$0() at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6$$FastClassBySpringCGLIB$$9ad6de00.invoke() at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:293) at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6.?00000() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160) … 15 more Caused by: java.lang.NullPointerException at com.ubnt.service.OoOO.M.?O0000(Unknown Source) at com.ubnt.service.OoOO.M.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) … 34 more
9 minuti fa
UniFi Controller 5: Exception in thread “launcher” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘?00000’ defined in class com.ubnt.service.AppContext: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [com.ubnt.service.K.D com.ubnt.service.AppContext.?00000()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dbService’ defined in class com.ubnt.service.AppContext: Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1055) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:951) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) 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.(AnnotationConfigApplicationContext.java:73) at com.ubnt.service.new.interface(Unknown Source) at com.ubnt.ace.Launcher.main(Unknown Source) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [com.ubnt.service.K.D com.ubnt.service.AppContext.?00000()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dbService’ defined in class com.ubnt.service.AppContext: Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:586) … 14 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dbService’ defined in class com.ubnt.service.AppContext: Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) 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.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:305) at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6.dbService() at com.ubnt.service.AppContext.?00000(Unknown Source) at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6.CGLIB$?00000$0() at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6$$FastClassBySpringCGLIB$$9ad6de00.invoke() at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:293) at com.ubnt.service.AppContext$$EnhancerBySpringCGLIB$$b566cb6.?00000() at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160) … 15 more Caused by: java.lang.NullPointerException at com.ubnt.service.OoOO.M.?O0000(Unknown Source) at com.ubnt.service.OoOO.M.afterPropertiesSet(Unknown Source) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571) at org.springframework.beans.factory.support.

Hi, running Chrome Version 57.0.2987.110 (64-bit) on Windows10 and when trying to access the Unifi Console it gives me a ERR_SSL_OBSOLETE_CIPHER … Firefox is ok and IE as well, but IE doesn’t supports the GUI elements as such (:-(( Could you please check the build in webserver on it’s cipher spec ??

just add
unifi.https.ciphers=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA

to system.properties file under /volume1/@appstore/Unifi Controller5/data and restart, the Unifi Controller.

Iam facing the same issue .. cant connect to the controller with quite unspecific error msg in browser. In the past I could get around by using IE7, but since the last update 5.5.15 none of my browsers work. Also adding the config line unifi.https.ciphers seems to not take any effect so far … anyone else with a proper solution ?? Why isnt a SSL key issue not already addressed in the original package??

Adding unifi.https.ciphers to system.properties doesn’t fix the issue on my system so … still no connection established in neither Chrome, FireFox or IE … does the same issue exist with the regular controller software as well or is this just an issue here. Any further help appreciated !!