0

I have hosted the standalone version of Solr search on Google cloud VPC. When I am accessing the search from my .Net code, I am getting the result in these 3 scenarios:

  1. From visual studio in debug mode.
  2. From my site locally hosted on IIS.
  3. From hitting the search URL in browser.

But when I am hosting my .Net code to cloud (Hostgator, Smarterasp) then I am not able to connect to google cloud. I am using RestSharp to consume the search API and No authentication is used in google VPC.

I have tried WebClient and HttpWebRequest in place of RestSharp but getting the same issue again.

Ajay Kumar
  • 21
  • 1
  • 5

1 Answers1

0

Can you clarify what do you mean when you are talking about hosted software on a Google Cloud VPC? Are you talking about a GCE instance using a VPC network with 'Solr search' standalone software installed? What do you mean when you are saying that you are not able to connect to google cloud when you are 'hosting' your .NET code to cloud? Are you trying to connect to a specific resource in GCP (e.g.: GCE instance, APP engine, Cloud SQL)? Are you using a Cloud VPN and you want to access from your on-premise site to a GCP service?

'The Virtual Private Cloud (VPC) provides networking functionality to Compute Engine virtual machine (VM) instances, GKE containers and App Engine Flex. VPC provides global, scalable, flexible networking for your cloud-based services.'

The VPC networks route, allow or deny network traffic, it's difficult to install software on it. Try to describe better your issue,e.g.: instance not accessible by API through Cloud VPN. If you are using an instance for your software:

  • Check if the instance has the correct configuration to use the API.
  • The firewall rules are allowing the network traffic to the correct IPs and Ports.
  • Check the routes from your on-premise site to the VPC network where the Solr instance is.
HopsHops
  • 55
  • 4
  • Thanks for reply.Yes Hops, you are right, I am talking about the Compute Engine where my Solr search instance is running. In order to get the result from that Solr search instance I have to hit the url eg. **http://:8983/solr/Gyaan/select?facet.field=TagFacet&facet.field=Module** I am getting the result when I hit the URL from browser. Basically I am using this search in another .Net based solution that is hosted on hostgator and Smarterasp. But getting exception "Unable to connect to remote server" in solution when it tries to hit the above URL. – Ajay Kumar May 27 '19 at 18:48
  • It's possible to obtain more information about the issue with `$ curl -i http://[your address]` and making a `$ traceroute http://[your address]`. However, check your Firewall rules in the GCP project and in the vm instance OS that you are using. The firewall rules must give access to the instance where is Solr installed and to port: 8983 plus the protocol that you are using (TCP? UDP? RDP?). – HopsHops May 30 '19 at 08:17