我正在尝试将VirtoCommerce的自定义版本部署到Azure云中,但遇到了一些问题。当我尝试加载网站时,我遇到了一个
Server Error in '/' Application.
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 <ip>:9200
这些是调度程序控制台日志的最后几行
[03/16/2015 17:45:23 > 62130d: INFO] VirtoCommerce.ScheduleService.Trace Error: 0 : VirtoCommerce.Scheduling.Jobs.GenerateSearchIndexWork#3e32cbe9-b912-4901-bedb-7604a4ab0616 Trace VirtoCommerce.Search.Providers.Elastic.ElasticSearchException: Failed to remove indexes. URL:xpmarket-search.cloudapp.net:9200 ---> PlainElastic.Net.OperationException: 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 137.117.213.124:9200
[03/16/2015 17:45:23 > 62130d: INFO] at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
[03/16/2015 17:45:23 > 62130d: INFO] at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
[03/16/2015 17:45:23 > 62130d: INFO] --- End of inner exception stack trace ---
[03/16/2015 17:45:23 > 62130d: INFO] at System.Net.HttpWebRequest.GetResponse()
[03/16/2015 17:45:23 > 62130d: INFO] at PlainElastic.Net.ElasticConnection.ExecuteRequest(String method, String command, String jsonData)
[03/16/2015 17:45:23 > 62130d: INFO] --- End of inner exception stack trace ---
[03/16/2015 17:45:23 > 62130d: INFO] at PlainElastic.Net.ElasticConnection.ExecuteRequest(String method, String command, String jsonData)
[03/16/2015 17:45:23 > 62130d: INFO] at PlainElastic.Net.ElasticConnection.Delete(String command, String jsonData)
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Search.Providers.Elastic.ElasticClient`1.Delete(DeleteCommand deleteCommand) in c:UsersTiagoDocumentsxpmarketplacesrcExtensionsSearchElasticSearchProviderElasticClient.cs:line 129
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Search.Providers.Elastic.ElasticSearchProvider.RemoveAll(String scope, String documentType) in c:UsersTiagoDocumentsxpmarketplacesrcExtensionsSearchElasticSearchProviderElasticSearchProvider.cs:line 477
[03/16/2015 17:45:23 > 62130d: INFO] --- End of inner exception stack trace ---
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Search.Providers.Elastic.ElasticSearchProvider.ThrowException(String message, Exception innerException) in c:UsersTiagoDocumentsxpmarketplacesrcExtensionsSearchElasticSearchProviderElasticSearchProvider.cs:line 562
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Search.Providers.Elastic.ElasticSearchProvider.RemoveAll(String scope, String documentType) in c:UsersTiagoDocumentsxpmarketplacesrcExtensionsSearchElasticSearchProviderElasticSearchProvider.cs:line 490
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Foundation.Search.SearchIndexController.Prepare(String scope, String documentType, Boolean rebuild) in c:UsersTiagoDocumentsxpmarketplacesrcCoreCommerceFoundationSearchSearchIndexController.cs:line 91
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Scheduling.Jobs.GenerateSearchIndexWork.Execute(IJobContext context) in c:UsersTiagoDocumentsxpmarketplacesrcExtensionsJobsVirtoCommerceJobsGenerateSearchIndexWork.cs:line 17
[03/16/2015 17:45:23 > 62130d: INFO] at VirtoCommerce.Scheduling.JobActivityTool.ControlledExecution(IJobActivity activity, TraceContext traceContext, Action`1 audit, IDictionary`2 parameters) in c:UsersTiagoDocumentsxpmarketplacesrcExtensionsJobsSchedulingLibJobActivityTool.cs:line 32
[03/16/2015 17:45:23 > 62130d: INFO] VirtoCommerce.ScheduleService.Trace Stop: 0 : VirtoCommerce.Scheduling.Jobs.GenerateSearchIndexWork#3e32cbe9-b912-4901-bedb-7604a4ab0616 Finished with Error! Duration=0m. 21s. 66
[03/16/2015 17:45:27 > 62130d: INFO] VirtoCommerce.ScheduleService.Trace Verbose: 0 : TRACE|3/16/2015 5:45:27 PM|JobScheduler|SchedulerProcess-ApartmentIteration|||Iterating 5 Jobs
弹性搜索服务器似乎未运行,无法打开"137.117.213.124:9200"。您尝试部署哪个版本的 VC?
我们遇到了一个小问题,即在创建弹性搜索时默认分配的空间不足。这是修复:https://github.com/VirtoCommerce/vc-community/commit/213de23cc023cc8da8983daba188d08c2de3c2a6
基本上,将大小设置为新值并重新部署弹性搜索。