mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 90 forks source link

MyController on OrangePiZero after a while stops working #447

Closed wanvo closed 6 years ago

wanvo commented 6 years ago

Hi Jeeva. MyController installed on OrangePiZero. After some reboots, I can not access the frontend MyController. I tried different boards OrangePiZero, different SD Cards, different version Linux(Debian and Ubuntu), different version MyController(1.2.0 Final and 1.3.0 SNAPSHOT). When I start ./start.sh I get a normal response about starting. But at https:\\MyControllerIP:8443 I do not get any reaction. Reinstalling Java and MyController do not eliminate the problem. Only the complete reinstallation of Linux solves the problem,but only for a while. Attaching a file mycontroller.log. mycontroller.zip

mycontroller.log

jkandasa commented 6 years ago

@wanvo Thanks to reporting this issue, for some reason dbmap persistent store corrupted.

2018-04-27 22:17:44,738 WARN [main] [io.moquette.persistence.mapdb.MapDBPersistentStore:78] Using existing MapDB store file. Path=../conf/persistent_stores/moquette/moquette_store.mapdb
Exception in thread "main" java.lang.AssertionError: data were not fully read, check your serializer 
    at org.mapdb.Store.deserialize(Store.java:299)
    at org.mapdb.StoreDirect.get2(StoreDirect.java:486)
    at org.mapdb.StoreWAL.get2(StoreWAL.java:336)
    at org.mapdb.StoreWAL.get(StoreWAL.java:320)
    at org.mapdb.Caches$HashTable.get(Caches.java:246)
    at org.mapdb.HTreeMap$HashIterator.findNextLinkedNodeRecur(HTreeMap.java:1075)
    at org.mapdb.HTreeMap$HashIterator.findNextLinkedNode(HTreeMap.java:1054)
    at org.mapdb.HTreeMap$HashIterator.<init>(HTreeMap.java:978)
    at org.mapdb.HTreeMap$KeyIterator.<init>(HTreeMap.java:1116)
    at org.mapdb.HTreeMap$KeySet.iterator(HTreeMap.java:818)
    at io.moquette.persistence.mapdb.MapDBSessionsStore.listAllSubscriptions(MapDBSessionsStore.java:111)
    at io.moquette.spi.impl.subscriptions.SubscriptionsDirectory.init(SubscriptionsDirectory.java:98)
    at io.moquette.spi.impl.ProtocolProcessorBootstrapper.init(ProtocolProcessorBootstrapper.java:122)
    at io.moquette.server.Server.startServer(Server.java:182)
    at io.moquette.server.Server.startServer(Server.java:162)
    at io.moquette.server.Server.startServer(Server.java:146)
    at org.mycontroller.standalone.mqttbroker.MoquetteMqttBroker.start(MoquetteMqttBroker.java:52)
    at org.mycontroller.standalone.StartApp.startServices(StartApp.java:291)
    at org.mycontroller.standalone.StartApp.startMycontroller(StartApp.java:112)
    at org.mycontroller.standalone.StartApp.main(StartApp.java:98)
Exception in thread "MyController.org Shutdown-Hook" java.lang.NullPointerException
    at Acme.Serve.Serve.stopBackground(Serve.java:684)
    at org.jboss.resteasy.plugins.server.tjws.TJWSServletServer.stop(TJWSServletServer.java:184)
    at org.mycontroller.standalone.StartApp.stopHTTPWebServer(StartApp.java:226)
    at org.mycontroller.standalone.StartApp.stopServices(StartApp.java:329)
    at org.mycontroller.standalone.AppShutdownHook$1.run(AppShutdownHook.java:34)
jkandasa commented 6 years ago

@wanvo I have added an option clean dbmap persistent store clear job on start up. I hope this will address your issue. Kindly check it on SNAPSHOT version and report back if you face this issue.

wanvo commented 6 years ago

@jkandasa thank you, MyController works well now. However there was another problem: sometimes does not start Linux after the command "reboot". If you do reset the power, always starts. But this bug is probably not related to the activities of MyController.

Avamander commented 5 years ago

Just commenting in case anyone else has encounters this stacktrace:

Exception in thread "MyController.org Shutdown-Hook" java.lang.NullPointerException
        at Acme.Serve.Serve.stopBackground(Serve.java:684)
        at org.jboss.resteasy.plugins.server.tjws.TJWSServletServer.stop(TJWSServletServer.java:184)
        at org.mycontroller.standalone.StartApp.stopHTTPWebServer(StartApp.java:228)
        at org.mycontroller.standalone.StartApp.stopServices(StartApp.java:339)
        at org.mycontroller.standalone.AppShutdownHook$1.run(AppShutdownHook.java:34)

The logs show that the issue is that mycontroller doesn't have permissions to create the DB file.