While creating HEC token through putty by using below command, we are getting error like "Couldn't request server info: Couldn't complete HTTP request: Connection refused". Please provide any info or solution.
/opt/splunk/bin/splunk http-event-collector create Appd_Splunk -uri http://<IP>:8089 -description "This is a Appd token" -disabled 1 -index toll_alrt
Did you enable HEC? https://docs.splunk.com/Documentation/Splunk/9.1.3/Data/UseHECfromtheCLI says it's something like
splunk http-event-collector enable -uri https://localhost:8089
(It's unclear from the docs if enabling a specific token enabled the global HEC settings or not, but this definitely will do that)