Server port is open in Network firewall as well as iptables disabled on server.
We able to telnet port in same network but unable to telnet using localhost/127.0.0.1 and using different network.
Find below output which will be help you to analyse issue.
**[root@localhost ~]# netstat -paln | grep 40901
tcp 0 0 10.141.36.41:40901 0.0.0.0:* LISTEN 48292/./as-agent
[root@localhost ~]# telnet 10.141.36.41 40901
Trying 10.141.36.41...
Connected to 10.141.36.41.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
[root@localhost ~]# telnet localhost 40901
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused**