• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    MyController wont load sensors page. Log reports DB error

    Scheduled Pinned Locked Moved Troubleshooting
    5 Posts 3 Posters 423 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pillarama
      last edited by pillarama

      Hi, hoping someone can help me here, tonight my MyController (1.5.0 running in an LXC container for many months) stopped loading the Sensors page. It sits there forever with the Loading message and never loads. As far as I can see everything else in the interface is working fine still. The log shows an ominous database error I don't know how to resolve making me think it might be DB corruption (unsure how though - it's a VM on a good server and hasn't run out of disk space...). I've had a quick play around with the H2 command line tools but I really know nothing about H2 database. I thought I managed to open the DB to have a look but was met with this error after entering username and password:

      SQL Exception: General error: "java.lang.IllegalStateException: Unable to read the page at position 803899680311408395 [1.4.200/6]" [50000-200]
      

      The MyController log shows this error as mentioned above when clicking on the Sensors page link:

      [Mon Mar 29 00:07:33 ACDT 2021] Unexpected problem running servlet
      org.jboss.resteasy.spi.UnhandledException: RESTEASY003770: Response is committed, can't handle exception
              at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:167)
              at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:471)
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:415)
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
              at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328)
              at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282)
              at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054)
              at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.mycontroller.standalone.api.jaxrs.model.QueryResponse["data"]->java.util.ArrayList[0]->org.mycontroller.standalone.db.tables.Sensor["variables"])
              at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:210)
              at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:177)
              at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:199)
              at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:683)
              at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157)
              at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
              at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
              at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
              at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693)
              at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675)
              at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157)
              at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130)
              at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1387)
              at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:889)
              at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.writeTo(ResteasyJackson2Provider.java:207)
              at org.mycontroller.standalone.api.jaxrs.mixins.McJacksonJson2Provider.writeTo(McJacksonJson2Provider.java:120)
              at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.writeTo(AbstractWriterInterceptorContext.java:131)
              at org.jboss.resteasy.core.interception.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:60)
              at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:120)
              at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.aroundWriteTo(GZIPEncodingInterceptor.java:100)
              at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:124)
              at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:98)
              at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:466)
              ... 12 more
      Caused by: java.lang.NullPointerException
              at org.mycontroller.standalone.model.ResourceModel.<init>(ResourceModel.java:119)
              at org.mycontroller.standalone.api.jaxrs.model.SensorVariableJson.<init>(SensorVariableJson.java:86)
              at org.mycontroller.standalone.api.jaxrs.mixins.serializers.SensorVariablesSerializer.serialize(SensorVariablesSerializer.java:52)
              at org.mycontroller.standalone.api.jaxrs.mixins.serializers.SensorVariablesSerializer.serialize(SensorVariablesSerializer.java:38)
              at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693)
              at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675)
              ... 31 more
      
      [Mon Mar 29 00:07:33 ACDT 2021] Unexpected problem running servlet: org.jboss.resteasy.spi.UnhandledException: RESTEASY003770: Response is committed, can't handle exception
      

      I don't know exactly when this issue began but I have made a lot new of changes today and I would rather not loose them to a backup of the VM / database so if there is any way to repair this that would be my first preference - even if it means wiping the sensors DB table or something - loosing the sensors list would not be a big loss.

      Anyone have any ideas?

      Thanks

      Charles

      jkandasaJ 1 Reply Last reply Reply Quote 1
      • jkandasaJ Offline
        jkandasa @pillarama
        last edited by

        @pillarama the same issue has been reported by @skywatch too. I am going to work on this soon. For some reason, corruption happened on the sensor table, which leads a null issue.
        I will keep update you the status.

        1 Reply Last reply Reply Quote 0
        • jkandasaJ Offline
          jkandasa
          last edited by

          @pillarama I have added a fix to remove the corrupted resources
          I have published it on the SNAPSHOT version, can you please verify?

          skywatchS 1 Reply Last reply Reply Quote 1
          • skywatchS Offline
            skywatch @jkandasa
            last edited by skywatch

            @jkandasa I can confirm that the fix (installing 1.6.0) worked for me here - hopefully for @pillarama too!

            @pillarama - Do you also face an issue where you cannot add a new graph or sensor to a dashboard? That was also an issue for me and now both are solved with new version.

            Thank you!!!

            P 1 Reply Last reply Reply Quote 1
            • P Offline
              pillarama @skywatch
              last edited by

              Hi Folks, sorry for the delay in responding... only just got a chance to get back to this again...

              @skywatch Yes, I just checked and found I was also unable to select a sensor variable for any object on the dashboard either - the Sensors variable list was just empty. Thanks!

              @jkandasa This snapshot version fixed the issue for me as well - thank you very much!!

              1 Reply Last reply Reply Quote 2
              • First post
                Last post

              0

              Online

              587

              Users

              529

              Topics

              3.4k

              Posts
              Copyright © 2015-2025 MyController.org | Contributors | Localization