Coder Social home page Coder Social logo

Comments (12)

repeatedly avatar repeatedly commented on July 23, 2024

Please paste your configuration here.

I checked mongo driver and it seems to delete closed socket: https://github.com/mongodb/mongo-ruby-driver/blob/31c59b900dc8223ab97e4019d8fafb8f197754f1/lib/mongo/connection/pool.rb#L294
Could you give me the result of sigdump?

http://docs.fluentd.org/articles/trouble-shooting#dump-fluentd-internal-information

I want to know which function call causes this problem.

from fluent-plugin-mongo.

ceecko avatar ceecko commented on July 23, 2024

I suspect the issue may be connected to MongoDB changing primary since during the election there's no primary and logs cannot be flushed.

I have already restarted td-agent, will the sigdump help or should I wait until the issue appears again?

Config

<source>
  type forward
  port 24224
  bind 127.0.0.1

  @label @docker
</source>

<label @docker>
  <filter docker.*>
    type record_transformer
    remove_keys app_id,container_name
  </filter>
  <match docker.*>
    type mongo_replset
    tag_mapped
    remove_tag_prefix docker.
    flush_interval 10s
    nodes ip1:27017,ip2:27017
    name rs0
    user user1
    password xxx
    database logs
    capped
    capped_size 2097152
  </match>
  <match ssl.*>
    type mongo_replset
    tag_mapped
    flush_interval 10s
    nodes ip1:27017,ip2:27017
    name rs0
    user user1
    password xxx
    database logs
    capped
    capped_size 524288
  </match>
  <match **>
    type mongo_replset
    tag_mapped
    flush_interval 10s
    nodes ip1:27017,ip2:27017
    name rs0
    user user1
    password xxx
    database logs
    capped
    capped_size 2097152
  </match>
</label>


<label @accesslogs>
  <filter **>
    type record_transformer
    renew_record true
    <record>
      tag ${tag_parts[3]}
      httpStatusCode ${code}
      upstreamTime ${upstream_time}
    </record>
  </filter>
  <match **>
    type mongo_replset
    flush_interval 10s
    nodes ip1:27017,ip2:27017
    name rs0
    user user1
    password xxx
    database access_logs
    collection http_status_queue
  </match>
</label>

from fluent-plugin-mongo.

repeatedly avatar repeatedly commented on July 23, 2024

will the sigdump help or should I wait until the issue appears again?

Yeah. If the problem happens again, sigdump result helps problem investigation.

from fluent-plugin-mongo.

ceecko avatar ceecko commented on July 23, 2024

I did a couple sigdump's, since I wasn't sure if and where it was saved...

sigdump-1183.txt
sigdump-1186.txt

from fluent-plugin-mongo.

ceecko avatar ceecko commented on July 23, 2024

Is there any other info I can provide?
We've experienced this issue pretty often recently.

from fluent-plugin-mongo.

repeatedly avatar repeatedly commented on July 23, 2024

Hmm... hard to debug because it seems the problem happens inside mongo driver, not plugin.
Could you update fluent-plugin-mongo to v0.8.0?
It uses mongo driver v2.x.

from fluent-plugin-mongo.

ceecko avatar ceecko commented on July 23, 2024

Sure, I can give it a try. Any hints how to update td-agent to use the v0.8.0?

from fluent-plugin-mongo.

repeatedly avatar repeatedly commented on July 23, 2024

See: http://docs.fluentd.org/v0.12/articles/plugin-management

from fluent-plugin-mongo.

ceecko avatar ceecko commented on July 23, 2024

I have just deployed the new plugin to one of our nodes. So far it seems that fluentd starts and works ok.
However I didn't find a way to specify multiple hosts for a replica set. There's only one host config var available. How can I specify multiple hosts as with the old nodes config var?

from fluent-plugin-mongo.

repeatedly avatar repeatedly commented on July 23, 2024

It is the regression of updating mongo driver to v2.x.
I discussed this problem on #88.
Maybe, @megamk will send a patch.

from fluent-plugin-mongo.

repeatedly avatar repeatedly commented on July 23, 2024

I can't get a response from megamk, so I wrote a patch for this.
v0.8.1 has nodes parameter for replica set.
Or you can use connection_string with Mongo URI.

from fluent-plugin-mongo.

megamk avatar megamk commented on July 23, 2024

I can't get a response from megamk, so I wrote a patch for this.

I'm sorry, my ruby knowledge is not enough to dive into how your system tests work so I was planning to do this in my spare time before making a PR. But I couldn't find time for that yet, sorry.

Great that you've adopted my suggestion though, thanks!

from fluent-plugin-mongo.

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.