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

Error address not found #18

Open
gvko opened this issue Aug 11, 2017 · 4 comments
Open

Error address not found #18

gvko opened this issue Aug 11, 2017 · 4 comments

Comments

@gvko
Copy link

gvko commented Aug 11, 2017

I'm setting up with the following implementation:

const stream = gelfStream.forBunyan('http://graylog-server/gelf', 12201);

const logger = bunyan.createLogger({
    name: serviceName,
    streams: [
      {
        level: 'info',
        stream: stream,
        formatter: 'pretty',
        period: '1d',
        count: 7
      },
      {
        level: 'error',
        stream: stream,
        formatter: 'pretty',
        period: '1d',
        count: 7
      }
    ]
  });

and upon lifting my application I get:

Error: getaddrinfo ENOTFOUND http://graylog-server/gelf
          at errnoException (dns.js:28:10)
          at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

I also tried with plain http://graylog-server (without the /gelf part).

I am sure the connection is working properly, because when I do a curl request - it works fine:

curl -X POST -H 'Content-Type: application/json' -d '{ "message": "UAHSDUHAUSDHUASHUS" }' 'http://graylog-server:12201/gelf'
@mhart
Copy link
Owner

mhart commented Aug 11, 2017

Hi @galioy – I'm not sure where the http:// came from – it should just be the host name.

Also, gelf-stream sends UDP messages: http://docs.graylog.org/en/2.2/pages/gelf.html#gelf-via-udp – so an http server won't work here unfortunately

@gvko
Copy link
Author

gvko commented Aug 11, 2017

I did try w/o http:// as well, and I got the same result. :(

@mhart
Copy link
Owner

mhart commented Aug 11, 2017

Have you setup Graylog to use UDP? You can check if it works like this:

http://docs.graylog.org/en/2.3/pages/gelf.html#sending-gelf-messages-via-udp-using-netcat

@mhart
Copy link
Owner

mhart commented Sep 16, 2017

@galioy did you have any luck with UDP?

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

2 participants