我使用c#语言在visual studio上建立了一个网站,我在我的网站上使用了solrnet,我通过http://localhost:8983/solr连接到了它的服务器,一切正常,直到我在godaddy上发布网站,我还没有能够连接到solr了。 在Godaddy上,我用 publicIp:8983 / solr
替换了l ocalhost:8983 / solr / tempSolrNet.Exceptions.SolrConnectionException: Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 00.00.00.00:8983 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at HttpWebAdapters.Adapters.HttpWebRequestAdapter.GetResponse() at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest request) at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable`1 parameters) --- End of inner exception stack trace --- at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable`1 parameters) at SampleSolrApp.LoggingConnection.Get(String relativeUrl, IEnumerable`1 parameters) at SolrNet.Impl.SolrQueryExecuter`1.Execute(ISolrQuery q, QueryOptions options) at SolrNet.Impl.SolrBasicServer`1.Query(ISolrQuery query, QueryOptions options) at SolrNet.Impl.SolrServer`1.Query(ISolrQuery query, QueryOptions options)
答案 0 :(得分:0)
仍然是solr应该在localhost:8983 / solr
在godaddy服务器IE上试试
如果您仍想公开访问solr,则需要在高级防火墙设置中启用端口