Hawtio stops working after running for days

487 views Asked by At

We are using hawtio to have a fancy and nice web interface for seeing JMX MBeans and Camel Route in our project. However, we have noticed that after weeks running Hawtio stops working and we are getting a Jetty error when trying to access it.

We are using hawtio in standalone mode, version 1.2.0/offline. Also I guess it worth to mention that our Camel routes are pretty heavy and consume many resources (not sure if that impacts hawtio). When trying to access we get this:

HTTP ERROR 404

Problem accessing /ourContextPath/. Reason:

Not Found

Powered by Jetty://

It seems like there is no active resource for our context path and I something went wrong like a thread stopped working or something.

Does anybody have any idea how to solve this or how to find what's causing this? Also, is this a known bug fixed in the latest version (1.2.1)?

1

There are 1 answers

1
Joakim Erdfelt On BEST ANSWER

Jetty needs a work/temp directory to operate.

Default behavior is to use whatever java.io.tmpdir points to.

However, on many unix installations, this points to /tmp, and that directory is often cleaned out by other processes.

To fix, either specify a java.io.tmpdir to be somewhere other than /tmp

$ java -Djava.io.tmpdir=/var/run/jetty -jar start.jar

or create a ${jetty.base}/work/ directory (if running Jetty 9.1+)
or create a ${jetty.home}/work/ directory (if running versions of Jetty prior to 9.1)

See the answer at Jetty: Starts in C:\Temp for more details on how this work/temp directory operates and is configured.