I have started the fluentd server with docker.My fluentd configuration is
<source>
@type syslog
port 514
bind 0.0.0.0
tag system
</source>
<match **>
@type stdout
</match>
The command I used to start the fluentd server is
docker run -p 514:514 -v $(pwd)/tmp:/fluentd/etc fluent/fluentd:edge-debian -c /fluentd/etc/fluentd.conf
It starts the server successfully and I get the log
2023-09-20 16:05:18 +0000 [info]: init supervisor logger path=nil rotate_age=nil rotate_size=nil
2023-09-20 16:05:18 +0000 [info]: parsing config file is succeeded path="/fluentd/etc/fluentd.conf"
2023-09-20 16:05:18 +0000 [info]: gem 'fluentd' version '1.16.2'
2023-09-20 16:05:18 +0000 [warn]: define <match fluent.**> to capture fluentd logs in top level is deprecated. Use <label @FLUENT_LOG> instead
2023-09-20 16:05:18 +0000 [info]: using configuration file: <ROOT>
<source>
@type syslog
port 514
bind "0.0.0.0"
tag "system"
</source>
<match **>
@type stdout
</match>
</ROOT>
2023-09-20 16:05:18 +0000 [info]: starting fluentd-1.16.2 pid=7 ruby="3.1.4"
2023-09-20 16:05:18 +0000 [info]: spawn command to main: cmdline=["/usr/local/bin/ruby", "-Eascii-8bit:ascii-8bit", "/usr/local/bundle/bin/fluentd", "-c", "/fluentd/etc/fluentd.conf", "--plugin", "/fluentd/plugins", "--under-supervisor"]
2023-09-20 16:05:19 +0000 [info]: #0 init worker0 logger path=nil rotate_age=nil rotate_size=nil
2023-09-20 16:05:19 +0000 [info]: adding match pattern="**" type="stdout"
2023-09-20 16:05:19 +0000 [info]: adding source type="syslog"
2023-09-20 16:05:19 +0000 [warn]: #0 define <match fluent.**> to capture fluentd logs in top level is deprecated. Use <label @FLUENT_LOG> instead
2023-09-20 16:05:19 +0000 [info]: #0 starting fluentd worker pid=16 ppid=7 worker=0
2023-09-20 16:05:19 +0000 [info]: #0 listening syslog socket on 0.0.0.0:514 with udp
2023-09-20 16:05:19 +0000 [info]: #0 fluentd worker is now running worker=0
2023-09-20 16:05:19.058192424 +0000 fluent.info: {"pid":16,"ppid":7,"worker":0,"message":"starting fluentd worker pid=16 ppid=7 worker=0"}
2023-09-20 16:05:19.058414751 +0000 fluent.info: {"message":"listening syslog socket on 0.0.0.0:514 with udp"}
2023-09-20 16:05:19.059112948 +0000 fluent.info: {"worker":0,"message":"fluentd worker is now running worker=0"}
I have wrote the simple python script to test the connection which is as follows
import logging
import logging.handlers
import socket
if __name__ == "__main__":
syslogger = logging.getLogger('SyslogLogger')
handler = logging.handlers.SysLogHandler(address=("0.0.0.0", 514), facility=19, socktype=socket.SOCK_DGRAM)
syslogger.addHandler(handler)
syslogger.info("Hello World")
Script runs without any error but I don't get any log on the on the fluentd.
Server and script both are on a local machine.
httpsource but in the logs the loaded config is showingsyslogsource. And, the port you're using withdockeris 9880, not 514. For a simpler setup, you can test this on your local machine first and then move on to docker to emulate the same.http->syslogand using correct port in docker container. I copied the wrong config file while creating the question. Still the issue is the same.