Giter VIP home page Giter VIP logo

Comments (2)

komamitsu avatar komamitsu commented on August 18, 2024

Hmm... I can't reproduce this issue with Fluentd. I started 2 Fluentd processes and restarted the first Fluentd. I confirmed Fluency did fallback to the second Fluentd and successfully used the first Fluentd again after it restarted.

    public static void main(String[] args)
            throws InterruptedException, IOException
    {
        Fluency fluency = new FluencyBuilderForFluentd().build(
                Arrays.asList(new InetSocketAddress(24224), new InetSocketAddress(24225)));
        Map<String, Object> event = new HashMap<>();
        event.put("name", "aaaa");
        event.put("age", 42);
        for (int i = 0; i < 100; i++) {
            event.put("i", i);
            fluency.emit("foo.bar", event);
            TimeUnit.SECONDS.sleep(2);
        }
        fluency.close();
    }
  • fluentd.conf
<source>
  @type forward
  port 24224
  bind 0.0.0.0
</source>

<match foo.bar>
  @type stdout
</match>
  • fluentd2.conf
<source>
  @type forward
  port 24225
  bind 0.0.0.0
</source>

<match foo.bar>
  @type stdout
</match>
  • fluentd -c fluentd.conf
$ fluentd -c fluentd.conf
    :
2019-11-29 00:21:44.000000000 +0900 foo.bar: {"name":"aaaa","i":0,"age":42}
2019-11-29 00:21:46.000000000 +0900 foo.bar: {"name":"aaaa","i":1,"age":42}
2019-11-29 00:21:48.000000000 +0900 foo.bar: {"name":"aaaa","i":2,"age":42}
2019-11-29 00:21:50.000000000 +0900 foo.bar: {"name":"aaaa","i":3,"age":42}
2019-11-29 00:21:52.000000000 +0900 foo.bar: {"name":"aaaa","i":4,"age":42}
^C2019-11-29 00:21:55 +0900 [info]: Received graceful stop
2019-11-29 00:21:54.000000000 +0900 foo.bar: {"name":"aaaa","i":5,"age":42}
2019-11-29 00:21:55 +0900 [info]: #0 fluentd worker is now stopping worker=0
2019-11-29 00:21:55 +0900 [info]: #0 shutting down fluentd worker worker=0
2019-11-29 00:21:55 +0900 [info]: #0 shutting down input plugin type=:forward plugin_id="object:3fe0728d2ccc"
2019-11-29 00:21:55 +0900 [info]: #0 shutting down output plugin type=:stdout plugin_id="object:3fe0718aa188"
2019-11-29 00:21:56 +0900 [info]: Worker 0 finished with status 0
$ fluentd -c fluentd.conf
    :
2019-11-29 00:22:26 +0900 [info]: #0 starting fluentd worker pid=5603 ppid=5578 worker=0
2019-11-29 00:22:26 +0900 [info]: #0 listening port port=24224 bind="0.0.0.0"
2019-11-29 00:22:26 +0900 [info]: #0 fluentd worker is now running worker=0
2019-11-29 00:22:28.000000000 +0900 foo.bar: {"name":"aaaa","i":22,"age":42}
2019-11-29 00:22:30.000000000 +0900 foo.bar: {"name":"aaaa","i":23,"age":42}
2019-11-29 00:22:32.000000000 +0900 foo.bar: {"name":"aaaa","i":24,"age":42}
2019-11-29 00:22:34.000000000 +0900 foo.bar: {"name":"aaaa","i":25,"age":42}
2019-11-29 00:22:36.000000000 +0900 foo.bar: {"name":"aaaa","i":26,"age":42}
2019-11-29 00:22:38.000000000 +0900 foo.bar: {"name":"aaaa","i":27,"age":42}
2019-11-29 00:22:40.000000000 +0900 foo.bar: {"name":"aaaa","i":28,"age":42}
2019-11-29 00:22:42.000000000 +0900 foo.bar: {"name":"aaaa","i":29,"age":42}
2019-11-29 00:22:44.000000000 +0900 foo.bar: {"name":"aaaa","i":30,"age":42}
    :
  • fluentd -c fluentd2.conf
$ fluentd -c fluentd2.conf
    :
2019-11-29 00:21:19 +0900 [info]: #0 starting fluentd worker pid=5571 ppid=5545 worker=0
2019-11-29 00:21:19 +0900 [info]: #0 listening port port=24225 bind="0.0.0.0"
2019-11-29 00:21:19 +0900 [info]: #0 fluentd worker is now running worker=0
2019-11-29 00:21:56.000000000 +0900 foo.bar: {"name":"aaaa","i":6,"age":42}
2019-11-29 00:21:58.000000000 +0900 foo.bar: {"name":"aaaa","i":7,"age":42}
2019-11-29 00:22:00.000000000 +0900 foo.bar: {"name":"aaaa","i":8,"age":42}
2019-11-29 00:22:02.000000000 +0900 foo.bar: {"name":"aaaa","i":9,"age":42}
2019-11-29 00:22:04.000000000 +0900 foo.bar: {"name":"aaaa","i":10,"age":42}
2019-11-29 00:22:06.000000000 +0900 foo.bar: {"name":"aaaa","i":11,"age":42}
2019-11-29 00:22:08.000000000 +0900 foo.bar: {"name":"aaaa","i":12,"age":42}
2019-11-29 00:22:10.000000000 +0900 foo.bar: {"name":"aaaa","i":13,"age":42}
2019-11-29 00:22:12.000000000 +0900 foo.bar: {"name":"aaaa","i":14,"age":42}
2019-11-29 00:22:14.000000000 +0900 foo.bar: {"name":"aaaa","i":15,"age":42}
2019-11-29 00:22:16.000000000 +0900 foo.bar: {"name":"aaaa","i":16,"age":42}
2019-11-29 00:22:18.000000000 +0900 foo.bar: {"name":"aaaa","i":17,"age":42}
2019-11-29 00:22:20.000000000 +0900 foo.bar: {"name":"aaaa","i":18,"age":42}
2019-11-29 00:22:22.000000000 +0900 foo.bar: {"name":"aaaa","i":19,"age":42}
2019-11-29 00:22:24.000000000 +0900 foo.bar: {"name":"aaaa","i":20,"age":42}
2019-11-29 00:22:26.000000000 +0900 foo.bar: {"name":"aaaa","i":21,"age":42}

@maglun2 Can you give me some information?

  1. the log messages you got
  2. the simplest way to reproduce this issue

BTW, the title of this issue MultiSender only removes senders, never adds them back when available sounds just your guess about implementation in Fluency and I don't think it makes sense. It would be great if the title of this issue describes only fact not guess.

from fluency.

komamitsu avatar komamitsu commented on August 18, 2024

I'm closing this issue. Feel free to reopen if you still have a trouble.

from fluency.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.