Hello Martin,
As Guillaume replied for jmxtrans, I am very surprised that you could face such issue with embedded-jmxtrans. I checked the code today and I did not see any weakness.
I did a test on a standalone server that successfully reconnected to a Graphite server:
- Start carbon-cache + graphite web-app
- start a java web-app with embedded-jmxtrans outputting to carbon-cache with the GraphiteWriter (Plain Text TCP)
- Verify that embedded-jmxtrans logs are OK and that metrics appear in Graphite
- Stop carbon-cache
- Verify that embedded-jmxtrans fails to send metrics to Graphite. The following message appear in the logs of the java webapp "[jmxtrans-export-2] WARN o.j.embedded.output.GraphiteWriter - Failure to send result to graphite server 'HostAndPort{host='localhost', port=2003}' with null java.net.ConnectException: Connection refused" every "exportIntervalInSeconds" (5 secs in my test)
- Restart carbon-cache
- Verify that the warning message "Failure to send result to graphite server..." no longer appears in the logs of the java web-app
- Verify in Graphite web console that new metrics are received by Graphite
Can you give us more details?
Cyrille