Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When tomcat is running, and then fluentd restarted, webapp save event to buffer until it fulls and fails. #39

Closed
dieend opened this issue Dec 12, 2014 · 1 comment

Comments

@dieend
Copy link

dieend commented Dec 12, 2014

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 dieend changed the title When tomcat is running, and then fluentd restarted, webapp save event to log until it fulls and fails. When tomcat is running, and then fluentd restarted, webapp save event to buffer until it fulls and fails. Dec 12, 2014
@dieend
Copy link
Author

dieend commented Dec 14, 2014

Nevermind. I was using really old version (2.7). There was a bug that have no timeout sets :|
Keep using the latest version, guys.

@dieend dieend closed this as completed Dec 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant