This issue happens due to below reasons :
- This is mostly a case you did not put your core name in url as http://localhost:8983/solr/<coreName> ex: http://localhost:8983/solr/product
- Host is incorrect
- Host is correct but solr is not running at host
- port might be disable
- Firewall issue