I'm using Cisco Netflow Collector software and it was collecting netflow data as expected until server admin disabled iptables and security admin enabled firewall for the server. Now it is giving below exception.
The collector is running on internal/private server and Cisco NFC license is tied to public ip and hence hostname is set to public ip in /etc/hosts file
[2015-09-29 12:03:41 GMT+05:30] INFO com.cisco.nfc.cnsxml.CNSXMLMonitor - Starting CNS/XML Interface for NFC 6.0.0 [standard image, build 31]...
[2015-09-29 12:06:51 GMT+05:30] ERROR com.cisco.nfc.cnsxml.CNSXMLMonitor - Could not start CNS Event Service transport
java.rmi.ConnectException: Connection refused to host: <public IP>; nested exception is:
java.net.ConnectException: Connection timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at com.cisco.nfc.cnsxml.CNSXMLMonitor.<init>(CNSXMLMonitor.java:163)
at com.cisco.nfc.cnsxml.CNSXMLMonitor.main(CNSXMLMonitor.java:192)
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 7 more
The sec admin has allowed ports 22 and 1099 but yet the above exception is thrown. Do i need to change configuration in server or in firewall?
This issue was resolved by using a new license from cisco generated using the private IP. Thanks Vishawanath and EJP for your help.