SearchApiException while retrieving config files of Solr server solr_server server SearchAPI in Drupal7 with Apache Solr on Jetty was working ok in Windows, however when I moved the installation to Linux, I'm getting this exception in Drupal log:

SearchApiException while retrieving config files of Solr server solr_server server: "0" Status: Request failed: Permission denied in SearchApiSolrConnection->checkResponse() (line 536 of .../search_api_solr/includes/solr_connection.inc).

I can see that Apache Solr is accessible in Linux by the link: 
http://localhost:8983/solr/#/~cores/drupal7

But not accessible by Drupal Search API for the Solar service URI:
http://localhost:8983/solr/drupal7

With the same links everything worked well in Windows. I'm not sure what permission is missing in Linux and would appreciate any insight on this.
I found this question when I started with the same problem (in my case a Debian server we manage vs a RedHat we don't) and did not see the answer (due to how short it was). After a lot of digging I realized the problem was SELinux (which is the same given the answer I now see above).

The main reason for the puzzle was that the requests did work from command line ("wget -O - {your SOLR ping URL}" worked just fine). But we learned from a Drupal thread (https://www.drupal.org/node/1473368) that recommended to test if SELinux was running:


sestatus
getsebool -a | grep httpd


The reason for it to fail normally is that "httpd_can_network_connect" is off. You can set it on by doing: setsebool httpd_can_network_connect=1

By the way what point us in the right direction was trying to use the same API call drupal_http_request() on a different module. We enabled/used Aggregator to pull an RSS feed (which worked), but our call to the SOLR ping show result "-13 Permission denied" on the log.

Hope this helps as a shortcut for the next person with this issue!