When tomcat is running, and then fluentd restarted, webapp save event to buffer until it fulls and fails.
Closed this issue · 1 comments
dieend commented
I was thinking the default behaviour it will reconnect to fluentd socket. I was not changing the port, only restarting fluentd. But after fluentd restarted, webapp in tomcat can't forward event to fluentd.
If I use parallel deployment, the new version able to forward the message to fluentd.
How to make webapp still able to forward the message to fluentd?
I'm using spring framework, and I uses the logger like below:
@Controller
public class TestController {
private static FluentLogger LOG = FluentLogger.getLogger("tracker","localhost", 24224);
@ResponseBody
@RequestMapping(value = "/test", method = RequestMethod.GET)
public String test(HttpServletRequest request) throws IOException {
Map<String, Object> data = new HashMap<String, Object>();
String ip = IpHelper.getClientIpAddress(request)
data.put("ip", ip);
LOG.log("data", data);
return ip;
}
}
Is there anything I did wrong? Is there any way to achieve what I want? (webapp still able to forward log to fluentd after fluentd get restarted)
dieend commented
Nevermind. I was using really old version (2.7). There was a bug that have no timeout sets :|
Keep using the latest version, guys.