Git Product home page Git Product logo

Comments (4)

edsiper avatar edsiper commented on August 23, 2024

Looks like the problem is with Unix domain sockets, if you try the TCP connection does it works ?

from fluent-logger-node.

tantra35 avatar tantra35 commented on August 23, 2024

No this is a complex problem, due follow code (sender.js:108):

  var self = this;
  if( self._socket === null ){
    self._socket = new net.Socket();
    self._socket.setTimeout(self.timeout);
    self._socket.on('error', function(err){
      if( self._socket ){
        self._socket.destroy();
        self._socket = null;
//        callback(err);
        self._eventEmitter.emit('error', err); //if socket error happens this call print stack trace and kill node
      }
    });

So as expected when we use tcp connection we got the same error:

root@social:/home/ruslan/test/log# node ./test.js
[2015-09-23 18:11:14.888] [INFO] foo - this log record is sent to fluent daemon
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:24224
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)

from fluent-logger-node.

okkez avatar okkez commented on August 23, 2024

Application does not crash when we use plain FluentSender.
We should fix log4js.js in this library.

var logger = require('fluent-logger').createFluentSender('tag', {
  host: 'localhost',
  port: 5170,
  timeout: 3.0
});

setInterval(function() {
  latency = Math.round(Math.random() * 100);
  console.log('.');
  logger.emit('label', { message: 'this log record is sent to fluent daemon' });
}, 1000);

from fluent-logger-node.

okkez avatar okkez commented on August 23, 2024

@tantra35 @ashutalewar
test script does not crash on my environment. Please try #42

from fluent-logger-node.

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.