Hi Avinash
Most of the time, this "connection closed" error is indicative of firewall/network issues. Check with the network team if the firewall from your server to SFDC is open (IP, ports, etc). If your organization uses proxy, check also on that.
Another way to confirm whether the connection is opened is to perform a telnet command at OS level on the PI server to the SFDC server:-
telnet <IP> <port>
Regards
Eng Swee