0

I have two centos Machine, Machine A and Machine B. In machine A i have installed collectd and influxdb. So, the system metric from machine A is pushed into influxdb using collectd. I have installed collectd in machine B. Now, I need to push the system metric from machine B to the influxdb which is in machine A.

Collectd uses the port 25826. When I run the below mentioned command in Machine A my output is:

Machine A:

command: netstat -tuplen | grep ':25826'
 output : udp6       0      0 :::25826  :::* 981  325073833  23132/influxd

In Machine B:

sudo netstat -tuplen | grep ':25826'

No output came.

When i use below mentioned command in Machine B:

command:telnet "xxx.xx.xx.xx" "25826"
output:Trying xxx.xx.xx.xx...
telnet: connect to address xxx.xx.xx.xx: No route to host

How to create the host in machine B...So that i can push the metric from Machine B to Machine A...From both machine PING command is working

When i run

sudo firewall-cmd --zone=public --list-ports

Output:

80/tcp 5666/tcp 25826/tcp 25826/udp 3000/tcp

Port is added to iptables...eventhough why telnet command is not working?

1 Answers1

0

Please check with iptables firewall rules and allow the ports with the following rules.

iptables -I INPUT -p tcp -m tcp --dport 25826 -j ACCEPT
service iptables save

Open a port in IPtables – CentOS 7

firewall-cmd --zone=public --add-port=25826/tcp --permanent
firewall-cmd --reload

Give this a try and post back with the errors you have identified and we shall try to resolve it.

kenlukas
  • 3,101
  • 2
  • 16
  • 26
Aiden
  • 177
  • 2
  • @Kenlukas thank u so much for replying...Am checking...If i get error i will post ... – adiya joshi Aug 01 '19 at 05:42
  • @Kenlukas am sorry,,,I tried your command but getting the same output Wheni run the command sudo netstat -tuplen | grep ':25826' command:telnet "xxx.xx.xx.xx" "25826" output:Trying xxx.xx.xx.xx... telnet: connect to address xxx.xx.xx.xx: No route to host Pls help me – adiya joshi Aug 01 '19 at 10:00
  • @Kenlukas `Ports` are added to iptables...why am not able to push metric into influxdb – adiya joshi Aug 01 '19 at 10:53
  • @Kenlukas I added the 25826 in IPtables...but the port is not listenng...Pls help me – adiya joshi Aug 06 '19 at 05:41
  • @adiyajoshi, I edited the response, I did not create it. Aiden supplied the answer. I would suggest posting an edit to your question showing what you've tried and the error message you're receiving – kenlukas Aug 06 '19 at 15:03
  • @Kenlukas Thank you for helping me....I added the port in the iptables...And now its working... – adiya joshi Aug 07 '19 at 05:33