Unable to send data through UDP Port (http works fine)

Hi,

I am trying to send a test data to Graylog via GELP UDP port 12201. However am getting an invalid error. Any advise will be greatly appreciated

Netcat query from one of docker container to graylog container

echo -n '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_info": "foo" }' | nc -w0 -u graylog_graylog 12201

Result

invalid wait-time 0

I am able to send logs via the GELP HTTP PORT 12201 though (after the necessary graylog input config).

My Environment Setup - Docker Swarm for AWS + AWS elasticsearch Cluster

version: '3.4'

services:
  # MongoDB: https://hub.docker.com/_/mongo/
  mongo:
    image: mongo:3
    networks:
     - graylog_network

  # Graylog: https://hub.docker.com/r/graylog/graylog/
  graylog:
    image: graylog/graylog:3.1
    environment:
      # CHANGE ME (must be at least 16 characters)!
      - GRAYLOG_PASSWORD_SECRET=somepasswordpepper
      # Password: admin
      - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
      - GRAYLOG_HTTP_EXTERNAL_URI=http://myaws.ap-southeast-1.elb.amazonaws.com:90/
      - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
      # Elastic Settings
      - GRAYLOG_ELASTICSEARCH_HOSTS=https:/myElasticsearchService/
    depends_on:
      - mongo
    networks:
      - graylog_network

    ports:
      # Graylog web interface and REST API
      - 90:9000
      # Syslog TCP
      - 1514:1514
      # Syslog UDP
      - 1514:1514/udp
      # GELF TCP
      - 12201:12201
      # GELF UDP
      - 12201:12201/udp

# Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/

networks:
  graylog_network:
      external: true
    

he @gang89
where did you get the error message invalid wait-time ? I guess that this is the result of the netcat command?

Just read the MAN page of the netcat command on the machine you are using should reveal how this is used on that server os.

Hi @jan,

Thanks for the advice. I manage to got it working. Seem to be a netcat issue rather than a graylog one. Am able to send logs through GELP UDP despite the netcat error

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.