thingsboard icon indicating copy to clipboard operation
thingsboard copied to clipboard

Unable to start thingsboard service

Open z4nD4R opened this issue 9 years ago • 24 comments

Hello everyone,

I found out that tb service stopped to work. I have issues service thingsboard restart but unfortunatelly I can not bring the tb service back alive.

I'm attaching /var/log/thingsboard/thingsboard.log https://pastebin.com/qXna1uAT .

Any advice will be helpfull.

Thank you.

Y

z4nD4R avatar Sep 04 '17 20:09 z4nD4R

hi,

just to confirm:

  1. TB was running fine without any issues
  2. At some point TB stopped
  3. After restart without any modifications to the configuration it starts throwing this errors on mapping

are these statements correct?

volodymyr-babak avatar Sep 05 '17 06:09 volodymyr-babak

@volodymyr-babak,

more or less like you specified. The exact way:

  • TB was running fine without any issues
  • Make some dashboard modification (export and import dashoard)
  • Works for some time
  • At some point TB stopped
  • After restart without any modifications to the configuration it starts throwing this errors on mapping

This is exact path :)

Y

z4nD4R avatar Sep 05 '17 16:09 z4nD4R

@volodymyr-babak,

if you need some more logs or debug informations, please don't hesitate to ask.

Y

z4nD4R avatar Sep 07 '17 06:09 z4nD4R

hi, from the log file it doesn't clear where is the issue. Please change log level to DEBUG and restart application. And then attach log file + config file.

volodymyr-babak avatar Sep 07 '17 06:09 volodymyr-babak

@volodymyr-babak, do you have a hint for me how to enable the DEBUG level?

z4nD4R avatar Sep 07 '17 07:09 z4nD4R

/usr/share/thingsboard/conf/logback.xml is configuration file for log level and other options

volodymyr-babak avatar Sep 07 '17 07:09 volodymyr-babak

@volodymyr-babak,

thank you for pointing me to /usr/share/thingsboard/conf/logback.xml :) I'm attaching the log file (quite huge) directly here.

Y thingsboard.txt

z4nD4R avatar Sep 07 '17 18:09 z4nD4R

you have issues with memory on your device 2017-09-07 16:53:52,854 [main] WARN o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resourceHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Initialization of bean failed; nested exception is java.lang.OutOfMemoryError: Java heap space

volodymyr-babak avatar Sep 08 '17 05:09 volodymyr-babak

We see a lower limit of 4-6GB ram using Ubuntu for TB to run. So our VM's have 8-16 GB and run without problems.

MarsWarrior avatar Sep 08 '17 08:09 MarsWarrior

If you are using 1.3 version and it's not painfully to re-create data and devices you can consider SQL database instead of cassandra. This will work fine on 1GB RAM devices

volodymyr-babak avatar Sep 08 '17 09:09 volodymyr-babak

@volodymyr-babak Yes I'm using 1.3 version of TB, but I'm not using cassandra DB. I'm using SQL :) Moreover this setup worked like a charm before ;) I believe the glitch will be somewhere else :/

Y

z4nD4R avatar Sep 08 '17 12:09 z4nD4R

I'm not saying that cassandra is definitely the issue. ThingsBoard is stopping because luck of RAM memory. But root cause is not clear and must be investigated separately - could be database, java configuration, memory usage by some other process, etc.

volodymyr-babak avatar Sep 08 '17 13:09 volodymyr-babak

@volodymyr-babak , It is interesting as it was working without any issues a quiete long time and than suddenly it stops. I have tried to reboot RPI3 and start TB, but no luck here as well.

Is there any chance to bring it alive (I wouldn't like to lost all my configuration like dashboard, devices etc).

Y

z4nD4R avatar Sep 11 '17 06:09 z4nD4R

have you tried to increases RAM memory for the thingsboard java process ?

volodymyr-babak avatar Sep 11 '17 06:09 volodymyr-babak

@volodymyr-babak do you mean to increas values scpecified in /etc/thingsboard/conf/thingsboard.conf ? :

# Update ThingsBoard memory usage and restrict it to 150MB in /etc/thingsboard/conf/thingsboard.conf
export JAVA_OPTS="$JAVA_OPTS -Dplatform=rpi -Xms256M -Xmx256M"

Y

z4nD4R avatar Sep 11 '17 08:09 z4nD4R

yes

volodymyr-babak avatar Sep 11 '17 08:09 volodymyr-babak

@volodymyr-babak I'll try it as soon as return home. Will share result here. Thank you so far.

Y

z4nD4R avatar Sep 11 '17 08:09 z4nD4R

@volodymyr-babak:

I have edited the given line as you suggested and my TB instance is alive again. Thank you many times.

PS: is there anyway to donate this project or support in other way?

Y

z4nD4R avatar Sep 12 '17 18:09 z4nD4R

@z4nD4R We should make some T-Shirts :rofl: . You can support us by contributing the issues/fixes/features. There are some ideas in the neighbor github issues.

ashvayka avatar Sep 14 '17 17:09 ashvayka

@ashvayka the T-Shirts would be great, let me know I'd like to participate on design of those T-Shirts :D Speaking about suport by issues omw to upload another one.

Y

z4nD4R avatar Sep 14 '17 20:09 z4nD4R