Hello all 😁
I'm having some trouble setting up logspout on a different host.
Following:
https://signoz.io/docs/userguide/collect_docker_logs/
I have 2 servers, one is running signoz (Machine A) and the other (Machine B) is running my services in docker containers and which I want to mount logspout.
Settings:
(Machine A)
docker-compose.yaml (snippet of otel-collector)
otel-collector:
ports:
# - "1777:1777" # pprof extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "2255:2255" # <------ Port opened for logspout comm
(Machine B)
docker run --net=host --rm --name="logspout" \
--volume=/var/run/docker.sock:/var/run/docker.sock \
gliderlabs/logspout \
syslog+tcp://<machine_a_ip>:2255
----------------------
When starting logspout on (Machine B) de container fails with the output:
2025/02/05 14:27:32 !! dial tcp <machine_a_ip>:2255: connect: connection refused
Running netcat inside (Machine B):
nc -zv <machine_a_ip> 2255
nc: connect to <machine_a_ip> port 2255 (tcp) failed: Connection refused
Ok, expected, since logspout is already failing...
Running netcat inside (Machine A)
nc -zv 0.0.0.0 2255
Connection to 0.0.0.0 2255 port [tcp/*] succeeded!
So from this I can understand that I have some problem with port 2255 on (Machine A), but:
Running tcpdump on Machine A (that is running signoz) while starting logspout from the Machine B:
sudo tcpdump -i any port 2255
I get:
14:47:52.799030 eth0 In IP static.****.your-server.34632 > static.<machine_a_ip>.2255: Flags [S], seq 2710839612, win 64240, options [mss 1460,sackOK,TS val 533319106 ecr 0,nop,wscale 7], length 0
14:47:52.799194 br-e99af481de3a Out IP static.your-server.34632 > 172.18.0.4.2255: Flags [S], seq 2710839612, win 64240, options [mss 1460,sackOK,TS val 533319106 ecr 0,nop,wscale 7], length 0
14:47:52.799207 veth62369ab Out IP static.your-server.34632 > 172.18.0.4.2255: Flags [S], seq 2710839612, win 64240, options [mss 1460,sackOK,TS val 533319106 ecr 0,nop,wscale 7], length 0
14:47:52.799254 veth62369ab P IP 172.18.0.4.2255 > static.****.your-server.34632: Flags [R.], seq 0, ack 2710839613, win 0, length 0
14:47:52.799254 br-e99af481de3a In IP 172.18.0.4.2255 > static.****.your-server.34632: Flags [R.], seq 0, ack 1, win 0, length 0
14:47:52.799279 eth0 Out IP static.<machine_a_ip>.2255 > static.****.your-server.34632: Flags [R.], seq 0, ack 2710839613, win 0, length 0
So the tcp is reaching Machine B but not being accepted on the container.
Can someone tell me what am I missing?
Thank for the help in advance 😁