Unifi error system exec error rc 1

Поиском пользовался, гуглил, яндексил и т.д. нет решений.Помогите кто чем может (Server taking too long to start...) просто подвис в один день и при перезапуске не стартует. Да и обычное время ну оооооооооооооочень долго стартовал Учётка англоязычная. Пробовал переносить на другой диск - эффект...

======================================================================
[2018-03-02 16:45:26,611] <launcher> INFO system — UniFi 5.6.30 (build atag_5.6.30_10266 — release) is started
[2018-03-02 16:45:26,611] <launcher> INFO system — ======================================================================
[2018-03-02 16:45:26,619] <launcher> INFO system — BASE dir:C:Ubiquiti UniFi
[2018-03-02 16:45:27,631] <launcher> INFO system — Current System IP: 192.168.2.200
[2018-03-02 16:45:27,636] <launcher> INFO system — Hostname: ATS
[2018-03-02 16:45:39,074] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:39,347] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:39,427] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:45:43,726] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:44,053] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:44,054] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:45:48,275] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:48,427] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:48,428] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:45:52,562] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:52,692] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:52,693] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:45:56,821] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:56,998] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:45:56,999] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:46:01,123] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:01,246] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:01,246] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:46:05,393] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:05,581] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:05,581] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:46:09,713] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:09,871] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:09,872] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:46:13,999] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:14,167] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:14,168] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:46:18,316] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:18,459] <db-server> ERROR system — [exec] error, rc=100
[2018-03-02 16:46:18,460] <db-server> WARN db — DbServer not shutdown cleanly and need repairing on next startup
[2018-03-02 16:47:37,630] <launcher> WARN db — QUERY-LOWRATIO: query=User{ «use_fixedip» : true} explain={ «allPlans» : [ { «cursor» : «BasicCursor» , «indexBounds» : { } , «n» : 0 , «nscanned» : 3022 , «nscannedObjects» : 3022}] , «cursor» : «BasicCursor» , «indexBounds» : { } , «indexOnly» : false , «isMultiKey» : false , «millis» : 4 , «n» : 0 , «nChunkSkips» : 0 , «nYields» : 0 , «nscanned» : 3022 , «nscannedAllPlans» : 3022 , «nscannedObjects» : 3022 , «nscannedObjectsAllPlans» : 3022 , «scanAndOrder» : false , «server» : «ATS:27117»}
[2018-03-02 16:47:39,764] <launcher> WARN system — cannot load native lib — ubnt_webrtc_jni
[2018-03-02 16:47:40,541] <launcher-ui> INFO launcher — UniFi Controller (5.6.30) started.
[2018-03-02 16:58:11,168] <webapi-141> WARN db — QUERY-SLOW: query=Rogue{ «last_seen» : { «$gt» : 1519905490} , «site_id» : «5959f69585194c787bfff64e»} explain={ «allPlans» : [ { «cursor» : «BtreeCursor site_id_1» , «indexBounds» : { «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]} , «n» : 0 , «nscanned» : 393 , «nscannedObjects» : 393} , { «cursor» : «BtreeCursor site_id_1_bssid_1» , «indexBounds» : { «bssid» : [ [ { «$minElement» : 1} , { «$maxElement» : 1}]] , «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]} , «n» : 14 , «nscanned» : 393 , «nscannedObjects» : 393} , { «cursor» : «BtreeCursor site_id_1_ap_mac_1» , «indexBounds» : { «ap_mac» : [ [ { «$minElement» : 1} , { «$maxElement» : 1}]] , «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]} , «n» : 0 , «nscanned» : 393 , «nscannedObjects» : 393} , { «cursor» : «BtreeCursor site_id_1_last_seen_1» , «indexBounds» : { «last_seen» : [ [ 1519905490 , 1.7976931348623157E308]] , «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]} , «n» : 392 , «nscanned» : 392 , «nscannedObjects» : 392} , { «cursor» : «BtreeCursor site_id_1_rssi_1 reverse» , «indexBounds» : { «rssi» : [ [ { «$maxElement» : 1} , { «$minElement» : 1}]] , «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]} , «n» : 14 , «nscanned» : 392 , «nscannedObjects» : 392} , { «cursor» : «BasicCursor» , «indexBounds» : { } , «n» : 0 , «nscanned» : 392 , «nscannedObjects» : 392}] , «cursor» : «BtreeCursor site_id_1_last_seen_1» , «indexBounds» : { «last_seen» : [ [ 1519905490 , 1.7976931348623157E308]] , «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]} , «indexOnly» : false , «isMultiKey» : false , «millis» : 229 , «n» : 392 , «nChunkSkips» : 0 , «nYields» : 0 , «nscanned» : 392 , «nscannedAllPlans» : 2355 , «nscannedObjects» : 392 , «nscannedObjectsAllPlans» : 2351 , «oldPlan» : { «cursor» : «BtreeCursor site_id_1_last_seen_1» , «indexBounds» : { «last_seen» : [ [ 1519905490 , 1.7976931348623157E308]] , «site_id» : [ [ «5959f69585194c787bfff64e» , «5959f69585194c787bfff64e»]]}} , «scanAndOrder» : true , «server» : «ATS:27117»}
[2018-03-03 21:59:59,039] <launcher-monitor> ERROR launcher — Server taking too long to start…
[2018-03-03 21:59:59,166] <launcher-ui> ERROR launcher — Start-up failed.
[2018-03-05 15:43:27,542] <ws-notify> WARN api — Error when writing to websocketjava.net.SocketException: Software caused connection abort: socket write error

As mentioned in My WiFi Setup with Ubiquiti Networks UAP-AC-PRO I run the Unify Controller software on a Raspberry Pi 3. There is a ready-made package available for Debian and Ubuntu Linux, that can easily be used for this and I have been doing so for more than a year.

Just a yesterday, though, I broke things by overdoing it a bit with the removal of unneeded software from the Raspberry Pi. Through some “chain” the Unifi Controller had been removed and after re-installation it did not work anymore. Instead I saw a constant CPU utilization of an entire core by Java and also errors in /var/log/unifi/server.log :

[2017-12-26 13:07:04,783] <launcher> INFO system - *** Running for the first time, creating identity ***
[2017-12-26 13:07:04,791] <launcher> INFO system - UUID: yyyyyyy-yyyy-yyyy-yyyyyy-yyyyyyy
[2017-12-26 13:07:04,817] <launcher> INFO system - ======================================================================
[2017-12-26 13:07:04,819] <launcher> INFO system - UniFi 5.6.26 (build atag_5.6.26_10236 - release) is started
[2017-12-26 13:07:04,819] <launcher> INFO system - ======================================================================
[2017-12-26 13:07:04,867] <launcher> INFO system - BASE dir:/usr/lib/unifi
[2017-12-26 13:07:05,057] <launcher> INFO system - Current System IP: xxx.xxx.xxx.xxx
[2017-12-26 13:07:05,059] <launcher> INFO system - Hostname: zzzz
[2017-12-26 13:07:05,071] <launcher> INFO system - Valid keystore is missing. Generating one ...
[2017-12-26 13:07:05,072] <launcher> INFO system - Generating Certificate[UniFi]... please wait...
[2017-12-26 13:08:33,574] <launcher> INFO system - Certificate[UniFi] generated!
[2017-12-26 13:08:53,004] <UniFi> ERROR system - [exec] error, rc=1

The last couple of lines were showing up repeatedly, so obviously the system tried to restart over and over again. When you search the Internet for this problem, you will find out that you are not alone. Most solutions address available memory and not all people succeed with the various approaches to increase it (typically by removing memory from graphics and increasing swap space).

What I realized was that most discussions were for older versions and a recurring theme was that things changed between minor versions. So something that had worked for v5.6.19 did not necessarily work for v5.6.22 and vice versa. Also, changes to how Java was dealt with were mentioned quite often. Running Java-based applications on Linux can be somewhat delicate, so I do not blame the folks at Ubiquity Networks for that.

This was when I realized that the JVM on my system had changed. Before the accidental cleanup I had used the Oracle 8 JVM that gets installed via the Debian package oracle-java8-jdk. So I re-installed the latter and configured it as the default JVM via

sudo apt-get install oracle-java8-jdk
sudo update-alternatives --config java

This solved my problems instantly and things are up and running again.

Router.ru

Router.ru

Router.ru

Router.ru

    • Заказать звонок

  • Москва, ул. Бакунинская, 84с21, Бизнес-центр ИТКОЛ

  • Пн — Пт: с 9:00 до 18:00

    Cб: с 10:00 до 18:00

    Вс: выходной

Сетевые камеры<br>D-Link сетевые камеры

Wi-Fi точка доступа<br>D-Link DIR-853

Интернет-центр
Keenetic Giga KN-1011

Гигабитный с двухдиапазонным Mesh Wi-Fi 6 AX1800, усилителем сигнала и анализатором спектра Wi-Fi, 5-портовым Smart-коммутатором, портами SFP, USB 3.0 и 2.

Интернет-центр<br>Keenetic Giga KN-1011

В наличии

Арт. LBE-5AC-GEN2

В наличии

Арт. PBE-5AC-GEN2

В наличии

Арт. PBE-5AC-GEN2-5

В наличии

Арт. PBE-M2-400

В наличии

Арт. PBE-M5-300

В наличии

Арт. PBE-M5-400

В наличии

Арт. UAP-AC-HD-5

Обзоры товаров

/

29 августа 2022

Обзоры товаров

/

26 августа 2022

Обзоры товаров

/

22 августа 2022

Обзоры товаров

/

18 августа 2022

Обзоры товаров

/

16 августа 2022

I have enough disk space and my user profile name doesn’t have accents or other characters, just a-z letter. Also Java is installed and updated. (Windows 10)

server logs:

[2018-07-07 02:37:23,446] <UniFi> ERROR system - [exec] error, rc=1
[2018-07-07 02:37:31,772] <launcher> INFO  system - ======================================================================
[2018-07-07 02:37:31,773] <launcher> INFO  system - UniFi 5.6.39 (build atag_5.6.39_10349 - release) is started
[2018-07-07 02:37:31,773] <launcher> INFO  system - ======================================================================
[2018-07-07 02:37:31,775] <launcher> INFO  system - BASE dir:C:UsersChariosUbiquiti UniFi
[2018-07-07 02:37:31,815] <launcher> INFO  system - Current System IP: 192.168.1.10
[2018-07-07 02:37:31,817] <launcher> INFO  system - Hostname: CHARIOS-PC
[2018-07-07 02:37:32,776] <launcher> INFO  db     - waiting for db connection...
[2018-07-07 02:37:33,276] <launcher> INFO  db     - Connecting to mongodb://127.0.0.1:27117
[2018-07-07 02:37:34,900] <launcher> INFO  db     - Connecting to mongodb://127.0.0.1:27117
[2018-07-07 02:37:34,975] <db-server> INFO  db     - DbServer stopped
[2018-07-07 02:37:49,455] <localhost-startStop-2> ERROR WebappClassLoaderBase - The web application [] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
[2018-07-07 02:37:49,457] <localhost-startStop-2> ERROR WebappClassLoaderBase - The web application [] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
[2018-07-07 02:37:49,458] <localhost-startStop-2> ERROR WebappClassLoaderBase - The web application [] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
[2018-07-07 02:37:49,459] <localhost-startStop-2> ERROR WebappClassLoaderBase - The web application [] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
[2018-07-07 02:37:49,460] <localhost-startStop-2> ERROR WebappClassLoaderBase - The web application [] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
[2018-07-07 02:37:49,563] <UniFi> ERROR system - [exec] error, rc=1

mongod logs:

Sat Jul 07 02:37:33.943 [initandlisten] MongoDB starting : pid=12332 port=27117 dbpath=C:UsersChariosUbiquiti UniFidatadb 64-bit host=CHARIOS-PC
Sat Jul 07 02:37:33.944 [initandlisten] db version v2.4.14
Sat Jul 07 02:37:33.944 [initandlisten] git version: 05bebf9ab15511a71bfbded684bb226014c0a553
Sat Jul 07 02:37:33.944 [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 Jul 07 02:37:33.944 [initandlisten] allocator: system
Sat Jul 07 02:37:33.944 [initandlisten] options: { bind_ip: "127.0.0.1", dbpath: "C:UsersChariosUbiquiti UniFidatadb", logappend: true, logpath: "C:UsersChariosUbiquiti UniFilogsmongod.log", nohttpinterface: true, port: 27117 }
Sat Jul 07 02:37:33.950 [initandlisten] journal dir=C:UsersChariosUbiquiti UniFidatadbjournal
Sat Jul 07 02:37:33.950 [initandlisten] recover : no journal files present, no recovery needed
Sat Jul 07 02:37:34.018 [initandlisten] waiting for connections on port 27117
Sat Jul 07 02:37:34.285 [initandlisten] connection accepted from 127.0.0.1:51042 #1 (1 connection now open)
Sat Jul 07 02:37:34.299 [initandlisten] connection accepted from 127.0.0.1:51043 #2 (2 connections now open)
Sat Jul 07 02:37:34.901 [initandlisten] connection accepted from 127.0.0.1:51044 #3 (3 connections now open)
Sat Jul 07 02:37:34.904 [initandlisten] connection accepted from 127.0.0.1:51045 #4 (4 connections now open)
Sat Jul 07 02:37:34.952 [initandlisten] connection accepted from 127.0.0.1:51046 #5 (5 connections now open)
Sat Jul 07 02:37:34.955 [initandlisten] connection accepted from 127.0.0.1:51047 #6 (6 connections now open)
Sat Jul 07 02:37:34.956 [conn6] terminating, shutdown command received
Sat Jul 07 02:37:34.956 dbexit: shutdown called
Sat Jul 07 02:37:34.956 [conn6] shutdown: going to close listening sockets...
Sat Jul 07 02:37:34.956 [conn6] closing listening socket: 600
Sat Jul 07 02:37:34.956 [conn6] shutdown: going to flush diaglog...
Sat Jul 07 02:37:34.956 [conn6] shutdown: going to close sockets...
Sat Jul 07 02:37:34.956 [conn6] shutdown: waiting for fs preallocator...
Sat Jul 07 02:37:34.956 [conn6] shutdown: lock for final commit...
Sat Jul 07 02:37:34.956 [conn6] shutdown: final commit...
Sat Jul 07 02:37:34.956 [conn2] end connection 127.0.0.1:51043 (5 connections now open)
Sat Jul 07 02:37:34.956 [conn1] end connection 127.0.0.1:51042 (5 connections now open)
Sat Jul 07 02:37:34.956 [conn4] end connection 127.0.0.1:51045 (5 connections now open)
Sat Jul 07 02:37:34.956 [conn5] end connection 127.0.0.1:51046 (5 connections now open)
Sat Jul 07 02:37:34.956 [conn3] end connection 127.0.0.1:51044 (4 connections now open)
Sat Jul 07 02:37:34.962 [conn6] shutdown: closing all files...
Sat Jul 07 02:37:34.962 [conn6] closeAllFiles() finished
Sat Jul 07 02:37:34.962 [conn6] journalCleanup...
Sat Jul 07 02:37:34.966 [conn6] removeJournalFiles
Sat Jul 07 02:37:34.966 [conn6] shutdown: removing fs lock...
Sat Jul 07 02:37:34.966 dbexit: really exiting now
  • Board index Software ARMv7h

Unifi controller not starting, mongodb errors

Unifi controller not starting, mongodb errors

I have Arch Arm installed on a raspberry pi 2. I am trying to setup the Unifi controller to manage some Unifi AC access points. I installed the unifi package via pacman. The unifi controller will not start. I have the following output in /var/log/unifi/server.log:

Code: Select all
[2016-01-16 01:04:11,673] <db-server> ERROR system - [exec] error, rc=100, output=2016-01-16T01:04:11.416-0600 I CONTROL  [main] 2016-01-16T01:04:11.417-0600 W CONTROL  [main] 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.2016-01-16T01:04:11.417-0600 I CONTROL  [main]
[2016-01-16 01:04:11,674] <db-server> INFO  db     - DbServer stopped
[2016-01-16 01:04:16,971] <db-server> ERROR system - [exec] error, rc=100, output=2016-01-16T01:04:16.773-0600 I CONTROL  [main] 2016-01-16T01:04:16.773-0600 W CONTROL  [main] 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.2016-01-16T01:04:16.773-0600 I CONTROL  [main]
[2016-01-16 01:04:16,971] <db-server> INFO  db     - DbServer stopped

And this in /var/log/unifi/mongod.log:

Code: Select all
2016-01-16T01:04:16.777-0600 I CONTROL  [main] ***** SERVER RESTARTED *****
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] MongoDB starting : pid=24989 port=27117 dbpath=/usr/lib/unifi/data/db 32-bit host=pLAN9-Server1
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] db version v3.2.0
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2e 3 Dec 2015
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] allocator: tcmalloc
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] modules: none
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten] build environment:
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten]     distarch: arm
2016-01-16T01:04:16.817-0600 I CONTROL  [initandlisten]     target_arch: arm
2016-01-16T01:04:16.818-0600 I CONTROL  [initandlisten] options: { net: { bindIp: "127.0.0.1", http: { enabled: false }, port: 27117 }, storage: { dbPath: "/usr/lib/unifi/data/db" }, systemLog: { destination: "file", logAppend: true, path: "logs/mongod.log" } }
2016-01-16T01:04:16.964-0600 I STORAGE  [initandlisten] exception in initAndListen: 28663 Cannot start server. The default storage engine 'wiredTiger' is not available with this build of mongod. Please specify a different storage engine explicitly, e.g. --storageEngine=mmapv1., terminating
2016-01-16T01:04:16.964-0600 I CONTROL  [initandlisten] dbexit:  rc: 100

Any ideas what is wrong? I could not find any configuration guide for the Unifi service that was specific to Arch Arm…..

trainwreck
 
Posts: 3
Joined: Sat Jan 16, 2016 7:08 am

Re: Unifi controller not starting, mongodb errors

Postby WarheadsSE » Mon Jan 18, 2016 4:16 pm

Code: Select all
The default storage engine 'wiredTiger' is not available with this build of mongod. Please specify a different storage engine explicitly, e.g. --storageEngine=mmapv1., terminating

Please read your output.

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!

WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unifi controller not starting, mongodb errors

Postby trainwreck » Mon Jan 18, 2016 6:25 pm

Yes, and I tried adding «storageEngine = mmapv1» to /etc/mongodb.conf, AND also tried modifying the mongodb systemd service file to add «—storageEngine=mmapv1» and then doing a «systemctl daemon-reload». Neither of these worked; I am still getting the same error messages.

trainwreck
 
Posts: 3
Joined: Sat Jan 16, 2016 7:08 am

Re: Unifi controller not starting, mongodb errors

Postby WarheadsSE » Mon Jan 18, 2016 6:47 pm

Is Unifi running mongodb as a systemd service?

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!

WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unifi controller not starting, mongodb errors

Postby trainwreck » Mon Jan 18, 2016 11:05 pm

I’m not sure, how would I be able to tell? (I kind of don’t think it is, since I changed the systemd unit file & the same error remains).

trainwreck
 
Posts: 3
Joined: Sat Jan 16, 2016 7:08 am

Re: Unifi controller not starting, mongodb errors

Postby WarheadsSE » Tue Jan 19, 2016 4:33 pm

You’d need to locate how it is making the call to start mongo. This should be viewable from an strace, or htop with tree view.

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!

WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Unifi controller not starting, mongodb errors

Postby thantos » Sat Feb 27, 2016 6:49 am

You can try adding the below to /usr/lib/unifi/data/system.properties:

Code: Select all
unifi.db.extraargs=--storageEngine mmapv1

This mongodb is started by the unifi controller.

thantos
 
Posts: 1
Joined: Sat Feb 27, 2016 6:44 am


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 2 guests

After upgrading Unifi on a Debian server running a Ubiquiti Unifi controller, I ran into an issue where the web interface would not load. After poking through the logs I found that the issue appeared to be with MongoDB.

In the server log file located at /var/log/unifi/server.log for my install I found the following messages:

[2018-04-01 18:58:40,167] <db-server> INFO  db     - DbServer stopped
[2018-04-01 18:58:44,188] <db-server> ERROR system - [exec] error, rc=2

Database Repair

The first thing I suspected was corruption for the MongoDB data – the server had previously did not have a clean shutdown (the filesystem became read only). To repair the MongoDB database for Unifi you can execute MongoDB like this:

mongod --dbpath /usr/lib/unifi/data/db --port 27117 --repair

After the repair, the permissions on the MongoDB database files should be updated to make sure they are owned by the Unifi user:

chown -R unifi. /usr/lib/unifi/data/db

After the repair, MongoDB was still failing to start.

Debugging MongoDB startup

For my install of Unifi, when MongoDB starts up it executes MongoDB like this:

/usr/lib/unifi/bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --unixSocketPrefix /usr/lib/unifi/run --logappend --logpath /usr/lib/unifi/logs/mongod.log --nohttpinterface --bind_ip 127.0.0.1

/usr/lib/unifi/bin/mongod is a symlink to /usr/bin/mongod.

To get the startup options I replaced the /usr/lib/unifi/bin/mongod file with the following script:

#!/bin/bash
echo $* > /tmp/mongod_startup
exec /usr/bin/mongod $*

After replacing the file make sure it is executable with chmod +x /usr/lib/unifi/bin/mongod. Make sure the controller is running, it should then execute the script and you can review the startup options in the file /tmp/mongod_startup.

The problem

Once I had the startup command for MongoDB I attempted to run it to see what was happening. It turns out the --nohttpinterface flag was causing the problem – MongoDB was throwing an error like this:

Error parsing command line: unrecognised option '--nohttpinterface'

The fix

To fix it I replaced the MongoDB symlink that the controller executes so that the option that does not work is removed. Since the default file is a symlink its safe to remove it (to restore you can just create the symlink again):

rm -f /usr/lib/unifi/bin/mongod

You can then create the file /usr/lib/unifi/bin/mongod with the following content:

#!/bin/bash
exec /usr/bin/mongod ${*//--nohttpinterface/}

After creating the file, make sure it is executable (chmod +x /usr/lib/unifi/bin/mongod). Start the controller service again if it is not running already and it should now be working.

27.01.2016 / Wakko / 67 Comments

Due to the changes in the latest beta versions of UniFi Controller and I want to give some guidance for customers:

  1. If you have updated the Synology DSM to version 6.0-nothing to worry about. And even good! You can install 64-bit Java, 7 or even 8-series. Let me remind you that the official JavaManager for DSM 5.0 only supports 32-bit Java.
  2. If you are trying to run the UniFi Controller and you have a file /volume1/@appstore/UniFi Controller/logs/server.log the following errors occur:
    [2016-01-22 00:14:28,273] <db-server> ERROR system - [exec] error, rc=141
    [2016-01-22 00:14:28,273] <db-server> INFO  db     - DbServer stopped
    [2016-01-22 00:14:33,280] <db-server> ERROR system - [exec] error, rc=141
    [2016-01-22 00:14:33,281] <db-server> INFO  db     - DbServer stopped
    [2016-01-22 00:14:38,291] <db-server> ERROR system - [exec] error, rc=141
    [2016-01-22 00:14:38,292] <db-server> INFO  db     - DbServer stopped

    It’s not dead! Ubiquiti team aware of this problem and will fix it soon (at least so they wrote to me). For my part, I did everything I could – rewrite the startup script of UniFi Controller, increased the timeout to run. If this do not help, UniFi Controller does not start and logs only these errors, try to change the Java version, as practice shows some users – it helps.
    2016-07-04 Update: Please, read new information.

  3. If you installed the 64-bit Java and at startup UniFi Controller and you see the following warning:
    Java HotSpot(™) 64-Bit Server VM warning: You have loaded library /volume1/@appstore/UniFi Controller/lib/native/Linux/amd64/libubnt_webrtc_jni.so which might have disabled stack guard. The VM will try to fix the stack guard now. It’s highly recommended that you fix the library with ‘execstack -c’, or link it with ‘-z noexecstack’.
    Nothing to worry about. As answered in the Ubiquiti – controller will work even if you Were at all will not be started.
  4. Same girl from Ubiquiti said they plan to buy a test of Synology to test a UniFi Controller and the Synology. The good news. 🙂
  5. If you are using ARM processor Synology is sad. Have to contend with a number of glitches. Will list several restrictions:
    • The MongoDB server to Synology with ARM processor is 32-bit, it imposes a number of restrictions;
    • The MongoDB server to Synology with ARM processor is enough of the old version, and the server periodically freeze that halts and the controller itself;
    • Java on Synology with ARM processor also works not always correctly.

    As soon as we have on sale in Russia appears UniFi Cloud Key – I’ll try to order it. This device is using ARM architecture too so that you can be any components for Synology to take with him. If you have the opportunity to provide this device for test – I would be happy to.

You could support our repository here.


Понравилась статья? Поделить с друзьями:
  • Unifi api error
  • Unidrive m700 ошибки
  • Unidentified network как исправить windows 10
  • Unidentified image error
  • Unicum ошибка триаков